|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Project_Flask.ProjectFlask.FlaskCommandDialog</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.FlaskCommandDialog</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="#FlaskCommandDialog">FlaskCommandDialog</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="FlaskCommandDialog" ID="FlaskCommandDialog"></a> |
|
50 <h2>FlaskCommandDialog</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="#FlaskCommandDialog.__init__">FlaskCommandDialog</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#FlaskCommandDialog.__cancelProcess">__cancelProcess</a></td> |
|
77 <td>Private slot to terminate the current process.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#FlaskCommandDialog.__processFinished">__processFinished</a></td> |
|
81 <td>Private slot connected to the finished signal.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#FlaskCommandDialog.__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="#FlaskCommandDialog.closeEvent">closeEvent</a></td> |
|
89 <td>Protected method handling the close event of the dialog.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#FlaskCommandDialog.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="#FlaskCommandDialog.startCommand">startCommand</a></td> |
|
97 <td>Public method to start a flask command and show its output.</td> |
|
98 </tr> |
|
99 </table> |
|
100 <h3>Static Methods</h3> |
|
101 |
|
102 <table> |
|
103 <tr><td>None</td></tr> |
|
104 </table> |
|
105 |
|
106 <a NAME="FlaskCommandDialog.__init__" ID="FlaskCommandDialog.__init__"></a> |
|
107 <h4>FlaskCommandDialog (Constructor)</h4> |
|
108 <b>FlaskCommandDialog</b>(<i>project, title="", msgSuccess="", msgError="", parent=None</i>) |
|
109 |
|
110 <p> |
|
111 Constructor |
|
112 </p> |
|
113 <dl> |
|
114 |
|
115 <dt><i>project</i> (Project)</dt> |
|
116 <dd> |
|
117 reference to the project object |
|
118 </dd> |
|
119 <dt><i>title</i> (str)</dt> |
|
120 <dd> |
|
121 window title of the dialog |
|
122 </dd> |
|
123 <dt><i>msgSuccess</i> (str)</dt> |
|
124 <dd> |
|
125 success message to be shown |
|
126 </dd> |
|
127 <dt><i>msgError</i> (str)</dt> |
|
128 <dd> |
|
129 message to be shown on error |
|
130 </dd> |
|
131 <dt><i>parent</i> (QWidget)</dt> |
|
132 <dd> |
|
133 reference to the parent widget |
|
134 </dd> |
|
135 </dl> |
|
136 <a NAME="FlaskCommandDialog.__cancelProcess" ID="FlaskCommandDialog.__cancelProcess"></a> |
|
137 <h4>FlaskCommandDialog.__cancelProcess</h4> |
|
138 <b>__cancelProcess</b>(<i></i>) |
|
139 |
|
140 <p> |
|
141 Private slot to terminate the current process. |
|
142 </p> |
|
143 <a NAME="FlaskCommandDialog.__processFinished" ID="FlaskCommandDialog.__processFinished"></a> |
|
144 <h4>FlaskCommandDialog.__processFinished</h4> |
|
145 <b>__processFinished</b>(<i>exitCode, exitStatus</i>) |
|
146 |
|
147 <p> |
|
148 Private slot connected to the finished signal. |
|
149 </p> |
|
150 <dl> |
|
151 |
|
152 <dt><i>exitCode</i> (int)</dt> |
|
153 <dd> |
|
154 exit code of the process |
|
155 </dd> |
|
156 <dt><i>exitStatus</i> (QProcess.ExitStatus)</dt> |
|
157 <dd> |
|
158 exit status of the process |
|
159 </dd> |
|
160 </dl> |
|
161 <a NAME="FlaskCommandDialog.__readStdOut" ID="FlaskCommandDialog.__readStdOut"></a> |
|
162 <h4>FlaskCommandDialog.__readStdOut</h4> |
|
163 <b>__readStdOut</b>(<i></i>) |
|
164 |
|
165 <p> |
|
166 Private slot to add the server process output to the output pane. |
|
167 </p> |
|
168 <a NAME="FlaskCommandDialog.closeEvent" ID="FlaskCommandDialog.closeEvent"></a> |
|
169 <h4>FlaskCommandDialog.closeEvent</h4> |
|
170 <b>closeEvent</b>(<i>evt</i>) |
|
171 |
|
172 <p> |
|
173 Protected method handling the close event of the dialog. |
|
174 </p> |
|
175 <dl> |
|
176 |
|
177 <dt><i>evt</i> (QCloseEvent)</dt> |
|
178 <dd> |
|
179 reference to the close event object |
|
180 </dd> |
|
181 </dl> |
|
182 <a NAME="FlaskCommandDialog.on_buttonBox_clicked" ID="FlaskCommandDialog.on_buttonBox_clicked"></a> |
|
183 <h4>FlaskCommandDialog.on_buttonBox_clicked</h4> |
|
184 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
185 |
|
186 <p> |
|
187 Private slot handling presses of the button box buttons. |
|
188 </p> |
|
189 <dl> |
|
190 |
|
191 <dt><i>button</i> (QAbstractButton)</dt> |
|
192 <dd> |
|
193 reference to the button been clicked |
|
194 </dd> |
|
195 </dl> |
|
196 <a NAME="FlaskCommandDialog.startCommand" ID="FlaskCommandDialog.startCommand"></a> |
|
197 <h4>FlaskCommandDialog.startCommand</h4> |
|
198 <b>startCommand</b>(<i>command, args=None</i>) |
|
199 |
|
200 <p> |
|
201 Public method to start a flask command and show its output. |
|
202 </p> |
|
203 <dl> |
|
204 |
|
205 <dt><i>command</i> (str)</dt> |
|
206 <dd> |
|
207 flask command to be run |
|
208 </dd> |
|
209 <dt><i>args</i> (list of str)</dt> |
|
210 <dd> |
|
211 list of command line arguments for the command |
|
212 </dd> |
|
213 </dl> |
|
214 <dl> |
|
215 <dt>Returns:</dt> |
|
216 <dd> |
|
217 flag indicating a successful start |
|
218 </dd> |
|
219 </dl> |
|
220 <dl> |
|
221 <dt>Return Type:</dt> |
|
222 <dd> |
|
223 bool |
|
224 </dd> |
|
225 </dl> |
|
226 <div align="right"><a href="#top">Up</a></div> |
|
227 <hr /> |
|
228 </body></html> |