diff options
author | Pranav P | 2023-05-07 17:01:26 +0530 |
---|---|---|
committer | Pranav P | 2023-05-07 17:01:26 +0530 |
commit | 2de5fa0604c35a1508bca8bab318724da823633a (patch) | |
tree | 81a8f07a61c4f1841a49074d0349e13da9ab5461 /src/progressBar/progressBar.py | |
parent | cf6bb2edf063ba6d3415434899e8a73a42755aa0 (diff) | |
download | eSim-2de5fa0604c35a1508bca8bab318724da823633a.tar.gz eSim-2de5fa0604c35a1508bca8bab318724da823633a.tar.bz2 eSim-2de5fa0604c35a1508bca8bab318724da823633a.zip |
Mentions whether simulation successful or not
Diffstat (limited to 'src/progressBar/progressBar.py')
-rw-r--r-- | src/progressBar/progressBar.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/progressBar/progressBar.py b/src/progressBar/progressBar.py index 4bc1e982..f0aa964f 100644 --- a/src/progressBar/progressBar.py +++ b/src/progressBar/progressBar.py @@ -16,12 +16,13 @@ class Ui_Form(object): self.qProcess = qProcess self.qTimer = simulationEssentials['timer'] self.enableButtons = simulationEssentials['enableButtons'] + self.isSimulationSuccess = simulationEssentials['isSimulationSuccess'] # super().__init__() def setupUi(self, Form): Form.setObjectName("Form") Form.resize(1244, 644) self.verticalLayoutWidget = QtWidgets.QWidget(Form) - self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 1131, 481)) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 1131, 471)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) @@ -99,6 +100,15 @@ class Ui_Form(object): def writeIntoConsole(self, consoleLog): self.simulationConsole.insertPlainText(consoleLog) + + def writeSimulationStatusToConsole(self, isSuccess): + failedFormat = '<span style="color:red;">{}</span>' + successFormat = '<span style="color:green;">{}</span>' + + if isSuccess: + self.simulationConsole.append(successFormat.format("Simulation Completed Successfully!")) + else: + self.simulationConsole.append(failedFormat.format("Simulation Failed!")) def showProgressCompleted(self): self.progressBar.setMaximum(100) |