15 |
15 |
16 class GitBisectStartDialog(QDialog, Ui_GitBisectStartDialog): |
16 class GitBisectStartDialog(QDialog, Ui_GitBisectStartDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to enter the data for an extended bisect start. |
18 Class implementing a dialog to enter the data for an extended bisect start. |
19 """ |
19 """ |
|
20 |
20 def __init__(self, parent=None): |
21 def __init__(self, parent=None): |
21 """ |
22 """ |
22 Constructor |
23 Constructor |
23 |
24 |
24 @param parent reference to the parent widget (QWidget) |
25 @param parent reference to the parent widget (QWidget) |
25 """ |
26 """ |
26 super().__init__(parent) |
27 super().__init__(parent) |
27 self.setupUi(self) |
28 self.setupUi(self) |
28 |
29 |
29 self.okButton = self.buttonBox.button( |
30 self.okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) |
30 QDialogButtonBox.StandardButton.Ok) |
|
31 self.okButton.setEnabled(False) |
31 self.okButton.setEnabled(False) |
32 |
32 |
33 msh = self.minimumSizeHint() |
33 msh = self.minimumSizeHint() |
34 self.resize(max(self.width(), msh.width()), msh.height()) |
34 self.resize(max(self.width(), msh.width()), msh.height()) |
35 |
35 |
36 def __updateOK(self): |
36 def __updateOK(self): |
37 """ |
37 """ |
38 Private method used to enable/disable the OK-button. |
38 Private method used to enable/disable the OK-button. |
39 """ |
39 """ |
40 enable = self.badEdit.text() != "" |
40 enable = self.badEdit.text() != "" |
41 self.okButton.setEnabled(enable) |
41 self.okButton.setEnabled(enable) |
42 |
42 |
43 @pyqtSlot(str) |
43 @pyqtSlot(str) |
44 def on_badEdit_textChanged(self, txt): |
44 def on_badEdit_textChanged(self, txt): |
45 """ |
45 """ |
46 Private slot to handle a change of the bad commit. |
46 Private slot to handle a change of the bad commit. |
47 |
47 |
48 @param txt bad commit entered (string) |
48 @param txt bad commit entered (string) |
49 """ |
49 """ |
50 self.__updateOK() |
50 self.__updateOK() |
51 |
51 |
52 def getData(self): |
52 def getData(self): |
53 """ |
53 """ |
54 Public method to get the entered data. |
54 Public method to get the entered data. |
55 |
55 |
56 @return tuple containing a bad commit (string), a list of good |
56 @return tuple containing a bad commit (string), a list of good |
57 commits (list of strings) and a flag indicating to not |
57 commits (list of strings) and a flag indicating to not |
58 checkout the working tree (boolean) |
58 checkout the working tree (boolean) |
59 """ |
59 """ |
60 return ( |
60 return ( |