diff options
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 9 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 12 |
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() |