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 self.setWindowFlags(Qt.WindowType.Window) |
39 self.setWindowFlags(Qt.WindowType.Window) |
38 |
40 |
59 @pyqtSlot(QListWidgetItem, QListWidgetItem) |
61 @pyqtSlot(QListWidgetItem, QListWidgetItem) |
60 def on_changeLists_currentItemChanged(self, current, previous): |
62 def on_changeLists_currentItemChanged(self, current, previous): |
61 """ |
63 """ |
62 Private slot to handle the selection of a new item. |
64 Private slot to handle the selection of a new item. |
63 |
65 |
64 @param current current item (QListWidgetItem) |
66 @param current current item |
65 @param previous previous current item (QListWidgetItem) |
67 @type QListWidgetItem |
|
68 @param previous previous current item |
|
69 @type QListWidgetItem |
66 """ |
70 """ |
67 self.filesList.clear() |
71 self.filesList.clear() |
68 if current is not None: |
72 if current is not None: |
69 changelist = current.text() |
73 changelist = current.text() |
70 if changelist in self.changeListsDict: |
74 if changelist in self.changeListsDict: |
72 |
76 |
73 def start(self, path): |
77 def start(self, path): |
74 """ |
78 """ |
75 Public slot to populate the data. |
79 Public slot to populate the data. |
76 |
80 |
77 @param path directory name to show change lists for (string) |
81 @param path directory name to show change lists for |
|
82 @type str |
78 """ |
83 """ |
79 self.changeListsDict = {} |
84 self.changeListsDict = {} |
80 |
85 |
81 self.filesLabel.setText(self.tr("Files (relative to {0}):").format(path)) |
86 self.filesLabel.setText(self.tr("Files (relative to {0}):").format(path)) |
82 |
87 |
140 |
145 |
141 self.inputGroup.setEnabled(False) |
146 self.inputGroup.setEnabled(False) |
142 self.inputGroup.hide() |
147 self.inputGroup.hide() |
143 |
148 |
144 if len(self.changeListsDict) == 0: |
149 if len(self.changeListsDict) == 0: |
145 self.changeLists.addItem(self.tr("No changelists found")) |
150 self.changeLists.addItem(self.tr("No change lists found")) |
146 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus( |
151 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus( |
147 Qt.FocusReason.OtherFocusReason |
152 Qt.FocusReason.OtherFocusReason |
148 ) |
153 ) |
149 else: |
154 else: |
150 self.changeLists.addItems(sorted(self.changeListsDict)) |
155 self.changeLists.addItems(sorted(self.changeListsDict)) |
153 |
158 |
154 def on_buttonBox_clicked(self, button): |
159 def on_buttonBox_clicked(self, button): |
155 """ |
160 """ |
156 Private slot called by a button of the button box clicked. |
161 Private slot called by a button of the button box clicked. |
157 |
162 |
158 @param button button that was clicked (QAbstractButton) |
163 @param button button that was clicked |
|
164 @type QAbstractButton |
159 """ |
165 """ |
160 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
166 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
161 self.close() |
167 self.close() |
162 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
168 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
163 self.__finish() |
169 self.__finish() |
165 @pyqtSlot(int, QProcess.ExitStatus) |
171 @pyqtSlot(int, QProcess.ExitStatus) |
166 def __procFinished(self, exitCode, exitStatus): |
172 def __procFinished(self, exitCode, exitStatus): |
167 """ |
173 """ |
168 Private slot connected to the finished signal. |
174 Private slot connected to the finished signal. |
169 |
175 |
170 @param exitCode exit code of the process (integer) |
176 @param exitCode exit code of the process |
171 @param exitStatus exit status of the process (QProcess.ExitStatus) |
177 @type int |
|
178 @param exitStatus exit status of the process |
|
179 @type QProcess.ExitStatus |
172 """ |
180 """ |
173 self.__finish() |
181 self.__finish() |
174 |
182 |
175 def __readStdout(self): |
183 def __readStdout(self): |
176 """ |
184 """ |
230 |
238 |
231 def on_passwordCheckBox_toggled(self, isOn): |
239 def on_passwordCheckBox_toggled(self, isOn): |
232 """ |
240 """ |
233 Private slot to handle the password checkbox toggled. |
241 Private slot to handle the password checkbox toggled. |
234 |
242 |
235 @param isOn flag indicating the status of the check box (boolean) |
243 @param isOn flag indicating the status of the check box |
|
244 @type bool |
236 """ |
245 """ |
237 if isOn: |
246 if isOn: |
238 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
247 self.input.setEchoMode(QLineEdit.EchoMode.Password) |
239 else: |
248 else: |
240 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |
249 self.input.setEchoMode(QLineEdit.EchoMode.Normal) |