81 super().__init__(parent) |
81 super().__init__(parent) |
82 self.setupUi(self) |
82 self.setupUi(self) |
83 |
83 |
84 self.branchesCombo.addItems(["", "default"] + sorted(branchesList)) |
84 self.branchesCombo.addItems(["", "default"] + sorted(branchesList)) |
85 |
85 |
86 self.__revisionsValidator = RevisionsValidator(True, self) |
|
87 self.__pruneRevisionsValidator = RevisionsValidator(False, self) |
|
88 self.__mergeRevisionsValidator = RevisionsValidator(False, self) |
86 self.__mergeRevisionsValidator = RevisionsValidator(False, self) |
89 self.revisionsEdit.setValidator(self.__revisionsValidator) |
|
90 self.pruneEdit.setValidator(self.__pruneRevisionsValidator) |
|
91 self.mergeEdit.setValidator(self.__mergeRevisionsValidator) |
87 self.mergeEdit.setValidator(self.__mergeRevisionsValidator) |
92 |
88 |
93 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
89 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
94 |
90 |
95 def __updateOk(self): |
91 def __updateOk(self): |
96 """ |
92 """ |
97 Private slot to update the state of the OK button. |
93 Private slot to update the state of the OK button. |
98 """ |
94 """ |
99 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
95 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( |
100 self.revisionsEdit.text() != "" or self.allCheckBox.isChecked()) |
96 self.revisionsEdit.toPlainText() != "" or self.allCheckBox.isChecked()) |
101 |
97 |
102 @pyqtSlot(str) |
98 @pyqtSlot() |
103 def on_revisionsEdit_textChanged(self, txt): |
99 def on_revisionsEdit_textChanged(self): |
104 """ |
100 """ |
105 Private slot to react upon changes of revisions. |
101 Private slot to react upon changes of revisions. |
106 |
|
107 @param txt contents of the revisions edit (string) |
|
108 """ |
102 """ |
109 self.__updateOk() |
103 self.__updateOk() |
110 |
104 |
111 @pyqtSlot(str) |
105 @pyqtSlot(str) |
112 def on_branchesCombo_editTextChanged(self, txt): |
106 def on_branchesCombo_editTextChanged(self, txt): |
135 revisions to merge and a flag indicating to append transplant info |
129 revisions to merge and a flag indicating to append transplant info |
136 (list of strings, string, string, boolean, list of strings, |
130 (list of strings, string, string, boolean, list of strings, |
137 list of strings, boolean) |
131 list of strings, boolean) |
138 """ |
132 """ |
139 return ( |
133 return ( |
140 self.revisionsEdit.text().strip().split(), |
134 self.revisionsEdit.toPlainText().strip().splitlines(), |
141 self.repoEdit.text().strip(), |
135 self.repoEdit.text().strip(), |
142 self.branchesCombo.currentText().strip(), |
136 self.branchesCombo.currentText().strip(), |
143 self.allCheckBox.isChecked(), |
137 self.allCheckBox.isChecked(), |
144 self.pruneEdit.text().strip().split(), |
138 self.pruneEdit.toPlainText().strip().splitlines(), |
145 self.mergeEdit.text().strip().split(), |
139 self.mergeEdit.text().strip().split(), |
146 self.logCheckBox.isChecked() |
140 self.logCheckBox.isChecked() |
147 ) |
141 ) |