src/eric7/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
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
166 175
167 def normalExit(self): 176 def normalExit(self):
168 """ 177 """
169 Public method to check for a normal process termination. 178 Public method to check for a normal process termination.
170 179
171 @return flag indicating normal process termination (boolean) 180 @return flag indicating normal process termination
181 @rtype bool
172 """ 182 """
173 return self.normal 183 return self.normal
174 184
175 def __readStdout(self): 185 def __readStdout(self):
176 """ 186 """
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)
254 265
255 def keyPressEvent(self, evt): 266 def keyPressEvent(self, evt):
256 """ 267 """
257 Protected slot to handle a key press event. 268 Protected slot to handle a key press event.
258 269
259 @param evt the key press event (QKeyEvent) 270 @param evt the key press event
271 @type QKeyEvent
260 """ 272 """
261 if self.intercept: 273 if self.intercept:
262 self.intercept = False 274 self.intercept = False
263 evt.accept() 275 evt.accept()
264 return 276 return
266 278
267 def hasAddOrDelete(self): 279 def hasAddOrDelete(self):
268 """ 280 """
269 Public method to check, if the last action contained an add or delete. 281 Public method to check, if the last action contained an add or delete.
270 282
271 @return flag indicating the presence of an add or delete (boolean) 283 @return flag indicating the presence of an add or delete
284 @rtype bool
272 """ 285 """
273 return self.__hasAddOrDelete 286 return self.__hasAddOrDelete

eric ide

mercurial