src/eric7/Plugins/VcsPlugins/vcsMercurial/HgDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
26 26
27 def __init__(self, text, hg=None, useClient=True, parent=None): 27 def __init__(self, text, hg=None, useClient=True, parent=None):
28 """ 28 """
29 Constructor 29 Constructor
30 30
31 @param text text to be shown by the label (string) 31 @param text text to be shown by the label
32 @param hg reference to the Mercurial interface object (Hg) 32 @type str
33 @param hg reference to the Mercurial interface object
34 @type Hg
33 @param useClient flag indicating to use the command server client 35 @param useClient flag indicating to use the command server client
34 if possible (boolean) 36 if possible
35 @param parent parent widget (QWidget) 37 @type bool
38 @param parent parent widget
39 @type QWidget
36 """ 40 """
37 super().__init__(parent) 41 super().__init__(parent)
38 self.setupUi(self) 42 self.setupUi(self)
39 self.setWindowFlags(Qt.WindowType.Window) 43 self.setWindowFlags(Qt.WindowType.Window)
40 44
71 75
72 def on_buttonBox_clicked(self, button): 76 def on_buttonBox_clicked(self, button):
73 """ 77 """
74 Private slot called by a button of the button box clicked. 78 Private slot called by a button of the button box clicked.
75 79
76 @param button button that was clicked (QAbstractButton) 80 @param button button that was clicked
81 @type QAbstractButton
77 """ 82 """
78 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 83 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
79 self.close() 84 self.close()
80 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 85 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
81 self.vcs.getClient().cancel() 86 self.vcs.getClient().cancel()
145 150
146 def normalExit(self): 151 def normalExit(self):
147 """ 152 """
148 Public method to check for a normal process termination. 153 Public method to check for a normal process termination.
149 154
150 @return flag indicating normal process termination (boolean) 155 @return flag indicating normal process termination
156 @rtype bool
151 """ 157 """
152 return self.normal 158 return self.normal
153 159
154 def normalExitWithoutErrors(self): 160 def normalExitWithoutErrors(self):
155 """ 161 """
156 Public method to check for a normal process termination without 162 Public method to check for a normal process termination without
157 error messages. 163 error messages.
158 164
159 @return flag indicating normal process termination (boolean) 165 @return flag indicating normal process termination
166 @rtype bool
160 """ 167 """
161 return self.normal and self.errors.toPlainText() == "" 168 return self.normal and self.errors.toPlainText() == ""
162 169
163 def __showOutput(self, out): 170 def __showOutput(self, out):
164 """ 171 """
165 Private slot to show some output. 172 Private slot to show some output.
166 173
167 @param out output to be shown (string) 174 @param out output to be shown
175 @type str
168 """ 176 """
169 self.resultbox.insertPlainText(Utilities.filterAnsiSequences(out)) 177 self.resultbox.insertPlainText(Utilities.filterAnsiSequences(out))
170 self.resultbox.ensureCursorVisible() 178 self.resultbox.ensureCursorVisible()
171 179
172 # check for a changed project file 180 # check for a changed project file
180 188
181 def __showError(self, out): 189 def __showError(self, out):
182 """ 190 """
183 Private slot to show some error. 191 Private slot to show some error.
184 192
185 @param out error to be shown (string) 193 @param out error to be shown
194 @type str
186 """ 195 """
187 self.errorGroup.show() 196 self.errorGroup.show()
188 self.errors.insertPlainText(Utilities.filterAnsiSequences(out)) 197 self.errors.insertPlainText(Utilities.filterAnsiSequences(out))
189 self.errors.ensureCursorVisible() 198 self.errors.ensureCursorVisible()
190 199
192 201
193 def hasAddOrDelete(self): 202 def hasAddOrDelete(self):
194 """ 203 """
195 Public method to check, if the last action contained an add or delete. 204 Public method to check, if the last action contained an add or delete.
196 205
197 @return flag indicating the presence of an add or delete (boolean) 206 @return flag indicating the presence of an add or delete
207 @rtype bool
198 """ 208 """
199 return self.__hasAddOrDelete 209 return self.__hasAddOrDelete
200 210
201 def __getInput(self, size, message): 211 def __getInput(self, size, message):
202 """ 212 """

eric ide

mercurial