30 |
30 |
31 def __init__(self, text, parent=None): |
31 def __init__(self, text, parent=None): |
32 """ |
32 """ |
33 Constructor |
33 Constructor |
34 |
34 |
35 @param text text to be shown by the label (string) |
35 @param text text to be shown by the label |
36 @param parent parent widget (QWidget) |
36 @type str |
|
37 @param parent parent widget |
|
38 @type QWidget |
37 """ |
39 """ |
38 super().__init__(parent) |
40 super().__init__(parent) |
39 self.setupUi(self) |
41 self.setupUi(self) |
40 self.setWindowFlags(Qt.WindowType.Window) |
42 self.setWindowFlags(Qt.WindowType.Window) |
41 |
43 |
86 |
88 |
87 def on_buttonBox_clicked(self, button): |
89 def on_buttonBox_clicked(self, button): |
88 """ |
90 """ |
89 Private slot called by a button of the button box clicked. |
91 Private slot called by a button of the button box clicked. |
90 |
92 |
91 @param button button that was clicked (QAbstractButton) |
93 @param button button that was clicked |
|
94 @type QAbstractButton |
92 """ |
95 """ |
93 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
96 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
94 self.close() |
97 self.close() |
95 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
98 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
96 self.__finish() |
99 self.__finish() |
97 |
100 |
98 def __procFinished(self, exitCode, exitStatus): |
101 def __procFinished(self, exitCode, exitStatus): |
99 """ |
102 """ |
100 Private slot connected to the finished signal. |
103 Private slot connected to the finished signal. |
101 |
104 |
102 @param exitCode exit code of the process (integer) |
105 @param exitCode exit code of the process |
103 @param exitStatus exit status of the process (QProcess.ExitStatus) |
106 @type int |
|
107 @param exitStatus exit status of the process |
|
108 @type QProcess.ExitStatus |
104 """ |
109 """ |
105 self.normal = exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0 |
110 self.normal = exitStatus == QProcess.ExitStatus.NormalExit and exitCode == 0 |
106 self.__finish() |
111 self.__finish() |
107 |
112 |
108 def startProcess(self, args, workingDir=None, setLanguage=False): |
113 def startProcess(self, args, workingDir=None, setLanguage=False): |
109 """ |
114 """ |
110 Public slot used to start the process. |
115 Public slot used to start the process. |
111 |
116 |
112 @param args list of arguments for the process (list of strings) |
117 @param args list of arguments for the process |
113 @param workingDir working directory for the process (string) |
118 @type list of str |
114 @param setLanguage flag indicating to set the language to "C" (boolean) |
119 @param workingDir working directory for the process |
|
120 @type str |
|
121 @param setLanguage flag indicating to set the language to "C" |
|
122 @type bool |
115 @return flag indicating a successful start of the process |
123 @return flag indicating a successful start of the process |
|
124 @rtype bool |
116 """ |
125 """ |
117 self.errorGroup.hide() |
126 self.errorGroup.hide() |
118 self.normal = False |
127 self.normal = False |
119 self.intercept = False |
128 self.intercept = False |
120 |
129 |
216 |
226 |
217 def on_passwordCheckBox_toggled(self, isOn): |
227 def on_passwordCheckBox_toggled(self, isOn): |
218 """ |
228 """ |
219 Private slot to handle the password checkbox toggled. |
229 Private slot to handle the password checkbox toggled. |
220 |
230 |
221 @param isOn flag indicating the status of the check box (boolean) |
231 @param isOn flag indicating the status of the check box |
|
232 @type bool |
222 """ |
233 """ |
223 if isOn: |
234 if isOn: |
224 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
235 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
225 else: |
236 else: |
226 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |
237 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |