diff options
author | Pranav P | 2023-05-04 19:26:04 +0530 |
---|---|---|
committer | Pranav P | 2023-05-04 19:26:04 +0530 |
commit | cf6bb2edf063ba6d3415434899e8a73a42755aa0 (patch) | |
tree | b4f043ce7b8266ba3b4227d716b292adfa69e55c /src/ngspiceSimulation | |
parent | 299b330406e6124ba3542833d8cb9b82cfc10d03 (diff) | |
download | eSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.tar.gz eSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.tar.bz2 eSim-cf6bb2edf063ba6d3415434899e8a73a42755aa0.zip |
Disabled multiple simulations
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index f87ab96e..9909dd07 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -8,7 +8,7 @@ import os # This Class creates NgSpice Window class NgspiceWidget(QtWidgets.QWidget): - def __init__(self, command, projPath, timer): + def __init__(self, command, projPath, simulationEssentials): """ - Creates constructor for NgspiceWidget class. - Checks whether OS is Linux or Windows and @@ -18,8 +18,8 @@ class NgspiceWidget(QtWidgets.QWidget): self.obj_appconfig = Appconfig() self.process = QtCore.QProcess(self) self.terminal = QtWidgets.QWidget(self) - self.qTimer = timer - self.progressBarUi = progressBar.Ui_Form(self.process, self.qTimer) + self.simulationEssentials = simulationEssentials + self.progressBarUi = progressBar.Ui_Form(self.process, self.simulationEssentials) self.progressBarUi.setupUi(self.terminal) self.layout = QtWidgets.QVBoxLayout(self) self.layout.addWidget(self.terminal) @@ -52,7 +52,7 @@ class NgspiceWidget(QtWidgets.QWidget): self.process.setWorkingDirectory(projPath) self.process.start('ngspice', self.args) self.process.readyReadStandardOutput.connect(lambda: self.readyReadAll()) - self.process.finished.connect(self.progressBarUi.showProgressCompleted) + self.process.finished.connect(self.finishSimulation) self.obj_appconfig.process_obj.append(self.process) print(self.obj_appconfig.proc_dict) ( @@ -65,6 +65,12 @@ class NgspiceWidget(QtWidgets.QWidget): self.gawProcess.start('sh', ['-c', self.gawCommand]) print(self.gawCommand) + def finishSimulation(self): + self.enableButtons = self.simulationEssentials['enableButtons'] + + self.enableButtons(True) + self.progressBarUi.showProgressCompleted() + @QtCore.pyqtSlot() def readyReadAll(self): self.progressBarUi.writeIntoConsole( |