16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.E5Gui.E5ProcessDialog</h1> |
23 <h1>eric6.E5Gui.E5ProcessDialog</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing a dialog starting a process and showing its output. |
26 Module implementing a dialog starting a process and showing its output. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
31 <table> |
34 |
|
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#E5ProcessDialog">E5ProcessDialog</a></td> |
38 <td><a href="#E5ProcessDialog">E5ProcessDialog</a></td> |
34 <td>Class implementing a dialog starting a process and showing its output.</td> |
39 <td>Class implementing a dialog starting a process and showing its output.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
38 <table> |
43 |
39 <tr><td>None</td></tr> |
44 <table> |
40 </table> |
45 <tr><td>None</td></tr> |
41 <hr /><hr /> |
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
42 <a NAME="E5ProcessDialog" ID="E5ProcessDialog"></a> |
49 <a NAME="E5ProcessDialog" ID="E5ProcessDialog"></a> |
43 <h2>E5ProcessDialog</h2> |
50 <h2>E5ProcessDialog</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing a dialog starting a process and showing its output. |
53 Class implementing a dialog starting a process and showing its output. |
46 </p><p> |
54 </p> |
|
55 <p> |
47 It starts a QProcess and displays a dialog that |
56 It starts a QProcess and displays a dialog that |
48 shows the output of the process. The dialog is modal, |
57 shows the output of the process. The dialog is modal, |
49 which causes a synchronized execution of the process. |
58 which causes a synchronized execution of the process. |
50 </p> |
59 </p> |
51 <h3>Derived from</h3> |
60 <h3>Derived from</h3> |
52 QDialog, Ui_E5ProcessDialog |
61 QDialog, Ui_E5ProcessDialog |
53 <h3>Class Attributes</h3> |
62 <h3>Class Attributes</h3> |
|
63 |
54 <table> |
64 <table> |
55 <tr><td>None</td></tr> |
65 <tr><td>None</td></tr> |
56 </table> |
66 </table> |
57 <h3>Class Methods</h3> |
67 <h3>Class Methods</h3> |
|
68 |
58 <table> |
69 <table> |
59 <tr><td>None</td></tr> |
70 <tr><td>None</td></tr> |
60 </table> |
71 </table> |
61 <h3>Methods</h3> |
72 <h3>Methods</h3> |
62 <table> |
73 |
|
74 <table> |
|
75 |
63 <tr> |
76 <tr> |
64 <td><a href="#E5ProcessDialog.__init__">E5ProcessDialog</a></td> |
77 <td><a href="#E5ProcessDialog.__init__">E5ProcessDialog</a></td> |
65 <td>Constructor</td> |
78 <td>Constructor</td> |
66 </tr><tr> |
79 </tr> |
|
80 <tr> |
67 <td><a href="#E5ProcessDialog.__finish">__finish</a></td> |
81 <td><a href="#E5ProcessDialog.__finish">__finish</a></td> |
68 <td>Private slot called when the process finished or the user pressed the button.</td> |
82 <td>Private slot called when the process finished or the user pressed the button.</td> |
69 </tr><tr> |
83 </tr> |
|
84 <tr> |
70 <td><a href="#E5ProcessDialog.__procFinished">__procFinished</a></td> |
85 <td><a href="#E5ProcessDialog.__procFinished">__procFinished</a></td> |
71 <td>Private slot connected to the finished signal.</td> |
86 <td>Private slot connected to the finished signal.</td> |
72 </tr><tr> |
87 </tr> |
|
88 <tr> |
73 <td><a href="#E5ProcessDialog.__readStderr">__readStderr</a></td> |
89 <td><a href="#E5ProcessDialog.__readStderr">__readStderr</a></td> |
74 <td>Private slot to handle the readyReadStandardError signal.</td> |
90 <td>Private slot to handle the readyReadStandardError signal.</td> |
75 </tr><tr> |
91 </tr> |
|
92 <tr> |
76 <td><a href="#E5ProcessDialog.__readStdout">__readStdout</a></td> |
93 <td><a href="#E5ProcessDialog.__readStdout">__readStdout</a></td> |
77 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
94 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
78 </tr><tr> |
95 </tr> |
|
96 <tr> |
79 <td><a href="#E5ProcessDialog.keyPressEvent">keyPressEvent</a></td> |
97 <td><a href="#E5ProcessDialog.keyPressEvent">keyPressEvent</a></td> |
80 <td>Protected slot to handle a key press event.</td> |
98 <td>Protected slot to handle a key press event.</td> |
81 </tr><tr> |
99 </tr> |
|
100 <tr> |
82 <td><a href="#E5ProcessDialog.normalExit">normalExit</a></td> |
101 <td><a href="#E5ProcessDialog.normalExit">normalExit</a></td> |
83 <td>Public method to check for a normal process termination.</td> |
102 <td>Public method to check for a normal process termination.</td> |
84 </tr><tr> |
103 </tr> |
|
104 <tr> |
85 <td><a href="#E5ProcessDialog.normalExitWithoutErrors">normalExitWithoutErrors</a></td> |
105 <td><a href="#E5ProcessDialog.normalExitWithoutErrors">normalExitWithoutErrors</a></td> |
86 <td>Public method to check for a normal process termination without error messages.</td> |
106 <td>Public method to check for a normal process termination without error messages.</td> |
87 </tr><tr> |
107 </tr> |
|
108 <tr> |
88 <td><a href="#E5ProcessDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
109 <td><a href="#E5ProcessDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
89 <td>Private slot called by a button of the button box clicked.</td> |
110 <td>Private slot called by a button of the button box clicked.</td> |
90 </tr><tr> |
111 </tr> |
|
112 <tr> |
91 <td><a href="#E5ProcessDialog.on_input_returnPressed">on_input_returnPressed</a></td> |
113 <td><a href="#E5ProcessDialog.on_input_returnPressed">on_input_returnPressed</a></td> |
92 <td>Private slot to handle the press of the return key in the input field.</td> |
114 <td>Private slot to handle the press of the return key in the input field.</td> |
93 </tr><tr> |
115 </tr> |
|
116 <tr> |
94 <td><a href="#E5ProcessDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td> |
117 <td><a href="#E5ProcessDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td> |
95 <td>Private slot to handle the password checkbox toggled.</td> |
118 <td>Private slot to handle the password checkbox toggled.</td> |
96 </tr><tr> |
119 </tr> |
|
120 <tr> |
97 <td><a href="#E5ProcessDialog.on_sendButton_clicked">on_sendButton_clicked</a></td> |
121 <td><a href="#E5ProcessDialog.on_sendButton_clicked">on_sendButton_clicked</a></td> |
98 <td>Private slot to send the input to the git process.</td> |
122 <td>Private slot to send the input to the git process.</td> |
99 </tr><tr> |
123 </tr> |
|
124 <tr> |
100 <td><a href="#E5ProcessDialog.startProcess">startProcess</a></td> |
125 <td><a href="#E5ProcessDialog.startProcess">startProcess</a></td> |
101 <td>Public slot used to start the process.</td> |
126 <td>Public slot used to start the process.</td> |
102 </tr> |
127 </tr> |
103 </table> |
128 </table> |
104 <h3>Static Methods</h3> |
129 <h3>Static Methods</h3> |
105 <table> |
130 |
106 <tr><td>None</td></tr> |
131 <table> |
107 </table> |
132 <tr><td>None</td></tr> |
|
133 </table> |
|
134 |
108 <a NAME="E5ProcessDialog.__init__" ID="E5ProcessDialog.__init__"></a> |
135 <a NAME="E5ProcessDialog.__init__" ID="E5ProcessDialog.__init__"></a> |
109 <h4>E5ProcessDialog (Constructor)</h4> |
136 <h4>E5ProcessDialog (Constructor)</h4> |
110 <b>E5ProcessDialog</b>(<i>outputTitle="", windowTitle="", parent=None</i>) |
137 <b>E5ProcessDialog</b>(<i>outputTitle="", windowTitle="", parent=None</i>) |
|
138 |
111 <p> |
139 <p> |
112 Constructor |
140 Constructor |
113 </p><dl> |
141 </p> |
|
142 <dl> |
|
143 |
114 <dt><i>outputTitle</i> (str)</dt> |
144 <dt><i>outputTitle</i> (str)</dt> |
115 <dd> |
145 <dd> |
116 title for the output group |
146 title for the output group |
117 </dd><dt><i>windowTitle</i> (str)</dt> |
147 </dd> |
|
148 <dt><i>windowTitle</i> (str)</dt> |
118 <dd> |
149 <dd> |
119 title of the dialog |
150 title of the dialog |
120 </dd><dt><i>parent</i> (QWidget)</dt> |
151 </dd> |
|
152 <dt><i>parent</i> (QWidget)</dt> |
121 <dd> |
153 <dd> |
122 reference to the parent widget |
154 reference to the parent widget |
123 </dd> |
155 </dd> |
124 </dl><a NAME="E5ProcessDialog.__finish" ID="E5ProcessDialog.__finish"></a> |
156 </dl> |
|
157 <a NAME="E5ProcessDialog.__finish" ID="E5ProcessDialog.__finish"></a> |
125 <h4>E5ProcessDialog.__finish</h4> |
158 <h4>E5ProcessDialog.__finish</h4> |
126 <b>__finish</b>(<i></i>) |
159 <b>__finish</b>(<i></i>) |
|
160 |
127 <p> |
161 <p> |
128 Private slot called when the process finished or the user pressed |
162 Private slot called when the process finished or the user pressed |
129 the button. |
163 the button. |
130 </p><a NAME="E5ProcessDialog.__procFinished" ID="E5ProcessDialog.__procFinished"></a> |
164 </p> |
|
165 <a NAME="E5ProcessDialog.__procFinished" ID="E5ProcessDialog.__procFinished"></a> |
131 <h4>E5ProcessDialog.__procFinished</h4> |
166 <h4>E5ProcessDialog.__procFinished</h4> |
132 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
167 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
168 |
133 <p> |
169 <p> |
134 Private slot connected to the finished signal. |
170 Private slot connected to the finished signal. |
135 </p><dl> |
171 </p> |
|
172 <dl> |
|
173 |
136 <dt><i>exitCode</i> (int)</dt> |
174 <dt><i>exitCode</i> (int)</dt> |
137 <dd> |
175 <dd> |
138 exit code of the process |
176 exit code of the process |
139 </dd><dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
177 </dd> |
|
178 <dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
140 <dd> |
179 <dd> |
141 exit status of the process |
180 exit status of the process |
142 </dd> |
181 </dd> |
143 </dl><a NAME="E5ProcessDialog.__readStderr" ID="E5ProcessDialog.__readStderr"></a> |
182 </dl> |
|
183 <a NAME="E5ProcessDialog.__readStderr" ID="E5ProcessDialog.__readStderr"></a> |
144 <h4>E5ProcessDialog.__readStderr</h4> |
184 <h4>E5ProcessDialog.__readStderr</h4> |
145 <b>__readStderr</b>(<i></i>) |
185 <b>__readStderr</b>(<i></i>) |
|
186 |
146 <p> |
187 <p> |
147 Private slot to handle the readyReadStandardError signal. |
188 Private slot to handle the readyReadStandardError signal. |
148 </p><p> |
189 </p> |
|
190 <p> |
149 It reads the error output of the process and inserts it into the |
191 It reads the error output of the process and inserts it into the |
150 error pane. |
192 error pane. |
151 </p><a NAME="E5ProcessDialog.__readStdout" ID="E5ProcessDialog.__readStdout"></a> |
193 </p> |
|
194 <a NAME="E5ProcessDialog.__readStdout" ID="E5ProcessDialog.__readStdout"></a> |
152 <h4>E5ProcessDialog.__readStdout</h4> |
195 <h4>E5ProcessDialog.__readStdout</h4> |
153 <b>__readStdout</b>(<i></i>) |
196 <b>__readStdout</b>(<i></i>) |
|
197 |
154 <p> |
198 <p> |
155 Private slot to handle the readyReadStandardOutput signal. |
199 Private slot to handle the readyReadStandardOutput signal. |
156 </p><p> |
200 </p> |
|
201 <p> |
157 It reads the output of the process and inserts it into the |
202 It reads the output of the process and inserts it into the |
158 output pane. |
203 output pane. |
159 </p><a NAME="E5ProcessDialog.keyPressEvent" ID="E5ProcessDialog.keyPressEvent"></a> |
204 </p> |
|
205 <a NAME="E5ProcessDialog.keyPressEvent" ID="E5ProcessDialog.keyPressEvent"></a> |
160 <h4>E5ProcessDialog.keyPressEvent</h4> |
206 <h4>E5ProcessDialog.keyPressEvent</h4> |
161 <b>keyPressEvent</b>(<i>evt</i>) |
207 <b>keyPressEvent</b>(<i>evt</i>) |
|
208 |
162 <p> |
209 <p> |
163 Protected slot to handle a key press event. |
210 Protected slot to handle a key press event. |
164 </p><dl> |
211 </p> |
|
212 <dl> |
|
213 |
165 <dt><i>evt</i></dt> |
214 <dt><i>evt</i></dt> |
166 <dd> |
215 <dd> |
167 the key press event (QKeyEvent) |
216 the key press event (QKeyEvent) |
168 </dd> |
217 </dd> |
169 </dl><a NAME="E5ProcessDialog.normalExit" ID="E5ProcessDialog.normalExit"></a> |
218 </dl> |
|
219 <a NAME="E5ProcessDialog.normalExit" ID="E5ProcessDialog.normalExit"></a> |
170 <h4>E5ProcessDialog.normalExit</h4> |
220 <h4>E5ProcessDialog.normalExit</h4> |
171 <b>normalExit</b>(<i></i>) |
221 <b>normalExit</b>(<i></i>) |
|
222 |
172 <p> |
223 <p> |
173 Public method to check for a normal process termination. |
224 Public method to check for a normal process termination. |
174 </p><dl> |
225 </p> |
|
226 <dl> |
175 <dt>Returns:</dt> |
227 <dt>Returns:</dt> |
176 <dd> |
228 <dd> |
177 flag indicating normal process termination |
229 flag indicating normal process termination |
178 </dd> |
230 </dd> |
179 </dl><dl> |
231 </dl> |
|
232 <dl> |
180 <dt>Return Type:</dt> |
233 <dt>Return Type:</dt> |
181 <dd> |
234 <dd> |
182 bool |
235 bool |
183 </dd> |
236 </dd> |
184 </dl><a NAME="E5ProcessDialog.normalExitWithoutErrors" ID="E5ProcessDialog.normalExitWithoutErrors"></a> |
237 </dl> |
|
238 <a NAME="E5ProcessDialog.normalExitWithoutErrors" ID="E5ProcessDialog.normalExitWithoutErrors"></a> |
185 <h4>E5ProcessDialog.normalExitWithoutErrors</h4> |
239 <h4>E5ProcessDialog.normalExitWithoutErrors</h4> |
186 <b>normalExitWithoutErrors</b>(<i></i>) |
240 <b>normalExitWithoutErrors</b>(<i></i>) |
|
241 |
187 <p> |
242 <p> |
188 Public method to check for a normal process termination without |
243 Public method to check for a normal process termination without |
189 error messages. |
244 error messages. |
190 </p><dl> |
245 </p> |
|
246 <dl> |
191 <dt>Returns:</dt> |
247 <dt>Returns:</dt> |
192 <dd> |
248 <dd> |
193 flag indicating normal process termination |
249 flag indicating normal process termination |
194 </dd> |
250 </dd> |
195 </dl><dl> |
251 </dl> |
|
252 <dl> |
196 <dt>Return Type:</dt> |
253 <dt>Return Type:</dt> |
197 <dd> |
254 <dd> |
198 bool |
255 bool |
199 </dd> |
256 </dd> |
200 </dl><a NAME="E5ProcessDialog.on_buttonBox_clicked" ID="E5ProcessDialog.on_buttonBox_clicked"></a> |
257 </dl> |
|
258 <a NAME="E5ProcessDialog.on_buttonBox_clicked" ID="E5ProcessDialog.on_buttonBox_clicked"></a> |
201 <h4>E5ProcessDialog.on_buttonBox_clicked</h4> |
259 <h4>E5ProcessDialog.on_buttonBox_clicked</h4> |
202 <b>on_buttonBox_clicked</b>(<i>button</i>) |
260 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
261 |
203 <p> |
262 <p> |
204 Private slot called by a button of the button box clicked. |
263 Private slot called by a button of the button box clicked. |
205 </p><dl> |
264 </p> |
|
265 <dl> |
|
266 |
206 <dt><i>button</i> (QAbstractButton)</dt> |
267 <dt><i>button</i> (QAbstractButton)</dt> |
207 <dd> |
268 <dd> |
208 button that was clicked |
269 button that was clicked |
209 </dd> |
270 </dd> |
210 </dl><a NAME="E5ProcessDialog.on_input_returnPressed" ID="E5ProcessDialog.on_input_returnPressed"></a> |
271 </dl> |
|
272 <a NAME="E5ProcessDialog.on_input_returnPressed" ID="E5ProcessDialog.on_input_returnPressed"></a> |
211 <h4>E5ProcessDialog.on_input_returnPressed</h4> |
273 <h4>E5ProcessDialog.on_input_returnPressed</h4> |
212 <b>on_input_returnPressed</b>(<i></i>) |
274 <b>on_input_returnPressed</b>(<i></i>) |
|
275 |
213 <p> |
276 <p> |
214 Private slot to handle the press of the return key in the input field. |
277 Private slot to handle the press of the return key in the input field. |
215 </p><a NAME="E5ProcessDialog.on_passwordCheckBox_toggled" ID="E5ProcessDialog.on_passwordCheckBox_toggled"></a> |
278 </p> |
|
279 <a NAME="E5ProcessDialog.on_passwordCheckBox_toggled" ID="E5ProcessDialog.on_passwordCheckBox_toggled"></a> |
216 <h4>E5ProcessDialog.on_passwordCheckBox_toggled</h4> |
280 <h4>E5ProcessDialog.on_passwordCheckBox_toggled</h4> |
217 <b>on_passwordCheckBox_toggled</b>(<i>isOn</i>) |
281 <b>on_passwordCheckBox_toggled</b>(<i>isOn</i>) |
|
282 |
218 <p> |
283 <p> |
219 Private slot to handle the password checkbox toggled. |
284 Private slot to handle the password checkbox toggled. |
220 </p><dl> |
285 </p> |
|
286 <dl> |
|
287 |
221 <dt><i>isOn</i> (bool)</dt> |
288 <dt><i>isOn</i> (bool)</dt> |
222 <dd> |
289 <dd> |
223 flag indicating the status of the check box |
290 flag indicating the status of the check box |
224 </dd> |
291 </dd> |
225 </dl><a NAME="E5ProcessDialog.on_sendButton_clicked" ID="E5ProcessDialog.on_sendButton_clicked"></a> |
292 </dl> |
|
293 <a NAME="E5ProcessDialog.on_sendButton_clicked" ID="E5ProcessDialog.on_sendButton_clicked"></a> |
226 <h4>E5ProcessDialog.on_sendButton_clicked</h4> |
294 <h4>E5ProcessDialog.on_sendButton_clicked</h4> |
227 <b>on_sendButton_clicked</b>(<i></i>) |
295 <b>on_sendButton_clicked</b>(<i></i>) |
|
296 |
228 <p> |
297 <p> |
229 Private slot to send the input to the git process. |
298 Private slot to send the input to the git process. |
230 </p><a NAME="E5ProcessDialog.startProcess" ID="E5ProcessDialog.startProcess"></a> |
299 </p> |
|
300 <a NAME="E5ProcessDialog.startProcess" ID="E5ProcessDialog.startProcess"></a> |
231 <h4>E5ProcessDialog.startProcess</h4> |
301 <h4>E5ProcessDialog.startProcess</h4> |
232 <b>startProcess</b>(<i>program, args, workingDir=None, showArgs=True, environment=None</i>) |
302 <b>startProcess</b>(<i>program, args, workingDir=None, showArgs=True, environment=None</i>) |
|
303 |
233 <p> |
304 <p> |
234 Public slot used to start the process. |
305 Public slot used to start the process. |
235 </p><dl> |
306 </p> |
|
307 <dl> |
|
308 |
236 <dt><i>program</i> (str)</dt> |
309 <dt><i>program</i> (str)</dt> |
237 <dd> |
310 <dd> |
238 path of the program to be executed |
311 path of the program to be executed |
239 </dd><dt><i>args</i> (list of str)</dt> |
312 </dd> |
|
313 <dt><i>args</i> (list of str)</dt> |
240 <dd> |
314 <dd> |
241 list of arguments for the process |
315 list of arguments for the process |
242 </dd><dt><i>workingDir</i> (str)</dt> |
316 </dd> |
|
317 <dt><i>workingDir</i> (str)</dt> |
243 <dd> |
318 <dd> |
244 working directory for the process |
319 working directory for the process |
245 </dd><dt><i>showArgs</i> (bool)</dt> |
320 </dd> |
|
321 <dt><i>showArgs</i> (bool)</dt> |
246 <dd> |
322 <dd> |
247 flag indicating to show the arguments |
323 flag indicating to show the arguments |
248 </dd><dt><i>environment</i> (dict)</dt> |
324 </dd> |
|
325 <dt><i>environment</i> (dict)</dt> |
249 <dd> |
326 <dd> |
250 dictionary of environment settings to add |
327 dictionary of environment settings to add |
251 or change for the process |
328 or change for the process |
252 </dd> |
329 </dd> |
253 </dl><dl> |
330 </dl> |
|
331 <dl> |
254 <dt>Returns:</dt> |
332 <dt>Returns:</dt> |
255 <dd> |
333 <dd> |
256 flag indicating a successful start of the process |
334 flag indicating a successful start of the process |
257 </dd> |
335 </dd> |
258 </dl><dl> |
336 </dl> |
|
337 <dl> |
259 <dt>Return Type:</dt> |
338 <dt>Return Type:</dt> |
260 <dd> |
339 <dd> |
261 bool |
340 bool |
262 </dd> |
341 </dd> |
263 </dl> |
342 </dl> |