src/eric7/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
26 def __init__(self, vcs, parent=None): 26 def __init__(self, vcs, parent=None):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param vcs reference to the vcs object 30 @param vcs reference to the vcs object
31 @param parent parent widget (QWidget) 31 @type Hg
32 @param parent parent widget
33 @type QWidget
32 """ 34 """
33 super().__init__(parent) 35 super().__init__(parent)
34 self.setupUi(self) 36 self.setupUi(self)
35 self.setWindowFlags(Qt.WindowType.Window) 37 self.setWindowFlags(Qt.WindowType.Window)
36 38
53 55
54 def closeEvent(self, e): 56 def closeEvent(self, e):
55 """ 57 """
56 Protected slot implementing a close event handler. 58 Protected slot implementing a close event handler.
57 59
58 @param e close event (QCloseEvent) 60 @param e close event
61 @type QCloseEvent
59 """ 62 """
60 if self.__hgClient.isExecuting(): 63 if self.__hgClient.isExecuting():
61 self.__hgClient.cancel() 64 self.__hgClient.cancel()
62 65
63 e.accept() 66 e.accept()
144 147
145 def on_buttonBox_clicked(self, button): 148 def on_buttonBox_clicked(self, button):
146 """ 149 """
147 Private slot called by a button of the button box clicked. 150 Private slot called by a button of the button box clicked.
148 151
149 @param button button that was clicked (QAbstractButton) 152 @param button button that was clicked
153 @type QAbstractButton
150 """ 154 """
151 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 155 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
152 self.close() 156 self.close()
153 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 157 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
154 if self.__hgClient: 158 if self.__hgClient:
166 170
167 def __generateItem(self, marker, revision, changeset, author, date, text): 171 def __generateItem(self, marker, revision, changeset, author, date, text):
168 """ 172 """
169 Private method to generate an annotate item in the annotation list. 173 Private method to generate an annotate item in the annotation list.
170 174
171 @param marker marker character for skipped revisions (string) 175 @param marker marker character for skipped revisions
172 @param revision revision string (string) 176 @type str
173 @param changeset changeset string (string) 177 @param revision revision string
174 @param author author of the change (string) 178 @type str
175 @param date date of the change (string) 179 @param changeset changeset string
176 @param text text of the change (string) 180 @type str
181 @param author author of the change
182 @type str
183 @param date date of the change
184 @type str
185 @param text text of the change
186 @type str
177 """ 187 """
178 itm = QTreeWidgetItem( 188 itm = QTreeWidgetItem(
179 self.annotateList, 189 self.annotateList,
180 [ 190 [
181 marker, 191 marker,
198 208
199 def __processOutputLine(self, line): 209 def __processOutputLine(self, line):
200 """ 210 """
201 Private method to process the lines of output. 211 Private method to process the lines of output.
202 212
203 @param line output line to be processed (string) 213 @param line output line to be processed
214 @type str
204 """ 215 """
205 match = self.__annotateRe.match(line) 216 match = self.__annotateRe.match(line)
206 author, rev, changeset, date, file, marker, text = match.groups() 217 author, rev, changeset, date, file, marker, text = match.groups()
207 if marker == ":": 218 if marker == ":":
208 marker = "" 219 marker = ""
212 223
213 def __showError(self, out): 224 def __showError(self, out):
214 """ 225 """
215 Private slot to show some error. 226 Private slot to show some error.
216 227
217 @param out error to be shown (string) 228 @param out error to be shown
229 @type str
218 """ 230 """
219 self.errorGroup.show() 231 self.errorGroup.show()
220 self.errors.insertPlainText(out) 232 self.errors.insertPlainText(out)
221 self.errors.ensureCursorVisible() 233 self.errors.ensureCursorVisible()

eric ide

mercurial