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

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
33 def __init__(self, vcs, parent=None): 33 def __init__(self, vcs, parent=None):
34 """ 34 """
35 Constructor 35 Constructor
36 36
37 @param vcs reference to the vcs object 37 @param vcs reference to the vcs object
38 @param parent reference to the parent widget (QWidget) 38 @type Git
39 @param parent reference to the parent widget
40 @type QWidget
39 """ 41 """
40 super().__init__(parent) 42 super().__init__(parent)
41 self.setupUi(self) 43 self.setupUi(self)
42 self.setWindowFlags(Qt.WindowType.Window) 44 self.setWindowFlags(Qt.WindowType.Window)
43 45
59 61
60 def closeEvent(self, e): 62 def closeEvent(self, e):
61 """ 63 """
62 Protected slot implementing a close event handler. 64 Protected slot implementing a close event handler.
63 65
64 @param e close event (QCloseEvent) 66 @param e close event
67 @type QCloseEvent
65 """ 68 """
66 if ( 69 if (
67 self.process is not None 70 self.process is not None
68 and self.process.state() != QProcess.ProcessState.NotRunning 71 and self.process.state() != QProcess.ProcessState.NotRunning
69 ): 72 ):
75 78
76 def start(self, path, commits): 79 def start(self, path, commits):
77 """ 80 """
78 Public slot to start the tag/branch list command. 81 Public slot to start the tag/branch list command.
79 82
80 @param path name of directory to be listed (string) 83 @param path name of directory to be listed
81 @param commits list of commits to be described (list of string) 84 @type str
85 @param commits list of commits to be described
86 @type list of str
82 """ 87 """
83 self.tagList.clear() 88 self.tagList.clear()
84 self.errorGroup.hide() 89 self.errorGroup.hide()
85 90
86 self.intercept = False 91 self.intercept = False
153 158
154 def on_buttonBox_clicked(self, button): 159 def on_buttonBox_clicked(self, button):
155 """ 160 """
156 Private slot called by a button of the button box clicked. 161 Private slot called by a button of the button box clicked.
157 162
158 @param button button that was clicked (QAbstractButton) 163 @param button button that was clicked
164 @type QAbstractButton
159 """ 165 """
160 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 166 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
161 self.close() 167 self.close()
162 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 168 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
163 self.__finish() 169 self.__finish()
165 @pyqtSlot(int, QProcess.ExitStatus) 171 @pyqtSlot(int, QProcess.ExitStatus)
166 def __procFinished(self, exitCode, exitStatus): 172 def __procFinished(self, exitCode, exitStatus):
167 """ 173 """
168 Private slot connected to the finished signal. 174 Private slot connected to the finished signal.
169 175
170 @param exitCode exit code of the process (integer) 176 @param exitCode exit code of the process
171 @param exitStatus exit status of the process (QProcess.ExitStatus) 177 @type int
178 @param exitStatus exit status of the process
179 @type QProcess.ExitStatus
172 """ 180 """
173 if self.__tagInfoLines: 181 if self.__tagInfoLines:
174 if self.__commits: 182 if self.__commits:
175 for commit, tagInfo in zip(self.__commits, self.__tagInfoLines): 183 for commit, tagInfo in zip(self.__commits, self.__tagInfoLines):
176 QTreeWidgetItem(self.tagList, [commit, tagInfo]) 184 QTreeWidgetItem(self.tagList, [commit, tagInfo])
229 237
230 def on_passwordCheckBox_toggled(self, isOn): 238 def on_passwordCheckBox_toggled(self, isOn):
231 """ 239 """
232 Private slot to handle the password checkbox toggled. 240 Private slot to handle the password checkbox toggled.
233 241
234 @param isOn flag indicating the status of the check box (boolean) 242 @param isOn flag indicating the status of the check box
243 @type bool
235 """ 244 """
236 if isOn: 245 if isOn:
237 self.input.setEchoMode(QLineEdit.EchoMode.Password) 246 self.input.setEchoMode(QLineEdit.EchoMode.Password)
238 else: 247 else:
239 self.input.setEchoMode(QLineEdit.EchoMode.Normal) 248 self.input.setEchoMode(QLineEdit.EchoMode.Normal)
267 276
268 def keyPressEvent(self, evt): 277 def keyPressEvent(self, evt):
269 """ 278 """
270 Protected slot to handle a key press event. 279 Protected slot to handle a key press event.
271 280
272 @param evt the key press event (QKeyEvent) 281 @param evt the key press event
282 @type QKeyEvent
273 """ 283 """
274 if self.intercept: 284 if self.intercept:
275 self.intercept = False 285 self.intercept = False
276 evt.accept() 286 evt.accept()
277 return 287 return

eric ide

mercurial