15 |
15 |
16 class LfRevisionsInputDialog(QDialog, Ui_LfRevisionsInputDialog): |
16 class LfRevisionsInputDialog(QDialog, Ui_LfRevisionsInputDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to enter a series of revisions. |
18 Class implementing a dialog to enter a series of revisions. |
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.buttonBox.button( |
30 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
30 QDialogButtonBox.StandardButton.Ok).setEnabled(False) |
31 |
31 |
|
32 @pyqtSlot() |
32 @pyqtSlot() |
33 def on_revisionsEdit_textChanged(self): |
33 def on_revisionsEdit_textChanged(self): |
34 """ |
34 """ |
35 Private slot handling a change of revisions. |
35 Private slot handling a change of revisions. |
36 """ |
36 """ |
37 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
37 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
38 bool(self.revisionsEdit.toPlainText())) |
38 bool(self.revisionsEdit.toPlainText()) |
39 |
39 ) |
|
40 |
40 def getRevisions(self): |
41 def getRevisions(self): |
41 """ |
42 """ |
42 Public method to retrieve the entered revisions. |
43 Public method to retrieve the entered revisions. |
43 |
44 |
44 @return list of revisions (list of string) |
45 @return list of revisions (list of string) |
45 """ |
46 """ |
46 return self.revisionsEdit.toPlainText().splitlines() |
47 return self.revisionsEdit.toPlainText().splitlines() |