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 Subversion |
|
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 self.setWindowFlags(Qt.WindowType.Window) |
44 self.setWindowFlags(Qt.WindowType.Window) |
43 |
45 |
59 |
61 |
60 def closeEvent(self, e): |
62 def closeEvent(self, e): |
61 """ |
63 """ |
62 Protected slot implementing a close event handler. |
64 Protected slot implementing a close event handler. |
63 |
65 |
64 @param e close event (QCloseEvent) |
66 @param e close event |
|
67 @type QCloseEvent |
65 """ |
68 """ |
66 if ( |
69 if ( |
67 self.process is not None |
70 self.process is not None |
68 and self.process.state() != QProcess.ProcessState.NotRunning |
71 and self.process.state() != QProcess.ProcessState.NotRunning |
69 ): |
72 ): |
75 |
78 |
76 def start(self, fn): |
79 def start(self, fn): |
77 """ |
80 """ |
78 Public slot to start the svn blame command. |
81 Public slot to start the svn blame command. |
79 |
82 |
80 @param fn filename to show the blame for (string) |
83 @param fn filename to show the blame for |
|
84 @type str |
81 """ |
85 """ |
82 self.blameList.clear() |
86 self.blameList.clear() |
83 self.errorGroup.hide() |
87 self.errorGroup.hide() |
84 self.intercept = False |
88 self.intercept = False |
85 self.activateWindow() |
89 self.activateWindow() |
140 |
144 |
141 def on_buttonBox_clicked(self, button): |
145 def on_buttonBox_clicked(self, button): |
142 """ |
146 """ |
143 Private slot called by a button of the button box clicked. |
147 Private slot called by a button of the button box clicked. |
144 |
148 |
145 @param button button that was clicked (QAbstractButton) |
149 @param button button that was clicked |
|
150 @type QAbstractButton |
146 """ |
151 """ |
147 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
152 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
148 self.close() |
153 self.close() |
149 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
154 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
150 self.__finish() |
155 self.__finish() |
152 @pyqtSlot(int, QProcess.ExitStatus) |
157 @pyqtSlot(int, QProcess.ExitStatus) |
153 def __procFinished(self, exitCode, exitStatus): |
158 def __procFinished(self, exitCode, exitStatus): |
154 """ |
159 """ |
155 Private slot connected to the finished signal. |
160 Private slot connected to the finished signal. |
156 |
161 |
157 @param exitCode exit code of the process (integer) |
162 @param exitCode exit code of the process |
158 @param exitStatus exit status of the process (QProcess.ExitStatus) |
163 @type int |
|
164 @param exitStatus exit status of the process |
|
165 @type QProcess.ExitStatus |
159 """ |
166 """ |
160 self.__finish() |
167 self.__finish() |
161 |
168 |
162 def __resizeColumns(self): |
169 def __resizeColumns(self): |
163 """ |
170 """ |
167 |
174 |
168 def __generateItem(self, revision, author, text): |
175 def __generateItem(self, revision, author, text): |
169 """ |
176 """ |
170 Private method to generate a blame item in the blame list. |
177 Private method to generate a blame item in the blame list. |
171 |
178 |
172 @param revision revision string (string) |
179 @param revision revision string |
173 @param author author of the change (string) |
180 @type str |
174 @param text line of text from the annotated file (string) |
181 @param author author of the change |
|
182 @type str |
|
183 @param text line of text from the annotated file |
|
184 @type str |
175 """ |
185 """ |
176 itm = QTreeWidgetItem( |
186 itm = QTreeWidgetItem( |
177 self.blameList, [revision, author, "{0:d}".format(self.lineno), text] |
187 self.blameList, [revision, author, "{0:d}".format(self.lineno), text] |
178 ) |
188 ) |
179 self.lineno += 1 |
189 self.lineno += 1 |
218 |
228 |
219 def on_passwordCheckBox_toggled(self, isOn): |
229 def on_passwordCheckBox_toggled(self, isOn): |
220 """ |
230 """ |
221 Private slot to handle the password checkbox toggled. |
231 Private slot to handle the password checkbox toggled. |
222 |
232 |
223 @param isOn flag indicating the status of the check box (boolean) |
233 @param isOn flag indicating the status of the check box |
|
234 @type bool |
224 """ |
235 """ |
225 if isOn: |
236 if isOn: |
226 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
237 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
227 else: |
238 else: |
228 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |
239 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |