34 def __init__(self, vcs, parent=None): |
34 def __init__(self, vcs, parent=None): |
35 """ |
35 """ |
36 Constructor |
36 Constructor |
37 |
37 |
38 @param vcs reference to the vcs object |
38 @param vcs reference to the vcs object |
39 @param parent reference to the parent widget (QWidget) |
39 @type Git |
|
40 @param parent reference to the parent widget |
|
41 @type QWidget |
40 """ |
42 """ |
41 super().__init__(parent) |
43 super().__init__(parent) |
42 self.setupUi(self) |
44 self.setupUi(self) |
43 self.setWindowFlags(Qt.WindowType.Window) |
45 self.setWindowFlags(Qt.WindowType.Window) |
44 |
46 |
68 |
70 |
69 def closeEvent(self, e): |
71 def closeEvent(self, e): |
70 """ |
72 """ |
71 Protected slot implementing a close event handler. |
73 Protected slot implementing a close event handler. |
72 |
74 |
73 @param e close event (QCloseEvent) |
75 @param e close event |
|
76 @type QCloseEvent |
74 """ |
77 """ |
75 if ( |
78 if ( |
76 self.process is not None |
79 self.process is not None |
77 and self.process.state() != QProcess.ProcessState.NotRunning |
80 and self.process.state() != QProcess.ProcessState.NotRunning |
78 ): |
81 ): |
160 |
163 |
161 def on_buttonBox_clicked(self, button): |
164 def on_buttonBox_clicked(self, button): |
162 """ |
165 """ |
163 Private slot called by a button of the button box clicked. |
166 Private slot called by a button of the button box clicked. |
164 |
167 |
165 @param button button that was clicked (QAbstractButton) |
168 @param button button that was clicked |
|
169 @type QAbstractButton |
166 """ |
170 """ |
167 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
171 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
168 self.close() |
172 self.close() |
169 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
173 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
170 self.__finish() |
174 self.__finish() |
172 @pyqtSlot(int, QProcess.ExitStatus) |
176 @pyqtSlot(int, QProcess.ExitStatus) |
173 def __procFinished(self, exitCode, exitStatus): |
177 def __procFinished(self, exitCode, exitStatus): |
174 """ |
178 """ |
175 Private slot connected to the finished signal. |
179 Private slot connected to the finished signal. |
176 |
180 |
177 @param exitCode exit code of the process (integer) |
181 @param exitCode exit code of the process |
178 @param exitStatus exit status of the process (QProcess.ExitStatus) |
182 @type int |
|
183 @param exitStatus exit status of the process |
|
184 @type QProcess.ExitStatus |
179 """ |
185 """ |
180 self.__finish() |
186 self.__finish() |
181 |
187 |
182 def __resizeColumns(self): |
188 def __resizeColumns(self): |
183 """ |
189 """ |
282 @pyqtSlot(bool) |
288 @pyqtSlot(bool) |
283 def on_passwordCheckBox_toggled(self, checked): |
289 def on_passwordCheckBox_toggled(self, checked): |
284 """ |
290 """ |
285 Private slot to handle the password checkbox toggled. |
291 Private slot to handle the password checkbox toggled. |
286 |
292 |
287 @param checked flag indicating the status of the check box (boolean) |
293 @param checked flag indicating the status of the check box |
|
294 @type bool |
288 """ |
295 """ |
289 if checked: |
296 if checked: |
290 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
297 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
291 else: |
298 else: |
292 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |
299 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |
293 |
300 |
294 def keyPressEvent(self, evt): |
301 def keyPressEvent(self, evt): |
295 """ |
302 """ |
296 Protected slot to handle a key press event. |
303 Protected slot to handle a key press event. |
297 |
304 |
298 @param evt the key press event (QKeyEvent) |
305 @param evt the key press event |
|
306 @type QKeyEvent |
299 """ |
307 """ |
300 if self.intercept: |
308 if self.intercept: |
301 self.intercept = False |
309 self.intercept = False |
302 evt.accept() |
310 evt.accept() |
303 return |
311 return |