23 def __init__(self, vcs, parent=None): |
23 def __init__(self, vcs, parent=None): |
24 """ |
24 """ |
25 Constructor |
25 Constructor |
26 |
26 |
27 @param vcs reference to the vcs object |
27 @param vcs reference to the vcs object |
28 @param parent reference to the parent widget (QWidget) |
28 @type Hg |
|
29 @param parent reference to the parent widget |
|
30 @type QWidget |
29 """ |
31 """ |
30 super().__init__(parent) |
32 super().__init__(parent) |
31 self.setupUi(self) |
33 self.setupUi(self) |
32 self.setWindowFlags(Qt.WindowType.Window) |
34 self.setWindowFlags(Qt.WindowType.Window) |
33 |
35 |
42 |
44 |
43 def closeEvent(self, e): |
45 def closeEvent(self, e): |
44 """ |
46 """ |
45 Protected slot implementing a close event handler. |
47 Protected slot implementing a close event handler. |
46 |
48 |
47 @param e close event (QCloseEvent) |
49 @param e close event |
|
50 @type QCloseEvent |
48 """ |
51 """ |
49 if self.__hgClient.isExecuting(): |
52 if self.__hgClient.isExecuting(): |
50 self.__hgClient.cancel() |
53 self.__hgClient.cancel() |
51 |
54 |
52 e.accept() |
55 e.accept() |
92 |
95 |
93 def on_buttonBox_clicked(self, button): |
96 def on_buttonBox_clicked(self, button): |
94 """ |
97 """ |
95 Private slot called by a button of the button box clicked. |
98 Private slot called by a button of the button box clicked. |
96 |
99 |
97 @param button button that was clicked (QAbstractButton) |
100 @param button button that was clicked |
|
101 @type QAbstractButton |
98 """ |
102 """ |
99 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
103 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
100 self.close() |
104 self.close() |
101 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
105 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
102 self.__hgClient.cancel() |
106 self.__hgClient.cancel() |
121 |
125 |
122 def __generateItem(self, revision, changeset, signature): |
126 def __generateItem(self, revision, changeset, signature): |
123 """ |
127 """ |
124 Private method to generate a patch item in the list of patches. |
128 Private method to generate a patch item in the list of patches. |
125 |
129 |
126 @param revision revision number (string) |
130 @param revision revision number |
127 @param changeset changeset of the bookmark (string) |
131 @type str |
128 @param signature signature of the changeset (string) |
132 @param changeset changeset of the bookmark |
|
133 @type str |
|
134 @param signature signature of the changeset |
|
135 @type str |
129 """ |
136 """ |
130 if revision == "" and changeset == "": |
137 if revision == "" and changeset == "": |
131 QTreeWidgetItem(self.signaturesList, [signature]) |
138 QTreeWidgetItem(self.signaturesList, [signature]) |
132 else: |
139 else: |
133 revString = "{0:>7}:{1}".format(revision, changeset) |
140 revString = "{0:>7}:{1}".format(revision, changeset) |
149 |
156 |
150 def __processOutputLine(self, line): |
157 def __processOutputLine(self, line): |
151 """ |
158 """ |
152 Private method to process the lines of output. |
159 Private method to process the lines of output. |
153 |
160 |
154 @param line output line to be processed (string) |
161 @param line output line to be processed |
|
162 @type str |
155 """ |
163 """ |
156 li = line.split() |
164 li = line.split() |
157 if li[-1][0] in "1234567890": |
165 if li[-1][0] in "1234567890": |
158 # last element is a rev:changeset |
166 # last element is a rev:changeset |
159 rev, changeset = li[-1].split(":", 1) |
167 rev, changeset = li[-1].split(":", 1) |
163 |
171 |
164 def __showError(self, out): |
172 def __showError(self, out): |
165 """ |
173 """ |
166 Private slot to show some error. |
174 Private slot to show some error. |
167 |
175 |
168 @param out error to be shown (string) |
176 @param out error to be shown |
|
177 @type str |
169 """ |
178 """ |
170 self.errorGroup.show() |
179 self.errorGroup.show() |
171 self.errors.insertPlainText(out) |
180 self.errors.insertPlainText(out) |
172 self.errors.ensureCursorVisible() |
181 self.errors.ensureCursorVisible() |
173 |
182 |
206 @pyqtSlot(str) |
215 @pyqtSlot(str) |
207 def on_rxEdit_textChanged(self, txt): |
216 def on_rxEdit_textChanged(self, txt): |
208 """ |
217 """ |
209 Private slot called, when a filter expression is entered. |
218 Private slot called, when a filter expression is entered. |
210 |
219 |
211 @param txt filter expression (string) |
220 @param txt filter expression |
|
221 @type str |
212 """ |
222 """ |
213 self.__filterSignatures() |
223 self.__filterSignatures() |
214 |
224 |
215 def __filterSignatures(self): |
225 def __filterSignatures(self): |
216 """ |
226 """ |