diff options
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py new file mode 100644 index 00000000..51e41144 --- /dev/null +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -0,0 +1,26 @@ +from PyQt4 import QtGui,QtCore + + +class NgspiceWidget(QtGui.QWidget): + """ + This Class creates NgSpice Window + """ + def __init__(self,command): + QtGui.QWidget.__init__(self) + self.command = "ngspice "+command + + self.process = QtCore.QProcess(self) + self.terminal = QtGui.QWidget(self) + self.layout = QtGui.QVBoxLayout(self) + self.layout.addWidget(self.terminal) + + #Creating argument for process + self.args = ['-into', str(self.terminal.winId()),'-e', self.command] + self.process.start('xterm', self.args) + + + + + + + |