src/eric7/Plugins/VcsPlugins/vcsGit/GitBisectLogBrowserDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
39 def __init__(self, vcs, parent=None): 39 def __init__(self, vcs, parent=None):
40 """ 40 """
41 Constructor 41 Constructor
42 42
43 @param vcs reference to the vcs object 43 @param vcs reference to the vcs object
44 @param parent reference to the parent widget (QWidget) 44 @type Git
45 @param parent reference to the parent widget
46 @type QWidget
45 """ 47 """
46 super().__init__(parent) 48 super().__init__(parent)
47 self.setupUi(self) 49 self.setupUi(self)
48 50
49 self.__position = QPoint() 51 self.__position = QPoint()
80 82
81 def closeEvent(self, e): 83 def closeEvent(self, e):
82 """ 84 """
83 Protected slot implementing a close event handler. 85 Protected slot implementing a close event handler.
84 86
85 @param e close event (QCloseEvent) 87 @param e close event
88 @type QCloseEvent
86 """ 89 """
87 if ( 90 if (
88 self.__process is not None 91 self.__process is not None
89 and self.__process.state() != QProcess.ProcessState.NotRunning 92 and self.__process.state() != QProcess.ProcessState.NotRunning
90 ): 93 ):
121 124
122 def __generateLogItem(self, commitId, operation, subject): 125 def __generateLogItem(self, commitId, operation, subject):
123 """ 126 """
124 Private method to generate a bisect log tree entry. 127 Private method to generate a bisect log tree entry.
125 128
126 @param commitId commit id info (string) 129 @param commitId commit id info
127 @param operation bisect operation (string) 130 @type str
128 @param subject subject of the bisect log entry (string) 131 @param operation bisect operation
129 @return reference to the generated item (QTreeWidgetItem) 132 @type str
133 @param subject subject of the bisect log entry
134 @type str
135 @return reference to the generated item
136 @rtype QTreeWidgetItem
130 """ 137 """
131 columnLabels = [ 138 columnLabels = [
132 commitId, 139 commitId,
133 operation, 140 operation,
134 subject, 141 subject,
179 186
180 def start(self, projectdir): 187 def start(self, projectdir):
181 """ 188 """
182 Public slot to start the git bisect log command. 189 Public slot to start the git bisect log command.
183 190
184 @param projectdir directory name of the project (string) 191 @param projectdir directory name of the project
192 @type str
185 """ 193 """
186 self.errorGroup.hide() 194 self.errorGroup.hide()
187 QApplication.processEvents() 195 QApplication.processEvents()
188 196
189 self.__initData() 197 self.__initData()
202 @pyqtSlot(int, QProcess.ExitStatus) 210 @pyqtSlot(int, QProcess.ExitStatus)
203 def __procFinished(self, exitCode, exitStatus): 211 def __procFinished(self, exitCode, exitStatus):
204 """ 212 """
205 Private slot connected to the finished signal. 213 Private slot connected to the finished signal.
206 214
207 @param exitCode exit code of the process (integer) 215 @param exitCode exit code of the process
208 @param exitStatus exit status of the process (QProcess.ExitStatus) 216 @type int
217 @param exitStatus exit status of the process
218 @type QProcess.ExitStatus
209 """ 219 """
210 self.__processBuffer() 220 self.__processBuffer()
211 self.__finish() 221 self.__finish()
212 222
213 def __finish(self): 223 def __finish(self):
291 301
292 def __showError(self, out): 302 def __showError(self, out):
293 """ 303 """
294 Private slot to show some error. 304 Private slot to show some error.
295 305
296 @param out error to be shown (string) 306 @param out error to be shown
307 @type str
297 """ 308 """
298 self.errorGroup.show() 309 self.errorGroup.show()
299 self.errors.insertPlainText(out) 310 self.errors.insertPlainText(out)
300 self.errors.ensureCursorVisible() 311 self.errors.ensureCursorVisible()
301 312
302 def on_buttonBox_clicked(self, button): 313 def on_buttonBox_clicked(self, button):
303 """ 314 """
304 Private slot called by a button of the button box clicked. 315 Private slot called by a button of the button box clicked.
305 316
306 @param button button that was clicked (QAbstractButton) 317 @param button button that was clicked
318 @type QAbstractButton
307 """ 319 """
308 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 320 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
309 self.close() 321 self.close()
310 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 322 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
311 self.cancelled = True 323 self.cancelled = True
329 341
330 def on_passwordCheckBox_toggled(self, isOn): 342 def on_passwordCheckBox_toggled(self, isOn):
331 """ 343 """
332 Private slot to handle the password checkbox toggled. 344 Private slot to handle the password checkbox toggled.
333 345
334 @param isOn flag indicating the status of the check box (boolean) 346 @param isOn flag indicating the status of the check box
347 @type bool
335 """ 348 """
336 if isOn: 349 if isOn:
337 self.input.setEchoMode(QLineEdit.EchoMode.Password) 350 self.input.setEchoMode(QLineEdit.EchoMode.Password)
338 else: 351 else:
339 self.input.setEchoMode(QLineEdit.EchoMode.Normal) 352 self.input.setEchoMode(QLineEdit.EchoMode.Normal)
368 381
369 def keyPressEvent(self, evt): 382 def keyPressEvent(self, evt):
370 """ 383 """
371 Protected slot to handle a key press event. 384 Protected slot to handle a key press event.
372 385
373 @param evt the key press event (QKeyEvent) 386 @param evt the key press event
387 @type QKeyEvent
374 """ 388 """
375 if self.intercept: 389 if self.intercept:
376 self.intercept = False 390 self.intercept = False
377 evt.accept() 391 evt.accept()
378 return 392 return

eric ide

mercurial