28 def __init__(self, vcs, parent=None): |
28 def __init__(self, vcs, parent=None): |
29 """ |
29 """ |
30 Constructor |
30 Constructor |
31 |
31 |
32 @param vcs reference to the vcs object |
32 @param vcs reference to the vcs object |
33 @param parent parent widget (QWidget) |
33 @type Subversion |
|
34 @param parent parent widget |
|
35 @type QWidget |
34 """ |
36 """ |
35 super().__init__(parent) |
37 super().__init__(parent) |
36 self.setupUi(self) |
38 self.setupUi(self) |
37 |
39 |
38 self.refreshButton = self.buttonBox.addButton( |
40 self.refreshButton = self.buttonBox.addButton( |
78 |
80 |
79 def __generateItem(self, path, propName, propValue): |
81 def __generateItem(self, path, propName, propValue): |
80 """ |
82 """ |
81 Private method to generate a properties item in the properties list. |
83 Private method to generate a properties item in the properties list. |
82 |
84 |
83 @param path file/directory name the property applies to (string) |
85 @param path file/directory name the property applies to |
84 @param propName name of the property (string) |
86 @type str |
85 @param propValue value of the property (string) |
87 @param propName name of the property |
|
88 @type str |
|
89 @param propValue value of the property |
|
90 @type str |
86 """ |
91 """ |
87 QTreeWidgetItem(self.propsList, [path, propName, propValue.strip()]) |
92 QTreeWidgetItem(self.propsList, [path, propName, propValue.strip()]) |
88 |
93 |
89 def closeEvent(self, e): |
94 def closeEvent(self, e): |
90 """ |
95 """ |
91 Protected slot implementing a close event handler. |
96 Protected slot implementing a close event handler. |
92 |
97 |
93 @param e close event (QCloseEvent) |
98 @param e close event |
|
99 @type QCloseEvent |
94 """ |
100 """ |
95 if ( |
101 if ( |
96 self.process is not None |
102 self.process is not None |
97 and self.process.state() != QProcess.ProcessState.NotRunning |
103 and self.process.state() != QProcess.ProcessState.NotRunning |
98 ): |
104 ): |
104 |
110 |
105 def start(self, fn, recursive=False): |
111 def start(self, fn, recursive=False): |
106 """ |
112 """ |
107 Public slot to start the svn status command. |
113 Public slot to start the svn status command. |
108 |
114 |
109 @param fn filename(s) (string or list of string) |
115 @param fn filename(s) |
|
116 @type str or list of str |
110 @param recursive flag indicating a recursive list is requested |
117 @param recursive flag indicating a recursive list is requested |
|
118 @type bool |
111 """ |
119 """ |
112 self.errorGroup.hide() |
120 self.errorGroup.hide() |
113 |
121 |
114 self.propsList.clear() |
122 self.propsList.clear() |
115 self.lastPath = None |
123 self.lastPath = None |
180 |
188 |
181 def on_buttonBox_clicked(self, button): |
189 def on_buttonBox_clicked(self, button): |
182 """ |
190 """ |
183 Private slot called by a button of the button box clicked. |
191 Private slot called by a button of the button box clicked. |
184 |
192 |
185 @param button button that was clicked (QAbstractButton) |
193 @param button button that was clicked |
|
194 @type QAbstractButton |
186 """ |
195 """ |
187 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
196 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
188 self.close() |
197 self.close() |
189 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
198 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
190 self.__finish() |
199 self.__finish() |
201 @pyqtSlot(int, QProcess.ExitStatus) |
210 @pyqtSlot(int, QProcess.ExitStatus) |
202 def __procFinished(self, exitCode, exitStatus): |
211 def __procFinished(self, exitCode, exitStatus): |
203 """ |
212 """ |
204 Private slot connected to the finished signal. |
213 Private slot connected to the finished signal. |
205 |
214 |
206 @param exitCode exit code of the process (integer) |
215 @param exitCode exit code of the process |
207 @param exitStatus exit status of the process (QProcess.ExitStatus) |
216 @type int |
|
217 @param exitStatus exit status of the process |
|
218 @type QProcess.ExitStatus |
208 """ |
219 """ |
209 if self.lastPath is None: |
220 if self.lastPath is None: |
210 self.__generateItem("", "None", "") |
221 self.__generateItem("", "None", "") |
211 |
222 |
212 self.__finish() |
223 self.__finish() |