src/eric7/Plugins/VcsPlugins/vcsGit/GitRemoteRepositoriesDialog.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 parent widget (QWidget) 38 @type Git
39 @param parent parent widget
40 @type QWidget
39 """ 41 """
40 super().__init__(parent) 42 super().__init__(parent)
41 self.setupUi(self) 43 self.setupUi(self)
42 44
43 self.vcs = vcs 45 self.vcs = vcs
80 82
81 def __generateItem(self, name, url, oper): 83 def __generateItem(self, name, url, oper):
82 """ 84 """
83 Private method to generate a status item in the status list. 85 Private method to generate a status item in the status list.
84 86
85 @param name name of the remote repository (string) 87 @param name name of the remote repository
86 @param url URL of the remote repository (string) 88 @type str
87 @param oper operation the remote repository may be used for (string) 89 @param url URL of the remote repository
90 @type str
91 @param oper operation the remote repository may be used for
92 @type str
88 """ 93 """
89 foundItems = self.repolist.findItems(name, Qt.MatchFlag.MatchExactly, 0) 94 foundItems = self.repolist.findItems(name, Qt.MatchFlag.MatchExactly, 0)
90 if foundItems: 95 if foundItems:
91 # modify the operations column only 96 # modify the operations column only
92 foundItems[0].setText(2, "{0} + {1}".format(foundItems[0].text(2), oper)) 97 foundItems[0].setText(2, "{0} + {1}".format(foundItems[0].text(2), oper))
95 100
96 def closeEvent(self, e): 101 def closeEvent(self, e):
97 """ 102 """
98 Protected slot implementing a close event handler. 103 Protected slot implementing a close event handler.
99 104
100 @param e close event (QCloseEvent) 105 @param e close event
106 @type QCloseEvent
101 """ 107 """
102 if ( 108 if (
103 self.process is not None 109 self.process is not None
104 and self.process.state() != QProcess.ProcessState.NotRunning 110 and self.process.state() != QProcess.ProcessState.NotRunning
105 ): 111 ):
111 117
112 def start(self, projectDir): 118 def start(self, projectDir):
113 """ 119 """
114 Public slot to start the git remote command. 120 Public slot to start the git remote command.
115 121
116 @param projectDir name of the project directory (string) 122 @param projectDir name of the project directory
123 @type str
117 """ 124 """
118 self.repolist.clear() 125 self.repolist.clear()
119 126
120 self.errorGroup.hide() 127 self.errorGroup.hide()
121 self.intercept = False 128 self.intercept = False
198 205
199 def on_buttonBox_clicked(self, button): 206 def on_buttonBox_clicked(self, button):
200 """ 207 """
201 Private slot called by a button of the button box clicked. 208 Private slot called by a button of the button box clicked.
202 209
203 @param button button that was clicked (QAbstractButton) 210 @param button button that was clicked
211 @type QAbstractButton
204 """ 212 """
205 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 213 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
206 self.close() 214 self.close()
207 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 215 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
208 self.__finish() 216 self.__finish()
212 @pyqtSlot(int, QProcess.ExitStatus) 220 @pyqtSlot(int, QProcess.ExitStatus)
213 def __procFinished(self, exitCode, exitStatus): 221 def __procFinished(self, exitCode, exitStatus):
214 """ 222 """
215 Private slot connected to the finished signal. 223 Private slot connected to the finished signal.
216 224
217 @param exitCode exit code of the process (integer) 225 @param exitCode exit code of the process
218 @param exitStatus exit status of the process (QProcess.ExitStatus) 226 @type int
227 @param exitStatus exit status of the process
228 @type QProcess.ExitStatus
219 """ 229 """
220 self.__finish() 230 self.__finish()
221 231
222 def __readStdout(self): 232 def __readStdout(self):
223 """ 233 """
254 264
255 def on_passwordCheckBox_toggled(self, isOn): 265 def on_passwordCheckBox_toggled(self, isOn):
256 """ 266 """
257 Private slot to handle the password checkbox toggled. 267 Private slot to handle the password checkbox toggled.
258 268
259 @param isOn flag indicating the status of the check box (boolean) 269 @param isOn flag indicating the status of the check box
270 @type bool
260 """ 271 """
261 if isOn: 272 if isOn:
262 self.input.setEchoMode(QLineEdit.EchoMode.Password) 273 self.input.setEchoMode(QLineEdit.EchoMode.Password)
263 else: 274 else:
264 self.input.setEchoMode(QLineEdit.EchoMode.Normal) 275 self.input.setEchoMode(QLineEdit.EchoMode.Normal)
292 303
293 def keyPressEvent(self, evt): 304 def keyPressEvent(self, evt):
294 """ 305 """
295 Protected slot to handle a key press event. 306 Protected slot to handle a key press event.
296 307
297 @param evt the key press event (QKeyEvent) 308 @param evt the key press event
309 @type QKeyEvent
298 """ 310 """
299 if self.intercept: 311 if self.intercept:
300 self.intercept = False 312 self.intercept = False
301 evt.accept() 313 evt.accept()
302 return 314 return

eric ide

mercurial