|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.E5Gui.E5ProcessDialog</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><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.E5Gui.E5ProcessDialog</h1> |
|
23 <p> |
|
24 Module implementing a dialog starting a process and showing its output. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#E5ProcessDialog">E5ProcessDialog</a></td> |
|
34 <td>Class implementing a dialog starting a process and showing its output.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="E5ProcessDialog" ID="E5ProcessDialog"></a> |
|
43 <h2>E5ProcessDialog</h2> |
|
44 <p> |
|
45 Class implementing a dialog starting a process and showing its output. |
|
46 </p><p> |
|
47 It starts a QProcess and displays a dialog that |
|
48 shows the output of the process. The dialog is modal, |
|
49 which causes a synchronized execution of the process. |
|
50 </p> |
|
51 <h3>Derived from</h3> |
|
52 QDialog, Ui_E5ProcessDialog |
|
53 <h3>Class Attributes</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Class Methods</h3> |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 <table> |
|
63 <tr> |
|
64 <td><a href="#E5ProcessDialog.__init__">E5ProcessDialog</a></td> |
|
65 <td>Constructor</td> |
|
66 </tr><tr> |
|
67 <td><a href="#E5ProcessDialog.__finish">__finish</a></td> |
|
68 <td>Private slot called when the process finished or the user pressed the button.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#E5ProcessDialog.__procFinished">__procFinished</a></td> |
|
71 <td>Private slot connected to the finished signal.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#E5ProcessDialog.__readStderr">__readStderr</a></td> |
|
74 <td>Private slot to handle the readyReadStandardError signal.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#E5ProcessDialog.__readStdout">__readStdout</a></td> |
|
77 <td>Private slot to handle the readyReadStandardOutput signal.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#E5ProcessDialog.keyPressEvent">keyPressEvent</a></td> |
|
80 <td>Protected slot to handle a key press event.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#E5ProcessDialog.normalExit">normalExit</a></td> |
|
83 <td>Public method to check for a normal process termination.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#E5ProcessDialog.normalExitWithoutErrors">normalExitWithoutErrors</a></td> |
|
86 <td>Public method to check for a normal process termination without error messages.</td> |
|
87 </tr><tr> |
|
88 <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> |
|
90 </tr><tr> |
|
91 <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> |
|
93 </tr><tr> |
|
94 <td><a href="#E5ProcessDialog.on_passwordCheckBox_toggled">on_passwordCheckBox_toggled</a></td> |
|
95 <td>Private slot to handle the password checkbox toggled.</td> |
|
96 </tr><tr> |
|
97 <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> |
|
99 </tr><tr> |
|
100 <td><a href="#E5ProcessDialog.startProcess">startProcess</a></td> |
|
101 <td>Public slot used to start the process.</td> |
|
102 </tr> |
|
103 </table> |
|
104 <h3>Static Methods</h3> |
|
105 <table> |
|
106 <tr><td>None</td></tr> |
|
107 </table> |
|
108 <a NAME="E5ProcessDialog.__init__" ID="E5ProcessDialog.__init__"></a> |
|
109 <h4>E5ProcessDialog (Constructor)</h4> |
|
110 <b>E5ProcessDialog</b>(<i>outputTitle="", windowTitle="", parent=None</i>) |
|
111 <p> |
|
112 Constructor |
|
113 </p><dl> |
|
114 <dt><i>outputTitle</i> (str)</dt> |
|
115 <dd> |
|
116 title for the output group |
|
117 </dd><dt><i>windowTitle</i> (str)</dt> |
|
118 <dd> |
|
119 title of the dialog |
|
120 </dd><dt><i>parent</i> (QWidget)</dt> |
|
121 <dd> |
|
122 reference to the parent widget |
|
123 </dd> |
|
124 </dl><a NAME="E5ProcessDialog.__finish" ID="E5ProcessDialog.__finish"></a> |
|
125 <h4>E5ProcessDialog.__finish</h4> |
|
126 <b>__finish</b>(<i></i>) |
|
127 <p> |
|
128 Private slot called when the process finished or the user pressed |
|
129 the button. |
|
130 </p><a NAME="E5ProcessDialog.__procFinished" ID="E5ProcessDialog.__procFinished"></a> |
|
131 <h4>E5ProcessDialog.__procFinished</h4> |
|
132 <b>__procFinished</b>(<i>exitCode, exitStatus</i>) |
|
133 <p> |
|
134 Private slot connected to the finished signal. |
|
135 </p><dl> |
|
136 <dt><i>exitCode</i> (int)</dt> |
|
137 <dd> |
|
138 exit code of the process |
|
139 </dd><dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
140 <dd> |
|
141 exit status of the process |
|
142 </dd> |
|
143 </dl><a NAME="E5ProcessDialog.__readStderr" ID="E5ProcessDialog.__readStderr"></a> |
|
144 <h4>E5ProcessDialog.__readStderr</h4> |
|
145 <b>__readStderr</b>(<i></i>) |
|
146 <p> |
|
147 Private slot to handle the readyReadStandardError signal. |
|
148 </p><p> |
|
149 It reads the error output of the process and inserts it into the |
|
150 error pane. |
|
151 </p><a NAME="E5ProcessDialog.__readStdout" ID="E5ProcessDialog.__readStdout"></a> |
|
152 <h4>E5ProcessDialog.__readStdout</h4> |
|
153 <b>__readStdout</b>(<i></i>) |
|
154 <p> |
|
155 Private slot to handle the readyReadStandardOutput signal. |
|
156 </p><p> |
|
157 It reads the output of the process and inserts it into the |
|
158 output pane. |
|
159 </p><a NAME="E5ProcessDialog.keyPressEvent" ID="E5ProcessDialog.keyPressEvent"></a> |
|
160 <h4>E5ProcessDialog.keyPressEvent</h4> |
|
161 <b>keyPressEvent</b>(<i>evt</i>) |
|
162 <p> |
|
163 Protected slot to handle a key press event. |
|
164 </p><dl> |
|
165 <dt><i>evt</i></dt> |
|
166 <dd> |
|
167 the key press event (QKeyEvent) |
|
168 </dd> |
|
169 </dl><a NAME="E5ProcessDialog.normalExit" ID="E5ProcessDialog.normalExit"></a> |
|
170 <h4>E5ProcessDialog.normalExit</h4> |
|
171 <b>normalExit</b>(<i></i>) |
|
172 <p> |
|
173 Public method to check for a normal process termination. |
|
174 </p><dl> |
|
175 <dt>Returns:</dt> |
|
176 <dd> |
|
177 flag indicating normal process termination |
|
178 </dd> |
|
179 </dl><dl> |
|
180 <dt>Return Type:</dt> |
|
181 <dd> |
|
182 bool |
|
183 </dd> |
|
184 </dl><a NAME="E5ProcessDialog.normalExitWithoutErrors" ID="E5ProcessDialog.normalExitWithoutErrors"></a> |
|
185 <h4>E5ProcessDialog.normalExitWithoutErrors</h4> |
|
186 <b>normalExitWithoutErrors</b>(<i></i>) |
|
187 <p> |
|
188 Public method to check for a normal process termination without |
|
189 error messages. |
|
190 </p><dl> |
|
191 <dt>Returns:</dt> |
|
192 <dd> |
|
193 flag indicating normal process termination |
|
194 </dd> |
|
195 </dl><dl> |
|
196 <dt>Return Type:</dt> |
|
197 <dd> |
|
198 bool |
|
199 </dd> |
|
200 </dl><a NAME="E5ProcessDialog.on_buttonBox_clicked" ID="E5ProcessDialog.on_buttonBox_clicked"></a> |
|
201 <h4>E5ProcessDialog.on_buttonBox_clicked</h4> |
|
202 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
203 <p> |
|
204 Private slot called by a button of the button box clicked. |
|
205 </p><dl> |
|
206 <dt><i>button</i> (QAbstractButton)</dt> |
|
207 <dd> |
|
208 button that was clicked |
|
209 </dd> |
|
210 </dl><a NAME="E5ProcessDialog.on_input_returnPressed" ID="E5ProcessDialog.on_input_returnPressed"></a> |
|
211 <h4>E5ProcessDialog.on_input_returnPressed</h4> |
|
212 <b>on_input_returnPressed</b>(<i></i>) |
|
213 <p> |
|
214 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> |
|
216 <h4>E5ProcessDialog.on_passwordCheckBox_toggled</h4> |
|
217 <b>on_passwordCheckBox_toggled</b>(<i>isOn</i>) |
|
218 <p> |
|
219 Private slot to handle the password checkbox toggled. |
|
220 </p><dl> |
|
221 <dt><i>isOn</i> (bool)</dt> |
|
222 <dd> |
|
223 flag indicating the status of the check box |
|
224 </dd> |
|
225 </dl><a NAME="E5ProcessDialog.on_sendButton_clicked" ID="E5ProcessDialog.on_sendButton_clicked"></a> |
|
226 <h4>E5ProcessDialog.on_sendButton_clicked</h4> |
|
227 <b>on_sendButton_clicked</b>(<i></i>) |
|
228 <p> |
|
229 Private slot to send the input to the git process. |
|
230 </p><a NAME="E5ProcessDialog.startProcess" ID="E5ProcessDialog.startProcess"></a> |
|
231 <h4>E5ProcessDialog.startProcess</h4> |
|
232 <b>startProcess</b>(<i>program, args, workingDir=None, showArgs=True, environment=None</i>) |
|
233 <p> |
|
234 Public slot used to start the process. |
|
235 </p><dl> |
|
236 <dt><i>program</i> (str)</dt> |
|
237 <dd> |
|
238 path of the program to be executed |
|
239 </dd><dt><i>args</i> (list of str)</dt> |
|
240 <dd> |
|
241 list of arguments for the process |
|
242 </dd><dt><i>workingDir</i> (str)</dt> |
|
243 <dd> |
|
244 working directory for the process |
|
245 </dd><dt><i>showArgs</i> (bool)</dt> |
|
246 <dd> |
|
247 flag indicating to show the arguments |
|
248 </dd><dt><i>environment</i> (dict)</dt> |
|
249 <dd> |
|
250 dictionary of environment settings to add |
|
251 or change for the process |
|
252 </dd> |
|
253 </dl><dl> |
|
254 <dt>Returns:</dt> |
|
255 <dd> |
|
256 flag indicating a successful start of the process |
|
257 </dd> |
|
258 </dl><dl> |
|
259 <dt>Return Type:</dt> |
|
260 <dd> |
|
261 bool |
|
262 </dd> |
|
263 </dl> |
|
264 <div align="right"><a href="#top">Up</a></div> |
|
265 <hr /> |
|
266 </body></html> |