src/eric7/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
26 26
27 def __init__(self, text, command, pysvnClient, parent=None, log=""): 27 def __init__(self, text, command, pysvnClient, parent=None, log=""):
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 @type str
32 @param command svn command to be executed (display purposes only) 33 @param command svn command to be executed (display purposes only)
33 (string) 34 @type str
34 @param pysvnClient reference to the pysvn client object (pysvn.Client) 35 @param pysvnClient reference to the pysvn client object
35 @param parent parent widget (QWidget) 36 @type pysvn.Client
36 @param log optional log message (string) 37 @param parent parent widget
38 @type QWidget
39 @param log optional log message
40 @type str
37 """ 41 """
38 super().__init__(parent) 42 super().__init__(parent)
39 self.setupUi(self) 43 self.setupUi(self)
40 SvnDialogMixin.__init__(self, log) 44 SvnDialogMixin.__init__(self, log)
41 self.setWindowFlags(Qt.WindowType.Window) 45 self.setWindowFlags(Qt.WindowType.Window)
67 def _clientNotifyCallback(self, eventDict): 71 def _clientNotifyCallback(self, eventDict):
68 """ 72 """
69 Protected method called by the client to send events. 73 Protected method called by the client to send events.
70 74
71 @param eventDict dictionary containing the notification event 75 @param eventDict dictionary containing the notification event
76 @type dict
72 """ 77 """
73 msg = "" 78 msg = ""
74 if eventDict["action"] == pysvn.wc_notify_action.update_completed: 79 if eventDict["action"] == pysvn.wc_notify_action.update_completed:
75 msg = self.tr("Revision {0}.\n").format(eventDict["revision"].number) 80 msg = self.tr("Revision {0}.\n").format(eventDict["revision"].number)
76 elif ( 81 elif (
104 109
105 def showMessage(self, msg): 110 def showMessage(self, msg):
106 """ 111 """
107 Public slot to show a message. 112 Public slot to show a message.
108 113
109 @param msg message to show (string) 114 @param msg message to show
115 @type str
110 """ 116 """
111 self.resultbox.insertPlainText(msg) 117 self.resultbox.insertPlainText(msg)
112 self.resultbox.ensureCursorVisible() 118 self.resultbox.ensureCursorVisible()
113 QApplication.processEvents() 119 QApplication.processEvents()
114 120
115 def showError(self, msg): 121 def showError(self, msg):
116 """ 122 """
117 Public slot to show an error message. 123 Public slot to show an error message.
118 124
119 @param msg error message to show (string) 125 @param msg error message to show
126 @type str
120 """ 127 """
121 self.errorGroup.show() 128 self.errorGroup.show()
122 self.errors.insertPlainText(msg) 129 self.errors.insertPlainText(msg)
123 self.errors.ensureCursorVisible() 130 self.errors.ensureCursorVisible()
124 QApplication.processEvents() 131 QApplication.processEvents()
139 146
140 def on_buttonBox_clicked(self, button): 147 def on_buttonBox_clicked(self, button):
141 """ 148 """
142 Private slot called by a button of the button box clicked. 149 Private slot called by a button of the button box clicked.
143 150
144 @param button button that was clicked (QAbstractButton) 151 @param button button that was clicked
152 @type QAbstractButton
145 """ 153 """
146 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): 154 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close):
147 self.close() 155 self.close()
148 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): 156 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel):
149 self.finish() 157 self.finish()
150 158
151 def hasAddOrDelete(self): 159 def hasAddOrDelete(self):
152 """ 160 """
153 Public method to check, if the last action contained an add or delete. 161 Public method to check, if the last action contained an add or delete.
154 162
155 @return flag indicating the presence of an add or delete (boolean) 163 @return flag indicating the presence of an add or delete
164 @rtype bool
156 """ 165 """
157 return self.__hasAddOrDelete 166 return self.__hasAddOrDelete

eric ide

mercurial