29 def __init__(self, vcs, msg, mq, merge, parent=None): |
29 def __init__(self, vcs, msg, mq, merge, parent=None): |
30 """ |
30 """ |
31 Constructor |
31 Constructor |
32 |
32 |
33 @param vcs reference to the vcs object |
33 @param vcs reference to the vcs object |
34 @param msg initial message (string) |
34 @type Hg |
35 @param mq flag indicating a queue commit (boolean) |
35 @param msg initial message |
36 @param merge flag indicating a merge commit (boolean) |
36 @type str |
37 @param parent parent widget (QWidget) |
37 @param mq flag indicating a queue commit |
|
38 @type bool |
|
39 @param merge flag indicating a merge commit |
|
40 @type bool |
|
41 @param parent parent widget |
|
42 @type QWidget |
38 """ |
43 """ |
39 super().__init__(parent, Qt.WindowType.Window) |
44 super().__init__(parent, Qt.WindowType.Window) |
40 self.setupUi(self) |
45 self.setupUi(self) |
41 |
46 |
42 self.__vcs = vcs |
47 self.__vcs = vcs |
55 |
60 |
56 def showEvent(self, evt): |
61 def showEvent(self, evt): |
57 """ |
62 """ |
58 Protected method called when the dialog is about to be shown. |
63 Protected method called when the dialog is about to be shown. |
59 |
64 |
60 @param evt the event (QShowEvent) |
65 @param evt the event |
|
66 @type QShowEvent |
61 """ |
67 """ |
62 commitMessages = self.__vcs.vcsCommitMessages() |
68 commitMessages = self.__vcs.vcsCommitMessages() |
63 self.recentComboBox.clear() |
69 self.recentComboBox.clear() |
64 self.recentComboBox.addItem("") |
70 self.recentComboBox.addItem("") |
65 for message in commitMessages: |
71 for message in commitMessages: |
79 |
85 |
80 def on_buttonBox_clicked(self, button): |
86 def on_buttonBox_clicked(self, button): |
81 """ |
87 """ |
82 Private slot called by a button of the button box clicked. |
88 Private slot called by a button of the button box clicked. |
83 |
89 |
84 @param button button that was clicked (QAbstractButton) |
90 @param button button that was clicked |
|
91 @type QAbstractButton |
85 """ |
92 """ |
86 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
93 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
87 self.logEdit.clear() |
94 self.logEdit.clear() |
88 |
95 |
89 def on_buttonBox_accepted(self): |
96 def on_buttonBox_accepted(self): |