src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesDefineGuardsDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
24 def __init__(self, vcs, extension, patchesList, parent=None): 24 def __init__(self, vcs, extension, patchesList, parent=None):
25 """ 25 """
26 Constructor 26 Constructor
27 27
28 @param vcs reference to the vcs object 28 @param vcs reference to the vcs object
29 @param extension reference to the extension module (Queues) 29 @type Hg
30 @param patchesList list of patches (list of strings) 30 @param extension reference to the extension module
31 @param parent reference to the parent widget (QWidget) 31 @type Queues
32 @param patchesList list of patches
33 @type list of str
34 @param parent reference to the parent widget
35 @type QWidget
32 """ 36 """
33 super().__init__(parent) 37 super().__init__(parent)
34 self.setupUi(self) 38 self.setupUi(self)
35 self.setWindowFlags(Qt.WindowType.Window) 39 self.setWindowFlags(Qt.WindowType.Window)
36 40
52 56
53 def closeEvent(self, e): 57 def closeEvent(self, e):
54 """ 58 """
55 Protected slot implementing a close event handler. 59 Protected slot implementing a close event handler.
56 60
57 @param e close event (QCloseEvent) 61 @param e close event
62 @type QCloseEvent
58 """ 63 """
59 if self.__hgClient.isExecuting(): 64 if self.__hgClient.isExecuting():
60 self.__hgClient.cancel() 65 self.__hgClient.cancel()
61 66
62 if self.__dirtyList: 67 if self.__dirtyList:
152 157
153 def __getGuard(self, guard): 158 def __getGuard(self, guard):
154 """ 159 """
155 Private method to get a reference to a named guard. 160 Private method to get a reference to a named guard.
156 161
157 @param guard name of the guard (string) 162 @param guard name of the guard
158 @return reference to the guard item (QListWidgetItem) 163 @type str
164 @return reference to the guard item
165 @rtype QListWidgetItem
159 """ 166 """
160 items = self.guardsList.findItems(guard, Qt.MatchFlag.MatchCaseSensitive) 167 items = self.guardsList.findItems(guard, Qt.MatchFlag.MatchCaseSensitive)
161 if items: 168 if items:
162 return items[0] 169 return items[0]
163 else: 170 else:
166 @pyqtSlot(str) 173 @pyqtSlot(str)
167 def on_guardCombo_editTextChanged(self, txt): 174 def on_guardCombo_editTextChanged(self, txt):
168 """ 175 """
169 Private slot to handle changes of the text of the guard combo. 176 Private slot to handle changes of the text of the guard combo.
170 177
171 @param txt contents of the guard combo line edit (string) 178 @param txt contents of the guard combo line edit
179 @type str
172 """ 180 """
173 self.addButton.setEnabled(txt != "") 181 self.addButton.setEnabled(txt != "")
174 182
175 @pyqtSlot() 183 @pyqtSlot()
176 def on_addButton_clicked(self): 184 def on_addButton_clicked(self):
219 @pyqtSlot(QAbstractButton) 227 @pyqtSlot(QAbstractButton)
220 def on_buttonBox_clicked(self, button): 228 def on_buttonBox_clicked(self, button):
221 """ 229 """
222 Private slot called by a button of the button box clicked. 230 Private slot called by a button of the button box clicked.
223 231
224 @param button button that was clicked (QAbstractButton) 232 @param button button that was clicked
233 @type QAbstractButton
225 """ 234 """
226 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Apply): 235 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Apply):
227 self.__applyGuards() 236 self.__applyGuards()
228 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 237 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
229 self.close() 238 self.close()

eric ide

mercurial