|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Project_Flask.ProjectFlask.RunServerDialog</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.RunServerDialog</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a dialog to run the Flask server. |
|
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="#RunServerDialog">RunServerDialog</a></td> |
|
39 <td>Class implementing a dialog to run the Flask server.</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="RunServerDialog" ID="RunServerDialog"></a> |
|
50 <h2>RunServerDialog</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing a dialog to run the Flask server. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QDialog, Ui_RunServerDialog |
|
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="#RunServerDialog.__init__">RunServerDialog</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#RunServerDialog.__initActionsMenu">__initActionsMenu</a></td> |
|
77 <td>Private method to populate the actions button menu.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#RunServerDialog.__processFinished">__processFinished</a></td> |
|
81 <td>Private slot handling the finishing of the server process.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#RunServerDialog.__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="#RunServerDialog.__restartServer">__restartServer</a></td> |
|
89 <td>Private slot to restart the server process.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#RunServerDialog.__restartServerDifferentMode">__restartServerDifferentMode</a></td> |
|
93 <td>Private slot to restart the server process with the opposite mode.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#RunServerDialog.__restartServerWithOptions">__restartServerWithOptions</a></td> |
|
97 <td>Private slot to restart the server asking for start options.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#RunServerDialog.__showActionsMenu">__showActionsMenu</a></td> |
|
101 <td>Private slot handling the actions menu about to be shown.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#RunServerDialog.closeEvent">closeEvent</a></td> |
|
105 <td>Protected method handling a close event.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#RunServerDialog.on_startBrowserButton_clicked">on_startBrowserButton_clicked</a></td> |
|
109 <td>Private slot to start a web browser with the server URL.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#RunServerDialog.on_stopServerButton_clicked">on_stopServerButton_clicked</a></td> |
|
113 <td>Private slot to stop the running server.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#RunServerDialog.startServer">startServer</a></td> |
|
117 <td>Public method to start the Flask server process.</td> |
|
118 </tr> |
|
119 </table> |
|
120 <h3>Static Methods</h3> |
|
121 |
|
122 <table> |
|
123 <tr><td>None</td></tr> |
|
124 </table> |
|
125 |
|
126 <a NAME="RunServerDialog.__init__" ID="RunServerDialog.__init__"></a> |
|
127 <h4>RunServerDialog (Constructor)</h4> |
|
128 <b>RunServerDialog</b>(<i>plugin, project, parent=None</i>) |
|
129 |
|
130 <p> |
|
131 Constructor |
|
132 </p> |
|
133 <dl> |
|
134 |
|
135 <dt><i>plugin</i> (PluginProjectFlask)</dt> |
|
136 <dd> |
|
137 reference to the plug-in object |
|
138 </dd> |
|
139 <dt><i>project</i> (Project)</dt> |
|
140 <dd> |
|
141 reference to the project object |
|
142 </dd> |
|
143 <dt><i>parent</i> (QWidget)</dt> |
|
144 <dd> |
|
145 reference to the parent widget |
|
146 </dd> |
|
147 </dl> |
|
148 <a NAME="RunServerDialog.__initActionsMenu" ID="RunServerDialog.__initActionsMenu"></a> |
|
149 <h4>RunServerDialog.__initActionsMenu</h4> |
|
150 <b>__initActionsMenu</b>(<i></i>) |
|
151 |
|
152 <p> |
|
153 Private method to populate the actions button menu. |
|
154 </p> |
|
155 <a NAME="RunServerDialog.__processFinished" ID="RunServerDialog.__processFinished"></a> |
|
156 <h4>RunServerDialog.__processFinished</h4> |
|
157 <b>__processFinished</b>(<i></i>) |
|
158 |
|
159 <p> |
|
160 Private slot handling the finishing of the server process. |
|
161 </p> |
|
162 <a NAME="RunServerDialog.__readStdOut" ID="RunServerDialog.__readStdOut"></a> |
|
163 <h4>RunServerDialog.__readStdOut</h4> |
|
164 <b>__readStdOut</b>(<i></i>) |
|
165 |
|
166 <p> |
|
167 Private slot to add the server process output to the output pane. |
|
168 </p> |
|
169 <a NAME="RunServerDialog.__restartServer" ID="RunServerDialog.__restartServer"></a> |
|
170 <h4>RunServerDialog.__restartServer</h4> |
|
171 <b>__restartServer</b>(<i></i>) |
|
172 |
|
173 <p> |
|
174 Private slot to restart the server process. |
|
175 </p> |
|
176 <a NAME="RunServerDialog.__restartServerDifferentMode" ID="RunServerDialog.__restartServerDifferentMode"></a> |
|
177 <h4>RunServerDialog.__restartServerDifferentMode</h4> |
|
178 <b>__restartServerDifferentMode</b>(<i></i>) |
|
179 |
|
180 <p> |
|
181 Private slot to restart the server process with the opposite mode. |
|
182 </p> |
|
183 <a NAME="RunServerDialog.__restartServerWithOptions" ID="RunServerDialog.__restartServerWithOptions"></a> |
|
184 <h4>RunServerDialog.__restartServerWithOptions</h4> |
|
185 <b>__restartServerWithOptions</b>(<i></i>) |
|
186 |
|
187 <p> |
|
188 Private slot to restart the server asking for start options. |
|
189 </p> |
|
190 <a NAME="RunServerDialog.__showActionsMenu" ID="RunServerDialog.__showActionsMenu"></a> |
|
191 <h4>RunServerDialog.__showActionsMenu</h4> |
|
192 <b>__showActionsMenu</b>(<i></i>) |
|
193 |
|
194 <p> |
|
195 Private slot handling the actions menu about to be shown. |
|
196 </p> |
|
197 <a NAME="RunServerDialog.closeEvent" ID="RunServerDialog.closeEvent"></a> |
|
198 <h4>RunServerDialog.closeEvent</h4> |
|
199 <b>closeEvent</b>(<i>evt</i>) |
|
200 |
|
201 <p> |
|
202 Protected method handling a close event. |
|
203 </p> |
|
204 <dl> |
|
205 |
|
206 <dt><i>evt</i> (QCloseEvent)</dt> |
|
207 <dd> |
|
208 reference to the close event |
|
209 </dd> |
|
210 </dl> |
|
211 <a NAME="RunServerDialog.on_startBrowserButton_clicked" ID="RunServerDialog.on_startBrowserButton_clicked"></a> |
|
212 <h4>RunServerDialog.on_startBrowserButton_clicked</h4> |
|
213 <b>on_startBrowserButton_clicked</b>(<i></i>) |
|
214 |
|
215 <p> |
|
216 Private slot to start a web browser with the server URL. |
|
217 </p> |
|
218 <a NAME="RunServerDialog.on_stopServerButton_clicked" ID="RunServerDialog.on_stopServerButton_clicked"></a> |
|
219 <h4>RunServerDialog.on_stopServerButton_clicked</h4> |
|
220 <b>on_stopServerButton_clicked</b>(<i></i>) |
|
221 |
|
222 <p> |
|
223 Private slot to stop the running server. |
|
224 </p> |
|
225 <a NAME="RunServerDialog.startServer" ID="RunServerDialog.startServer"></a> |
|
226 <h4>RunServerDialog.startServer</h4> |
|
227 <b>startServer</b>(<i>development=False, askForOptions=False</i>) |
|
228 |
|
229 <p> |
|
230 Public method to start the Flask server process. |
|
231 </p> |
|
232 <dl> |
|
233 |
|
234 <dt><i>development</i> (bool)</dt> |
|
235 <dd> |
|
236 flag indicating development mode |
|
237 </dd> |
|
238 <dt><i>askForOptions</i> (bool)</dt> |
|
239 <dd> |
|
240 flag indicating to ask for server start options |
|
241 first |
|
242 </dd> |
|
243 </dl> |
|
244 <dl> |
|
245 <dt>Returns:</dt> |
|
246 <dd> |
|
247 flag indicating success |
|
248 </dd> |
|
249 </dl> |
|
250 <dl> |
|
251 <dt>Return Type:</dt> |
|
252 <dd> |
|
253 bool |
|
254 </dd> |
|
255 </dl> |
|
256 <div align="right"><a href="#top">Up</a></div> |
|
257 <hr /> |
|
258 </body></html> |