|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelCommandDialog</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>Plugin_Project_Flask.ProjectFlask.FlaskBabelExtension.PyBabelCommandDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to run a flask command and show 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="#PyBabelCommandDialog">PyBabelCommandDialog</a></td> |
|
39 <td>Class implementing a dialog to run a flask command and show 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="PyBabelCommandDialog" ID="PyBabelCommandDialog"></a> |
|
50 <h2>PyBabelCommandDialog</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a dialog to run a flask command and show its output. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QDialog, Ui_FlaskCommandDialog |
|
57 <h3>Class Attributes</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Class Methods</h3> |
|
63 |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 |
|
69 <table> |
|
70 |
|
71 <tr> |
|
72 <td><a href="#PyBabelCommandDialog.__init__">PyBabelCommandDialog</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#PyBabelCommandDialog.__cancelProcess">__cancelProcess</a></td> |
|
77 <td>Private slot to terminate the current process.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#PyBabelCommandDialog.__processFinished">__processFinished</a></td> |
|
81 <td>Private slot connected to the finished signal.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#PyBabelCommandDialog.__readStdOut">__readStdOut</a></td> |
|
85 <td>Private slot to add the server process output to the output pane.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#PyBabelCommandDialog.closeEvent">closeEvent</a></td> |
|
89 <td>Protected method handling the close event of the dialog.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#PyBabelCommandDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
93 <td>Private slot handling presses of the button box buttons.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#PyBabelCommandDialog.startBatchCommand">startBatchCommand</a></td> |
|
97 <td>Public method to start a pybabel command repeatedly with a list of arguments and show the output.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#PyBabelCommandDialog.startCommand">startCommand</a></td> |
|
101 <td>Public method to start a pybabel command and show its output.</td> |
|
102 </tr> |
|
103 </table> |
|
104 <h3>Static Methods</h3> |
|
105 |
|
106 <table> |
|
107 <tr><td>None</td></tr> |
|
108 </table> |
|
109 |
|
110 <a NAME="PyBabelCommandDialog.__init__" ID="PyBabelCommandDialog.__init__"></a> |
|
111 <h4>PyBabelCommandDialog (Constructor)</h4> |
|
112 <b>PyBabelCommandDialog</b>(<i>project, title="", msgSuccess="", msgError="", parent=None</i>) |
|
113 |
|
114 <p> |
|
115 Constructor |
|
116 </p> |
|
117 <dl> |
|
118 |
|
119 <dt><i>project</i> (Project)</dt> |
|
120 <dd> |
|
121 reference to the project object |
|
122 </dd> |
|
123 <dt><i>title</i> (str)</dt> |
|
124 <dd> |
|
125 window title of the dialog |
|
126 </dd> |
|
127 <dt><i>msgSuccess</i> (str)</dt> |
|
128 <dd> |
|
129 success message to be shown |
|
130 </dd> |
|
131 <dt><i>msgError</i> (str)</dt> |
|
132 <dd> |
|
133 message to be shown on error |
|
134 </dd> |
|
135 <dt><i>parent</i> (QWidget)</dt> |
|
136 <dd> |
|
137 reference to the parent widget |
|
138 </dd> |
|
139 </dl> |
|
140 <a NAME="PyBabelCommandDialog.__cancelProcess" ID="PyBabelCommandDialog.__cancelProcess"></a> |
|
141 <h4>PyBabelCommandDialog.__cancelProcess</h4> |
|
142 <b>__cancelProcess</b>(<i></i>) |
|
143 |
|
144 <p> |
|
145 Private slot to terminate the current process. |
|
146 </p> |
|
147 <a NAME="PyBabelCommandDialog.__processFinished" ID="PyBabelCommandDialog.__processFinished"></a> |
|
148 <h4>PyBabelCommandDialog.__processFinished</h4> |
|
149 <b>__processFinished</b>(<i>exitCode, exitStatus</i>) |
|
150 |
|
151 <p> |
|
152 Private slot connected to the finished signal. |
|
153 </p> |
|
154 <dl> |
|
155 |
|
156 <dt><i>exitCode</i> (int)</dt> |
|
157 <dd> |
|
158 exit code of the process |
|
159 </dd> |
|
160 <dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
161 <dd> |
|
162 exit status of the process |
|
163 </dd> |
|
164 </dl> |
|
165 <a NAME="PyBabelCommandDialog.__readStdOut" ID="PyBabelCommandDialog.__readStdOut"></a> |
|
166 <h4>PyBabelCommandDialog.__readStdOut</h4> |
|
167 <b>__readStdOut</b>(<i></i>) |
|
168 |
|
169 <p> |
|
170 Private slot to add the server process output to the output pane. |
|
171 </p> |
|
172 <a NAME="PyBabelCommandDialog.closeEvent" ID="PyBabelCommandDialog.closeEvent"></a> |
|
173 <h4>PyBabelCommandDialog.closeEvent</h4> |
|
174 <b>closeEvent</b>(<i>evt</i>) |
|
175 |
|
176 <p> |
|
177 Protected method handling the close event of the dialog. |
|
178 </p> |
|
179 <dl> |
|
180 |
|
181 <dt><i>evt</i> (QCloseEvent)</dt> |
|
182 <dd> |
|
183 reference to the close event object |
|
184 </dd> |
|
185 </dl> |
|
186 <a NAME="PyBabelCommandDialog.on_buttonBox_clicked" ID="PyBabelCommandDialog.on_buttonBox_clicked"></a> |
|
187 <h4>PyBabelCommandDialog.on_buttonBox_clicked</h4> |
|
188 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
189 |
|
190 <p> |
|
191 Private slot handling presses of the button box buttons. |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>button</i> (QAbstractButton)</dt> |
|
196 <dd> |
|
197 reference to the button been clicked |
|
198 </dd> |
|
199 </dl> |
|
200 <a NAME="PyBabelCommandDialog.startBatchCommand" ID="PyBabelCommandDialog.startBatchCommand"></a> |
|
201 <h4>PyBabelCommandDialog.startBatchCommand</h4> |
|
202 <b>startBatchCommand</b>(<i>argsLists, workdir</i>) |
|
203 |
|
204 <p> |
|
205 Public method to start a pybabel command repeatedly with a list of |
|
206 arguments and show the output. |
|
207 </p> |
|
208 <dl> |
|
209 |
|
210 <dt><i>argsLists</i> (list of lists of str)</dt> |
|
211 <dd> |
|
212 list of command line arguments for the batch commands |
|
213 </dd> |
|
214 <dt><i>workdir</i> (str)</dt> |
|
215 <dd> |
|
216 working directory for the command |
|
217 </dd> |
|
218 </dl> |
|
219 <dl> |
|
220 <dt>Returns:</dt> |
|
221 <dd> |
|
222 flag indicating a successful start of the first process |
|
223 </dd> |
|
224 </dl> |
|
225 <dl> |
|
226 <dt>Return Type:</dt> |
|
227 <dd> |
|
228 bool |
|
229 </dd> |
|
230 </dl> |
|
231 <a NAME="PyBabelCommandDialog.startCommand" ID="PyBabelCommandDialog.startCommand"></a> |
|
232 <h4>PyBabelCommandDialog.startCommand</h4> |
|
233 <b>startCommand</b>(<i>command, args, workdir, clearOutput=True</i>) |
|
234 |
|
235 <p> |
|
236 Public method to start a pybabel command and show its output. |
|
237 </p> |
|
238 <dl> |
|
239 |
|
240 <dt><i>command</i> (str)</dt> |
|
241 <dd> |
|
242 pybabel command to be run |
|
243 </dd> |
|
244 <dt><i>args</i> (list of str)</dt> |
|
245 <dd> |
|
246 list of command line arguments for the command |
|
247 </dd> |
|
248 <dt><i>workdir</i> (str)</dt> |
|
249 <dd> |
|
250 working directory for the command |
|
251 </dd> |
|
252 <dt><i>clearOutput</i> (bool)</dt> |
|
253 <dd> |
|
254 flag indicating to clear the output |
|
255 </dd> |
|
256 </dl> |
|
257 <dl> |
|
258 <dt>Returns:</dt> |
|
259 <dd> |
|
260 flag indicating a successful start |
|
261 </dd> |
|
262 </dl> |
|
263 <dl> |
|
264 <dt>Return Type:</dt> |
|
265 <dd> |
|
266 bool |
|
267 </dd> |
|
268 </dl> |
|
269 <div align="right"><a href="#top">Up</a></div> |
|
270 <hr /> |
|
271 </body></html> |