|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsMercurial.HgDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.HgDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog starting a process and showing its output. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#HgDialog">HgDialog</a></td> |
|
39 <td>Class implementing a dialog starting a process and showing its output.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="HgDialog" ID="HgDialog"></a> |
|
50 <h2>HgDialog</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a dialog starting a process and showing its output. |
|
54 </p> |
|
55 <p> |
|
56 It starts a QProcess and displays a dialog that |
|
57 shows the output of the process. The dialog is modal, |
|
58 which causes a synchronized execution of the process. |
|
59 </p> |
|
60 <h3>Derived from</h3> |
|
61 QDialog, Ui_HgDialog |
|
62 <h3>Class Attributes</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Class Methods</h3> |
|
68 |
|
69 <table> |
|
70 <tr><td>None</td></tr> |
|
71 </table> |
|
72 <h3>Methods</h3> |
|
73 |
|
74 <table> |
|
75 |
|
76 <tr> |
|
77 <td><a href="#HgDialog.__init__">HgDialog</a></td> |
|
78 <td>Constructor</td> |
|
79 </tr> |
|
80 <tr> |
|
81 <td><a href="#HgDialog.__finish">__finish</a></td> |
|
82 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#HgDialog.__getInput">__getInput</a></td> |
|
86 <td>Private method to get some input from the user.</td> |
|
87 </tr> |
|
88 <tr> |
|
89 <td><a href="#HgDialog.__showError">__showError</a></td> |
|
90 <td>Private slot to show some error.</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#HgDialog.__showOutput">__showOutput</a></td> |
|
94 <td>Private slot to show some output.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#HgDialog.hasAddOrDelete">hasAddOrDelete</a></td> |
|
98 <td>Public method to check, if the last action contained an add or delete.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#HgDialog.normalExit">normalExit</a></td> |
|
102 <td>Public method to check for a normal process termination.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#HgDialog.normalExitWithoutErrors">normalExitWithoutErrors</a></td> |
|
106 <td>Public method to check for a normal process termination without error messages.</td> |
|
107 </tr> |
|
108 <tr> |
|
109 <td><a href="#HgDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
110 <td>Private slot called by a button of the button box clicked.</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#HgDialog.startProcess">startProcess</a></td> |
|
114 <td>Public slot used to start the process.</td> |
|
115 </tr> |
|
116 </table> |
|
117 <h3>Static Methods</h3> |
|
118 |
|
119 <table> |
|
120 <tr><td>None</td></tr> |
|
121 </table> |
|
122 |
|
123 <a NAME="HgDialog.__init__" ID="HgDialog.__init__"></a> |
|
124 <h4>HgDialog (Constructor)</h4> |
|
125 <b>HgDialog</b>(<i>text, hg=None, useClient=True, parent=None</i>) |
|
126 |
|
127 <p> |
|
128 Constructor |
|
129 </p> |
|
130 <dl> |
|
131 |
|
132 <dt><i>text</i></dt> |
|
133 <dd> |
|
134 text to be shown by the label (string) |
|
135 </dd> |
|
136 <dt><i>hg</i></dt> |
|
137 <dd> |
|
138 reference to the Mercurial interface object (Hg) |
|
139 </dd> |
|
140 <dt><i>useClient</i></dt> |
|
141 <dd> |
|
142 flag indicating to use the command server client |
|
143 if possible (boolean) |
|
144 </dd> |
|
145 <dt><i>parent</i></dt> |
|
146 <dd> |
|
147 parent widget (QWidget) |
|
148 </dd> |
|
149 </dl> |
|
150 <a NAME="HgDialog.__finish" ID="HgDialog.__finish"></a> |
|
151 <h4>HgDialog.__finish</h4> |
|
152 <b>__finish</b>(<i></i>) |
|
153 |
|
154 <p> |
|
155 Private slot called when the process finished or the user pressed |
|
156 the button. |
|
157 </p> |
|
158 <a NAME="HgDialog.__getInput" ID="HgDialog.__getInput"></a> |
|
159 <h4>HgDialog.__getInput</h4> |
|
160 <b>__getInput</b>(<i>size, message</i>) |
|
161 |
|
162 <p> |
|
163 Private method to get some input from the user. |
|
164 </p> |
|
165 <dl> |
|
166 |
|
167 <dt><i>size</i> (int)</dt> |
|
168 <dd> |
|
169 maximum length of the requested input |
|
170 </dd> |
|
171 <dt><i>message</i> (str)</dt> |
|
172 <dd> |
|
173 message sent by the server |
|
174 </dd> |
|
175 </dl> |
|
176 <dl> |
|
177 <dt>Return:</dt> |
|
178 <dd> |
|
179 tuple containing data entered by the user and |
|
180 a flag indicating a password input |
|
181 </dd> |
|
182 </dl> |
|
183 <dl> |
|
184 <dt>Return Type:</dt> |
|
185 <dd> |
|
186 tuple of (str, bool) |
|
187 </dd> |
|
188 </dl> |
|
189 <a NAME="HgDialog.__showError" ID="HgDialog.__showError"></a> |
|
190 <h4>HgDialog.__showError</h4> |
|
191 <b>__showError</b>(<i>out</i>) |
|
192 |
|
193 <p> |
|
194 Private slot to show some error. |
|
195 </p> |
|
196 <dl> |
|
197 |
|
198 <dt><i>out</i></dt> |
|
199 <dd> |
|
200 error to be shown (string) |
|
201 </dd> |
|
202 </dl> |
|
203 <a NAME="HgDialog.__showOutput" ID="HgDialog.__showOutput"></a> |
|
204 <h4>HgDialog.__showOutput</h4> |
|
205 <b>__showOutput</b>(<i>out</i>) |
|
206 |
|
207 <p> |
|
208 Private slot to show some output. |
|
209 </p> |
|
210 <dl> |
|
211 |
|
212 <dt><i>out</i></dt> |
|
213 <dd> |
|
214 output to be shown (string) |
|
215 </dd> |
|
216 </dl> |
|
217 <a NAME="HgDialog.hasAddOrDelete" ID="HgDialog.hasAddOrDelete"></a> |
|
218 <h4>HgDialog.hasAddOrDelete</h4> |
|
219 <b>hasAddOrDelete</b>(<i></i>) |
|
220 |
|
221 <p> |
|
222 Public method to check, if the last action contained an add or delete. |
|
223 </p> |
|
224 <dl> |
|
225 <dt>Return:</dt> |
|
226 <dd> |
|
227 flag indicating the presence of an add or delete (boolean) |
|
228 </dd> |
|
229 </dl> |
|
230 <a NAME="HgDialog.normalExit" ID="HgDialog.normalExit"></a> |
|
231 <h4>HgDialog.normalExit</h4> |
|
232 <b>normalExit</b>(<i></i>) |
|
233 |
|
234 <p> |
|
235 Public method to check for a normal process termination. |
|
236 </p> |
|
237 <dl> |
|
238 <dt>Return:</dt> |
|
239 <dd> |
|
240 flag indicating normal process termination (boolean) |
|
241 </dd> |
|
242 </dl> |
|
243 <a NAME="HgDialog.normalExitWithoutErrors" ID="HgDialog.normalExitWithoutErrors"></a> |
|
244 <h4>HgDialog.normalExitWithoutErrors</h4> |
|
245 <b>normalExitWithoutErrors</b>(<i></i>) |
|
246 |
|
247 <p> |
|
248 Public method to check for a normal process termination without |
|
249 error messages. |
|
250 </p> |
|
251 <dl> |
|
252 <dt>Return:</dt> |
|
253 <dd> |
|
254 flag indicating normal process termination (boolean) |
|
255 </dd> |
|
256 </dl> |
|
257 <a NAME="HgDialog.on_buttonBox_clicked" ID="HgDialog.on_buttonBox_clicked"></a> |
|
258 <h4>HgDialog.on_buttonBox_clicked</h4> |
|
259 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
260 |
|
261 <p> |
|
262 Private slot called by a button of the button box clicked. |
|
263 </p> |
|
264 <dl> |
|
265 |
|
266 <dt><i>button</i></dt> |
|
267 <dd> |
|
268 button that was clicked (QAbstractButton) |
|
269 </dd> |
|
270 </dl> |
|
271 <a NAME="HgDialog.startProcess" ID="HgDialog.startProcess"></a> |
|
272 <h4>HgDialog.startProcess</h4> |
|
273 <b>startProcess</b>(<i>args, showArgs=True, environment=None, client=None</i>) |
|
274 |
|
275 <p> |
|
276 Public slot used to start the process. |
|
277 </p> |
|
278 <dl> |
|
279 |
|
280 <dt><i>args</i> (list of str)</dt> |
|
281 <dd> |
|
282 list of arguments for the process |
|
283 </dd> |
|
284 <dt><i>showArgs</i> (bool)</dt> |
|
285 <dd> |
|
286 flag indicating to show the arguments |
|
287 </dd> |
|
288 <dt><i>environment</i> (dict)</dt> |
|
289 <dd> |
|
290 dictionary of environment settings to add |
|
291 or change for the git process |
|
292 </dd> |
|
293 <dt><i>client</i> (HgClient)</dt> |
|
294 <dd> |
|
295 reference to a non-standard command client |
|
296 </dd> |
|
297 </dl> |
|
298 <dl> |
|
299 <dt>Return:</dt> |
|
300 <dd> |
|
301 flag indicating a successful start of the process |
|
302 </dd> |
|
303 </dl> |
|
304 <dl> |
|
305 <dt>Return Type:</dt> |
|
306 <dd> |
|
307 bool |
|
308 </dd> |
|
309 </dl> |
|
310 <div align="right"><a href="#top">Up</a></div> |
|
311 <hr /> |
|
312 </body></html> |