29 def __init__(self, vcs, parent=None): |
29 def __init__(self, vcs, parent=None): |
30 """ |
30 """ |
31 Constructor |
31 Constructor |
32 |
32 |
33 @param vcs reference to the vcs object |
33 @param vcs reference to the vcs object |
34 @param parent parent widget (QWidget) |
34 @type Subversion |
|
35 @param parent parent widget |
|
36 @type QWidget |
35 """ |
37 """ |
36 super().__init__(parent) |
38 super().__init__(parent) |
37 self.setupUi(self) |
39 self.setupUi(self) |
38 SvnDialogMixin.__init__(self) |
40 SvnDialogMixin.__init__(self) |
39 self.setWindowFlags(Qt.WindowType.Window) |
41 self.setWindowFlags(Qt.WindowType.Window) |
53 @pyqtSlot(QListWidgetItem, QListWidgetItem) |
55 @pyqtSlot(QListWidgetItem, QListWidgetItem) |
54 def on_changeLists_currentItemChanged(self, current, previous): |
56 def on_changeLists_currentItemChanged(self, current, previous): |
55 """ |
57 """ |
56 Private slot to handle the selection of a new item. |
58 Private slot to handle the selection of a new item. |
57 |
59 |
58 @param current current item (QListWidgetItem) |
60 @param current current item |
59 @param previous previous current item (QListWidgetItem) |
61 @type QListWidgetItem |
|
62 @param previous previous current item |
|
63 @type QListWidgetItem |
60 """ |
64 """ |
61 self.filesList.clear() |
65 self.filesList.clear() |
62 if current is not None: |
66 if current is not None: |
63 changelist = current.text() |
67 changelist = current.text() |
64 if changelist in self.changeListsDict: |
68 if changelist in self.changeListsDict: |
66 |
70 |
67 def start(self, path): |
71 def start(self, path): |
68 """ |
72 """ |
69 Public slot to populate the data. |
73 Public slot to populate the data. |
70 |
74 |
71 @param path directory name to show change lists for (string) |
75 @param path directory name to show change lists for |
|
76 @type str |
72 """ |
77 """ |
73 self.changeListsDict = {} |
78 self.changeListsDict = {} |
74 self.cancelled = False |
79 self.cancelled = False |
75 |
80 |
76 self.filesLabel.setText(self.tr("Files (relative to {0}):").format(path)) |
81 self.filesLabel.setText(self.tr("Files (relative to {0}):").format(path)) |
102 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(True) |
107 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(True) |
103 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False) |
108 self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel).setEnabled(False) |
104 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True) |
109 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True) |
105 |
110 |
106 if len(self.changeListsDict) == 0: |
111 if len(self.changeListsDict) == 0: |
107 self.changeLists.addItem(self.tr("No changelists found")) |
112 self.changeLists.addItem(self.tr("No change lists found")) |
108 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus( |
113 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setFocus( |
109 Qt.FocusReason.OtherFocusReason |
114 Qt.FocusReason.OtherFocusReason |
110 ) |
115 ) |
111 else: |
116 else: |
112 self.changeLists.setCurrentRow(0) |
117 self.changeLists.setCurrentRow(0) |
114 |
119 |
115 def on_buttonBox_clicked(self, button): |
120 def on_buttonBox_clicked(self, button): |
116 """ |
121 """ |
117 Private slot called by a button of the button box clicked. |
122 Private slot called by a button of the button box clicked. |
118 |
123 |
119 @param button button that was clicked (QAbstractButton) |
124 @param button button that was clicked |
|
125 @type QAbstractButton |
120 """ |
126 """ |
121 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
127 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
122 self.close() |
128 self.close() |
123 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
129 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
124 self.cancelled = True |
130 self.cancelled = True |