24 def __init__(self, vcs, parent=None): |
24 def __init__(self, vcs, parent=None): |
25 """ |
25 """ |
26 Constructor |
26 Constructor |
27 |
27 |
28 @param vcs reference to the vcs object |
28 @param vcs reference to the vcs object |
29 @param parent reference to the parent widget (QWidget) |
29 @type Hg |
|
30 @param parent reference to the parent widget |
|
31 @type QWidget |
30 """ |
32 """ |
31 super().__init__(parent) |
33 super().__init__(parent) |
32 self.setupUi(self) |
34 self.setupUi(self) |
33 |
35 |
34 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False) |
36 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setEnabled(False) |
42 |
44 |
43 def closeEvent(self, e): |
45 def closeEvent(self, e): |
44 """ |
46 """ |
45 Protected slot implementing a close event handler. |
47 Protected slot implementing a close event handler. |
46 |
48 |
47 @param e close event (QCloseEvent) |
49 @param e close event |
|
50 @type QCloseEvent |
48 """ |
51 """ |
49 if self.__hgClient.isExecuting(): |
52 if self.__hgClient.isExecuting(): |
50 self.__hgClient.cancel() |
53 self.__hgClient.cancel() |
51 |
54 |
52 e.accept() |
55 e.accept() |
82 |
85 |
83 def on_buttonBox_clicked(self, button): |
86 def on_buttonBox_clicked(self, button): |
84 """ |
87 """ |
85 Private slot called by a button of the button box clicked. |
88 Private slot called by a button of the button box clicked. |
86 |
89 |
87 @param button button that was clicked (QAbstractButton) |
90 @param button button that was clicked |
|
91 @type QAbstractButton |
88 """ |
92 """ |
89 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
93 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
90 self.close() |
94 self.close() |
91 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
95 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
92 if self.__hgClient: |
96 if self.__hgClient: |
96 |
100 |
97 def __showOutput(self, out): |
101 def __showOutput(self, out): |
98 """ |
102 """ |
99 Private slot to show some output. |
103 Private slot to show some output. |
100 |
104 |
101 @param out output to be shown (string) |
105 @param out output to be shown |
|
106 @type str |
102 """ |
107 """ |
103 self.messageEdit.appendPlainText(Utilities.filterAnsiSequences(out)) |
108 self.messageEdit.appendPlainText(Utilities.filterAnsiSequences(out)) |
104 |
109 |
105 def __showError(self, out): |
110 def __showError(self, out): |
106 """ |
111 """ |
107 Private slot to show some error. |
112 Private slot to show some error. |
108 |
113 |
109 @param out error to be shown (string) |
114 @param out error to be shown |
|
115 @type str |
110 """ |
116 """ |
111 self.messageEdit.appendPlainText(self.tr("Error: ")) |
117 self.messageEdit.appendPlainText(self.tr("Error: ")) |
112 self.messageEdit.appendPlainText(Utilities.filterAnsiSequences(out)) |
118 self.messageEdit.appendPlainText(Utilities.filterAnsiSequences(out)) |