29 parent=None, |
29 parent=None, |
30 ): |
30 ): |
31 """ |
31 """ |
32 Constructor |
32 Constructor |
33 |
33 |
34 @param tagsList list of tags (list of strings) |
34 @param tagsList list of tags |
35 @param branchesList list of branches (list of strings) |
35 @type list of str |
36 @param trackingBranchesList list of remote branches (list of strings) |
36 @param branchesList list of branches |
37 @param noneLabel label text for "no revision selected" (string) |
37 @type list of str |
|
38 @param trackingBranchesList list of remote branches |
|
39 @type list of str |
|
40 @param noneLabel label text for "no revision selected" |
|
41 @type str |
38 @param showBranches flag indicating to show the branch selection |
42 @param showBranches flag indicating to show the branch selection |
39 (boolean) |
43 @type bool |
40 @param showHead flag indicating to show the head selection (boolean) |
44 @param showHead flag indicating to show the head selection |
41 @param parent parent widget (QWidget) |
45 @type bool |
|
46 @param parent parent widget |
|
47 @type QWidget |
42 """ |
48 """ |
43 super().__init__(parent) |
49 super().__init__(parent) |
44 self.setupUi(self) |
50 self.setupUi(self) |
45 |
51 |
46 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
52 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
83 @pyqtSlot(bool) |
89 @pyqtSlot(bool) |
84 def on_revButton_toggled(self, checked): |
90 def on_revButton_toggled(self, checked): |
85 """ |
91 """ |
86 Private slot to handle changes of the rev select button. |
92 Private slot to handle changes of the rev select button. |
87 |
93 |
88 @param checked state of the button (boolean) |
94 @param checked state of the button |
|
95 @type bool |
89 """ |
96 """ |
90 self.__updateOK() |
97 self.__updateOK() |
91 |
98 |
92 @pyqtSlot(bool) |
99 @pyqtSlot(bool) |
93 def on_tagButton_toggled(self, checked): |
100 def on_tagButton_toggled(self, checked): |
94 """ |
101 """ |
95 Private slot to handle changes of the Tag select button. |
102 Private slot to handle changes of the Tag select button. |
96 |
103 |
97 @param checked state of the button (boolean) |
104 @param checked state of the button |
|
105 @type bool |
98 """ |
106 """ |
99 self.__updateOK() |
107 self.__updateOK() |
100 |
108 |
101 @pyqtSlot(bool) |
109 @pyqtSlot(bool) |
102 def on_branchButton_toggled(self, checked): |
110 def on_branchButton_toggled(self, checked): |
103 """ |
111 """ |
104 Private slot to handle changes of the Branch select button. |
112 Private slot to handle changes of the Branch select button. |
105 |
113 |
106 @param checked state of the button (boolean) |
114 @param checked state of the button |
|
115 @type bool |
107 """ |
116 """ |
108 self.__updateOK() |
117 self.__updateOK() |
109 |
118 |
110 @pyqtSlot(bool) |
119 @pyqtSlot(bool) |
111 def on_remoteBranchButton_toggled(self, checked): |
120 def on_remoteBranchButton_toggled(self, checked): |
112 """ |
121 """ |
113 Private slot to handle changes of the Remote Branch select button. |
122 Private slot to handle changes of the Remote Branch select button. |
114 |
123 |
115 @param checked state of the button (boolean) |
124 @param checked state of the button |
|
125 @type bool |
116 """ |
126 """ |
117 self.__updateOK() |
127 self.__updateOK() |
118 |
128 |
119 @pyqtSlot(str) |
129 @pyqtSlot(str) |
120 def on_revEdit_textChanged(self, txt): |
130 def on_revEdit_textChanged(self, txt): |
121 """ |
131 """ |
122 Private slot to handle changes of the rev edit. |
132 Private slot to handle changes of the rev edit. |
123 |
133 |
124 @param txt text of the edit (string) |
134 @param txt text of the edit |
|
135 @type str |
125 """ |
136 """ |
126 self.__updateOK() |
137 self.__updateOK() |
127 |
138 |
128 @pyqtSlot(str) |
139 @pyqtSlot(str) |
129 def on_tagCombo_editTextChanged(self, txt): |
140 def on_tagCombo_editTextChanged(self, txt): |
130 """ |
141 """ |
131 Private slot to handle changes of the Tag combo. |
142 Private slot to handle changes of the Tag combo. |
132 |
143 |
133 @param txt text of the combo (string) |
144 @param txt text of the combo |
|
145 @type str |
134 """ |
146 """ |
135 self.__updateOK() |
147 self.__updateOK() |
136 |
148 |
137 @pyqtSlot(str) |
149 @pyqtSlot(str) |
138 def on_branchCombo_editTextChanged(self, txt): |
150 def on_branchCombo_editTextChanged(self, txt): |
139 """ |
151 """ |
140 Private slot to handle changes of the Branch combo. |
152 Private slot to handle changes of the Branch combo. |
141 |
153 |
142 @param txt text of the combo (string) |
154 @param txt text of the combo |
|
155 @type str |
143 """ |
156 """ |
144 self.__updateOK() |
157 self.__updateOK() |
145 |
158 |
146 @pyqtSlot(str) |
159 @pyqtSlot(str) |
147 def on_remoteBranchCombo_editTextChanged(self, txt): |
160 def on_remoteBranchCombo_editTextChanged(self, txt): |
148 """ |
161 """ |
149 Private slot to handle changes of the Remote Branch combo. |
162 Private slot to handle changes of the Remote Branch combo. |
150 |
163 |
151 @param txt text of the combo (string) |
164 @param txt text of the combo |
|
165 @type str |
152 """ |
166 """ |
153 self.__updateOK() |
167 self.__updateOK() |
154 |
168 |
155 def getRevision(self): |
169 def getRevision(self): |
156 """ |
170 """ |
157 Public method to retrieve the selected revision. |
171 Public method to retrieve the selected revision. |
158 |
172 |
159 @return selected revision (string) |
173 @return selected revision |
|
174 @rtype str |
160 """ |
175 """ |
161 if self.revButton.isChecked(): |
176 if self.revButton.isChecked(): |
162 rev = self.revEdit.text() |
177 rev = self.revEdit.text() |
163 elif self.tagButton.isChecked(): |
178 elif self.tagButton.isChecked(): |
164 rev = self.tagCombo.currentText() |
179 rev = self.tagCombo.currentText() |