summaryrefslogtreecommitdiff
path: root/src/frontEnd/TerminalUi.py
diff options
context:
space:
mode:
authorPranav P2023-05-25 14:44:03 +0530
committerPranav P2023-05-25 14:44:03 +0530
commit1129cf1035c1ac520d84c04b384f758e090be0c3 (patch)
tree0e0651fb3c97002f75c5d3a6dad08d120bceef2e /src/frontEnd/TerminalUi.py
parent86ddc4e9de1b957df7839be17c80643131dbd9ff (diff)
downloadeSim-1129cf1035c1ac520d84c04b384f758e090be0c3.tar.gz
eSim-1129cf1035c1ac520d84c04b384f758e090be0c3.tar.bz2
eSim-1129cf1035c1ac520d84c04b384f758e090be0c3.zip
Added sphinx docstring documentation to newly added functions and removed some unnecessary variables
Diffstat (limited to 'src/frontEnd/TerminalUi.py')
-rw-r--r--src/frontEnd/TerminalUi.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/frontEnd/TerminalUi.py b/src/frontEnd/TerminalUi.py
index 4d6e6d23..ecf93ee2 100644
--- a/src/frontEnd/TerminalUi.py
+++ b/src/frontEnd/TerminalUi.py
@@ -95,6 +95,12 @@ class Ui_Form(object):
self.redo_simulation_button.clicked.connect(self.redoSimulation)
def writeSimulationStatusToConsole(self, isSuccess):
+ """Writes simulation status to the console with appropriate style
+ to the :class:`Form_Ui` console.
+
+ :param isSuccess: A boolean flag used to indicate whether the simulation was a success or not
+ :type isSuccess: bool
+ """
failedFormat = '<span style="color:#ff3333;">{}</span>'
successFormat = '<span style="color:#00ff00;">{}</span>'
@@ -103,12 +109,10 @@ class Ui_Form(object):
self.simulationConsole.append(successFormat.format("Simulation Completed Successfully!"))
else:
self.simulationConsole.append(failedFormat.format("Simulation Failed!"))
-
- def showProgressCompleted(self):
- self.progressBar.setMaximum(100)
- self.progressBar.setProperty("value", 100)
def cancelSimulation(self):
+ """This function cancels the ongoing ngspice simulation.
+ """
if (self.qProcess.state() == QtCore.QProcess.NotRunning):
return
cancelFormat = '<span style="color:#3385ff;">{}</span>'
@@ -124,6 +128,8 @@ class Ui_Form(object):
)
def redoSimulation(self):
+ """This function reruns the ngspice simulation
+ """
if (self.qProcess.state() == QtCore.QProcess.Running):
return
@@ -135,6 +141,8 @@ class Ui_Form(object):
self.qProcess.start('ngspice', self.args)
def changeColor(self):
+ """Toggles the :class:`Ui_Form` console between dark mode and light mode
+ """
if self.dark_color is True:
self.simulationConsole.setStyleSheet("QTextEdit {\n"
" background-color: white;\n"