diff options
author | Sumanto Kar | 2025-05-05 19:46:51 +0530 |
---|---|---|
committer | GitHub | 2025-05-05 19:46:51 +0530 |
commit | 2e6fcc49286ae4998ec57eef3359312d5978c105 (patch) | |
tree | 88dffebb4ed2329355d547c7fd7372cb391acea7 /src/frontEnd/Application.py | |
parent | 19f442b73bcdc5fc4818dc2e47b7c0d8e8194fb0 (diff) | |
parent | e0a9a28c1413d5e9068b578134bdd0cd535209b3 (diff) | |
download | eSim-2e6fcc49286ae4998ec57eef3359312d5978c105.tar.gz eSim-2e6fcc49286ae4998ec57eef3359312d5978c105.tar.bz2 eSim-2e6fcc49286ae4998ec57eef3359312d5978c105.zip |
Merge pull request #322 from 092vk/doubleSimulation
Enabled Dual Plotting for Simulation
Diffstat (limited to 'src/frontEnd/Application.py')
-rw-r--r-- | src/frontEnd/Application.py | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 5d76bf9d..ea286651 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -58,6 +58,9 @@ class Application(QtWidgets.QMainWindow): # Set slot for simulation end signal to plot simulation data self.simulationEndSignal.connect(self.plotSimulationData) + #the plotFlag + self.plotFlag = False + # Creating require Object self.obj_workspace = Workspace.Workspace() self.obj_Mainview = MainView() @@ -188,7 +191,7 @@ class Application(QtWidgets.QMainWindow): QtGui.QIcon(init_path + 'images/ngspice.png'), '<b>Simulate</b>', self ) - self.ngspice.triggered.connect(self.open_ngspice) + self.ngspice.triggered.connect(self.plotFlagPopBox) self.model = QtWidgets.QAction( QtGui.QIcon(init_path + 'images/model.png'), @@ -247,6 +250,27 @@ class Application(QtWidgets.QMainWindow): self.lefttoolbar.setOrientation(QtCore.Qt.Vertical) self.lefttoolbar.setIconSize(QSize(40, 40)) + def plotFlagPopBox(self): + """This function displays a pop-up box with message- Do you want Ngspice plots? and oprions Yes and NO. + + If the user clicks on Yes, both the NgSpice and python plots are displayed and if No is clicked then only the python plots.""" + + msg_box = QtWidgets.QMessageBox(self) + msg_box.setWindowTitle("Ngspice Plots") + msg_box.setText("Do you want Ngspice plots?") + + yes_button = msg_box.addButton("Yes", QtWidgets.QMessageBox.YesRole) + no_button = msg_box.addButton("No", QtWidgets.QMessageBox.NoRole) + + msg_box.exec_() + + if msg_box.clickedButton() == yes_button: + self.plotFlag = True + else: + self.plotFlag = False + + self.open_ngspice() + def closeEvent(self, event): ''' This function closes the ongoing program (process). @@ -438,7 +462,7 @@ class Application(QtWidgets.QMainWindow): return self.obj_Mainview.obj_dockarea.ngspiceEditor( - projName, ngspiceNetlist, self.simulationEndSignal) + projName, ngspiceNetlist, self.simulationEndSignal, self.plotFlag) self.ngspice.setEnabled(False) self.conversion.setEnabled(False) |