summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaddy-22019-05-29 22:59:53 +0530
committernilshah982019-06-13 12:15:50 +0530
commitcc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d (patch)
treee00d208dcc744c6313ca5f614204236628ff55a1 /src
parent1dd7f42e4fe21f7b854644536ff2be977f67e4a9 (diff)
downloadeSim-cc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d.tar.gz
eSim-cc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d.tar.bz2
eSim-cc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d.zip
ngspiceSimulation documentation added
Diffstat (limited to 'src')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py9
-rw-r--r--src/ngspiceSimulation/pythonPlotting.py12
2 files changed, 14 insertions, 7 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 5d98534e..695bfa50 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -4,9 +4,11 @@ import platform
import os
+# This Class creates NgSpice Window
class NgspiceWidget(QtGui.QWidget):
"""
- This Class creates NgSpice Window
+ Includes functions that checks whether OS is linux or windows
+ and creates NgSpice window accordingly.
"""
def __init__(self, command, projPath):
@@ -18,12 +20,10 @@ class NgspiceWidget(QtGui.QWidget):
self.layout.addWidget(self.terminal)
print("Argument to ngspice command : ", command)
-
+ # For Linux OS
if platform.system() == 'Linux':
self.command = "cd " + projPath + ";ngspice " + command
# Creating argument for process
- # self.args = ['-into', str(self.terminal.winId()),\
- # '-hold','-e', self.command]
self.args = ['-hold', '-e', self.command]
self.process.start('xterm', self.args)
self.obj_appconfig.process_obj.append(self.process)
@@ -34,6 +34,7 @@ class NgspiceWidget(QtGui.QWidget):
self.process.pid())
)
+ # For Windows OS
elif platform.system() == 'Windows':
tempdir = os.getcwd()
projPath = self.obj_appconfig.current_project["ProjectName"]
diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py
index 298d392c..848d9d54 100644
--- a/src/ngspiceSimulation/pythonPlotting.py
+++ b/src/ngspiceSimulation/pythonPlotting.py
@@ -11,6 +11,7 @@ from configuration.Appconfig import Appconfig
import numpy as np
+# This class creates Python Plotting window
class plotWindow(QtGui.QMainWindow):
def __init__(self, fpath, projectName):
QtGui.QMainWindow.__init__(self)
@@ -114,6 +115,7 @@ class plotWindow(QtGui.QMainWindow):
'; font-weight = bold;')
self.top_grid.addWidget(self.colorLab, i + 3, 1)
+ # Buttons for Plot, multimeter, plotting function.
self.clear = QtGui.QPushButton("Clear")
self.warnning = QtGui.QLabel()
self.funcName = QtGui.QLabel()
@@ -158,7 +160,10 @@ class plotWindow(QtGui.QMainWindow):
self.scrollArea = QtGui.QScrollArea()
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setWidget(self.widget)
-
+ '''
+ Right side box containing checkbox for different inputs and
+ options of plot, multimeter and plot function.
+ '''
self.finalhbox = QtGui.QHBoxLayout()
self.finalhbox.addWidget(self.scrollArea)
@@ -216,8 +221,9 @@ class plotWindow(QtGui.QMainWindow):
QtCore.SIGNAL('clicked()'),
self.onPush_dc)
- self.setCentralWidget(self.mainFrame)
-
+ self.setCentralWidget(self.mainFrame)
+
+ # Defining clear funtion and plot.
def pushedClear(self):
self.text.clear()
self.axes.cla()