src/eric7/Plugins/VcsPlugins/vcsGit/GitRevisionsSelectionDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9971
773ad1f1ed22
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
21 21
22 def __init__(self, tagsList, branchesList, parent=None): 22 def __init__(self, tagsList, branchesList, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param tagsList list of tags (list of strings) 26 @param tagsList list of tags
27 @param branchesList list of branches (list of strings) 27 @type list of str
28 @param parent parent widget of the dialog (QWidget) 28 @param branchesList list of branches
29 @type list of str
30 @param parent parent widget of the dialog
31 @type QWidget
29 """ 32 """
30 super().__init__(parent) 33 super().__init__(parent)
31 self.setupUi(self) 34 self.setupUi(self)
32 35
33 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) 36 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
64 @pyqtSlot(bool) 67 @pyqtSlot(bool)
65 def on_rev1Button_toggled(self, checked): 68 def on_rev1Button_toggled(self, checked):
66 """ 69 """
67 Private slot to handle changes of the rev1 select button. 70 Private slot to handle changes of the rev1 select button.
68 71
69 @param checked state of the button (boolean) 72 @param checked state of the button
73 @type bool
70 """ 74 """
71 self.__updateOK() 75 self.__updateOK()
72 76
73 @pyqtSlot(bool) 77 @pyqtSlot(bool)
74 def on_rev2Button_toggled(self, checked): 78 def on_rev2Button_toggled(self, checked):
75 """ 79 """
76 Private slot to handle changes of the rev2 select button. 80 Private slot to handle changes of the rev2 select button.
77 81
78 @param checked state of the button (boolean) 82 @param checked state of the button
83 @type bool
79 """ 84 """
80 self.__updateOK() 85 self.__updateOK()
81 86
82 @pyqtSlot(bool) 87 @pyqtSlot(bool)
83 def on_tag1Button_toggled(self, checked): 88 def on_tag1Button_toggled(self, checked):
84 """ 89 """
85 Private slot to handle changes of the Tag1 select button. 90 Private slot to handle changes of the Tag1 select button.
86 91
87 @param checked state of the button (boolean) 92 @param checked state of the button
93 @type bool
88 """ 94 """
89 self.__updateOK() 95 self.__updateOK()
90 96
91 @pyqtSlot(bool) 97 @pyqtSlot(bool)
92 def on_tag2Button_toggled(self, checked): 98 def on_tag2Button_toggled(self, checked):
93 """ 99 """
94 Private slot to handle changes of the Tag2 select button. 100 Private slot to handle changes of the Tag2 select button.
95 101
96 @param checked state of the button (boolean) 102 @param checked state of the button
103 @type bool
97 """ 104 """
98 self.__updateOK() 105 self.__updateOK()
99 106
100 @pyqtSlot(bool) 107 @pyqtSlot(bool)
101 def on_branch1Button_toggled(self, checked): 108 def on_branch1Button_toggled(self, checked):
102 """ 109 """
103 Private slot to handle changes of the Branch1 select button. 110 Private slot to handle changes of the Branch1 select button.
104 111
105 @param checked state of the button (boolean) 112 @param checked state of the button
113 @type bool
106 """ 114 """
107 self.__updateOK() 115 self.__updateOK()
108 116
109 @pyqtSlot(bool) 117 @pyqtSlot(bool)
110 def on_branch2Button_toggled(self, checked): 118 def on_branch2Button_toggled(self, checked):
111 """ 119 """
112 Private slot to handle changes of the Branch2 select button. 120 Private slot to handle changes of the Branch2 select button.
113 121
114 @param checked state of the button (boolean) 122 @param checked state of the button
123 @type bool
115 """ 124 """
116 self.__updateOK() 125 self.__updateOK()
117 126
118 @pyqtSlot(str) 127 @pyqtSlot(str)
119 def on_rev1Edit_textChanged(self, txt): 128 def on_rev1Edit_textChanged(self, txt):
120 """ 129 """
121 Private slot to handle changes of the rev1 edit. 130 Private slot to handle changes of the rev1 edit.
122 131
123 @param txt text of the edit (string) 132 @param txt text of the edit
133 @type str
124 """ 134 """
125 self.__updateOK() 135 self.__updateOK()
126 136
127 @pyqtSlot(str) 137 @pyqtSlot(str)
128 def on_rev2Edit_textChanged(self, txt): 138 def on_rev2Edit_textChanged(self, txt):
129 """ 139 """
130 Private slot to handle changes of the rev2 edit. 140 Private slot to handle changes of the rev2 edit.
131 141
132 @param txt text of the edit (string) 142 @param txt text of the edit
143 @type str
133 """ 144 """
134 self.__updateOK() 145 self.__updateOK()
135 146
136 @pyqtSlot(str) 147 @pyqtSlot(str)
137 def on_tag1Combo_editTextChanged(self, txt): 148 def on_tag1Combo_editTextChanged(self, txt):
138 """ 149 """
139 Private slot to handle changes of the Tag1 combo. 150 Private slot to handle changes of the Tag1 combo.
140 151
141 @param txt text of the combo (string) 152 @param txt text of the combo
153 @type str
142 """ 154 """
143 self.__updateOK() 155 self.__updateOK()
144 156
145 @pyqtSlot(str) 157 @pyqtSlot(str)
146 def on_tag2Combo_editTextChanged(self, txt): 158 def on_tag2Combo_editTextChanged(self, txt):
147 """ 159 """
148 Private slot to handle changes of the Tag2 combo. 160 Private slot to handle changes of the Tag2 combo.
149 161
150 @param txt text of the combo (string) 162 @param txt text of the combo
163 @type str
151 """ 164 """
152 self.__updateOK() 165 self.__updateOK()
153 166
154 @pyqtSlot(str) 167 @pyqtSlot(str)
155 def on_branch1Combo_editTextChanged(self, txt): 168 def on_branch1Combo_editTextChanged(self, txt):
156 """ 169 """
157 Private slot to handle changes of the Branch1 combo. 170 Private slot to handle changes of the Branch1 combo.
158 171
159 @param txt text of the combo (string) 172 @param txt text of the combo
173 @type str
160 """ 174 """
161 self.__updateOK() 175 self.__updateOK()
162 176
163 @pyqtSlot(str) 177 @pyqtSlot(str)
164 def on_branch2Combo_editTextChanged(self, txt): 178 def on_branch2Combo_editTextChanged(self, txt):
165 """ 179 """
166 Private slot to handle changes of the Branch2 combo. 180 Private slot to handle changes of the Branch2 combo.
167 181
168 @param txt text of the combo (string) 182 @param txt text of the combo
183 @type str
169 """ 184 """
170 self.__updateOK() 185 self.__updateOK()
171 186
172 def __getRevision(self, no): 187 def __getRevision(self, no):
173 """ 188 """
174 Private method to generate the revision. 189 Private method to generate the revision.
175 190
176 @param no revision number to generate (1 or 2) 191 @param no revision number to generate (1 or 2)
177 @return revision (string) 192 @type int
193 @return revision
194 @rtype str
178 """ 195 """
179 if no == 1: 196 if no == 1:
180 revButton = self.rev1Button 197 revButton = self.rev1Button
181 revEdit = self.rev1Edit 198 revEdit = self.rev1Edit
182 tagButton = self.tag1Button 199 tagButton = self.tag1Button
214 231
215 def getRevisions(self): 232 def getRevisions(self):
216 """ 233 """
217 Public method to get the revisions. 234 Public method to get the revisions.
218 235
219 @return list of two revisions (list of strings) 236 @return list of two revisions
237 @rtype list of str
220 """ 238 """
221 rev1 = self.__getRevision(1) 239 rev1 = self.__getRevision(1)
222 rev2 = self.__getRevision(2) 240 rev2 = self.__getRevision(2)
223 241
224 return [rev1, rev2] 242 return [rev1, rev2]

eric ide

mercurial