|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.MicroPython.MicroPythonWindow</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.MicroPython.MicroPythonWindow</h1> |
|
10 <p> |
|
11 Module implementing the standalone MicroPython window. |
|
12 </p> |
|
13 |
|
14 <h3>Global Attributes</h3> |
|
15 <table> |
|
16 <tr><td>SSL_AVAILABLE</td></tr> |
|
17 </table> |
|
18 |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#MicroPythonWindow">MicroPythonWindow</a></td> |
|
23 <td>Class implementing the standalone MicroPython window.</td> |
|
24 </tr> |
|
25 </table> |
|
26 |
|
27 <h3>Functions</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 |
|
32 <hr /> |
|
33 <hr /> |
|
34 <a NAME="MicroPythonWindow" ID="MicroPythonWindow"></a> |
|
35 <h2>MicroPythonWindow</h2> |
|
36 <p> |
|
37 Class implementing the standalone MicroPython window. |
|
38 </p> |
|
39 |
|
40 <h3>Signals</h3> |
|
41 <dl> |
|
42 |
|
43 <dt>preferencesChanged()</dt> |
|
44 <dd> |
|
45 emitted after the preferences were changed |
|
46 </dd> |
|
47 </dl> |
|
48 <h3>Derived from</h3> |
|
49 EricMainWindow |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 |
|
55 <h3>Class Methods</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr> |
|
63 <td><a href="#MicroPythonWindow.__init__">MicroPythonWindow</a></td> |
|
64 <td>Constructor</td> |
|
65 </tr> |
|
66 <tr> |
|
67 <td><a href="#MicroPythonWindow.__appFocusChanged">__appFocusChanged</a></td> |
|
68 <td>Private slot to track the application focus.</td> |
|
69 </tr> |
|
70 <tr> |
|
71 <td><a href="#MicroPythonWindow.__deviceDisconnect">__deviceDisconnect</a></td> |
|
72 <td>Private slot handling the device being disconnected.</td> |
|
73 </tr> |
|
74 <tr> |
|
75 <td><a href="#MicroPythonWindow.__editorClosing">__editorClosing</a></td> |
|
76 <td>Private method called, when an editor is closing.</td> |
|
77 </tr> |
|
78 <tr> |
|
79 <td><a href="#MicroPythonWindow.__preferencesChanged">__preferencesChanged</a></td> |
|
80 <td>Private slot to handle a change of the preferences.</td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><a href="#MicroPythonWindow.__sslErrors">__sslErrors</a></td> |
|
84 <td>Private slot to handle SSL errors.</td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td><a href="#MicroPythonWindow.activeWindow">activeWindow</a></td> |
|
88 <td>Public method to get a reference to the active editor.</td> |
|
89 </tr> |
|
90 <tr> |
|
91 <td><a href="#MicroPythonWindow.addSideWidget">addSideWidget</a></td> |
|
92 <td>Public method to add a widget to the sides.</td> |
|
93 </tr> |
|
94 <tr> |
|
95 <td><a href="#MicroPythonWindow.closeEvent">closeEvent</a></td> |
|
96 <td>Protected event handler for the close event.</td> |
|
97 </tr> |
|
98 <tr> |
|
99 <td><a href="#MicroPythonWindow.getEditor">getEditor</a></td> |
|
100 <td>Public method to return the editor displaying the given file.</td> |
|
101 </tr> |
|
102 <tr> |
|
103 <td><a href="#MicroPythonWindow.launchHelpViewer">launchHelpViewer</a></td> |
|
104 <td>Public slot to start the help viewer/web browser.</td> |
|
105 </tr> |
|
106 <tr> |
|
107 <td><a href="#MicroPythonWindow.networkAccessManager">networkAccessManager</a></td> |
|
108 <td>Public method to get a reference to the network access manager object.</td> |
|
109 </tr> |
|
110 <tr> |
|
111 <td><a href="#MicroPythonWindow.newEditorWithText">newEditorWithText</a></td> |
|
112 <td>Public method to generate a new editor with a given text and associated file name.</td> |
|
113 </tr> |
|
114 <tr> |
|
115 <td><a href="#MicroPythonWindow.removeSideWidget">removeSideWidget</a></td> |
|
116 <td>Public method to remove a widget added using addSideWidget().</td> |
|
117 </tr> |
|
118 <tr> |
|
119 <td><a href="#MicroPythonWindow.showPreferences">showPreferences</a></td> |
|
120 <td>Public slot to set the preferences.</td> |
|
121 </tr> |
|
122 <tr> |
|
123 <td><a href="#MicroPythonWindow.showSideWidget">showSideWidget</a></td> |
|
124 <td>Public method to show a specific widget placed in the side widgets.</td> |
|
125 </tr> |
|
126 </table> |
|
127 |
|
128 <h3>Static Methods</h3> |
|
129 <table> |
|
130 <tr><td>None</td></tr> |
|
131 </table> |
|
132 |
|
133 |
|
134 <a NAME="MicroPythonWindow.__init__" ID="MicroPythonWindow.__init__"></a> |
|
135 <h4>MicroPythonWindow (Constructor)</h4> |
|
136 <b>MicroPythonWindow</b>(<i>parent=None</i>) |
|
137 <p> |
|
138 Constructor |
|
139 </p> |
|
140 |
|
141 <dl> |
|
142 |
|
143 <dt><i>parent</i> (QWidget)</dt> |
|
144 <dd> |
|
145 reference to the parent widget |
|
146 </dd> |
|
147 </dl> |
|
148 <a NAME="MicroPythonWindow.__appFocusChanged" ID="MicroPythonWindow.__appFocusChanged"></a> |
|
149 <h4>MicroPythonWindow.__appFocusChanged</h4> |
|
150 <b>__appFocusChanged</b>(<i>old, now</i>) |
|
151 <p> |
|
152 Private slot to track the application focus. |
|
153 </p> |
|
154 |
|
155 <dl> |
|
156 |
|
157 <dt><i>old</i> (QWidget)</dt> |
|
158 <dd> |
|
159 reference to the widget loosing focus |
|
160 </dd> |
|
161 <dt><i>now</i> (QWidget)</dt> |
|
162 <dd> |
|
163 reference to the widget gaining focus |
|
164 </dd> |
|
165 </dl> |
|
166 <a NAME="MicroPythonWindow.__deviceDisconnect" ID="MicroPythonWindow.__deviceDisconnect"></a> |
|
167 <h4>MicroPythonWindow.__deviceDisconnect</h4> |
|
168 <b>__deviceDisconnect</b>(<i></i>) |
|
169 <p> |
|
170 Private slot handling the device being disconnected. |
|
171 </p> |
|
172 <p> |
|
173 This closes all editors directly connected to the device about to |
|
174 be disconnected. |
|
175 </p> |
|
176 |
|
177 <a NAME="MicroPythonWindow.__editorClosing" ID="MicroPythonWindow.__editorClosing"></a> |
|
178 <h4>MicroPythonWindow.__editorClosing</h4> |
|
179 <b>__editorClosing</b>(<i>editor</i>) |
|
180 <p> |
|
181 Private method called, when an editor is closing. |
|
182 </p> |
|
183 |
|
184 <dl> |
|
185 |
|
186 <dt><i>editor</i> (MiniEditor)</dt> |
|
187 <dd> |
|
188 reference to the closing editor |
|
189 </dd> |
|
190 </dl> |
|
191 <a NAME="MicroPythonWindow.__preferencesChanged" ID="MicroPythonWindow.__preferencesChanged"></a> |
|
192 <h4>MicroPythonWindow.__preferencesChanged</h4> |
|
193 <b>__preferencesChanged</b>(<i></i>) |
|
194 <p> |
|
195 Private slot to handle a change of the preferences. |
|
196 </p> |
|
197 |
|
198 <a NAME="MicroPythonWindow.__sslErrors" ID="MicroPythonWindow.__sslErrors"></a> |
|
199 <h4>MicroPythonWindow.__sslErrors</h4> |
|
200 <b>__sslErrors</b>(<i>reply, errors</i>) |
|
201 <p> |
|
202 Private slot to handle SSL errors. |
|
203 </p> |
|
204 |
|
205 <dl> |
|
206 |
|
207 <dt><i>reply</i> (QNetworkReply)</dt> |
|
208 <dd> |
|
209 reference to the reply object |
|
210 </dd> |
|
211 <dt><i>errors</i> (list of QSslError)</dt> |
|
212 <dd> |
|
213 list of SSL errors |
|
214 </dd> |
|
215 </dl> |
|
216 <a NAME="MicroPythonWindow.activeWindow" ID="MicroPythonWindow.activeWindow"></a> |
|
217 <h4>MicroPythonWindow.activeWindow</h4> |
|
218 <b>activeWindow</b>(<i></i>) |
|
219 <p> |
|
220 Public method to get a reference to the active editor. |
|
221 </p> |
|
222 |
|
223 <dl> |
|
224 <dt>Return:</dt> |
|
225 <dd> |
|
226 reference to the active editor |
|
227 </dd> |
|
228 </dl> |
|
229 <dl> |
|
230 <dt>Return Type:</dt> |
|
231 <dd> |
|
232 MiniEditor |
|
233 </dd> |
|
234 </dl> |
|
235 <a NAME="MicroPythonWindow.addSideWidget" ID="MicroPythonWindow.addSideWidget"></a> |
|
236 <h4>MicroPythonWindow.addSideWidget</h4> |
|
237 <b>addSideWidget</b>(<i>side, widget, icon, label, </i>) |
|
238 <p> |
|
239 Public method to add a widget to the sides. |
|
240 </p> |
|
241 |
|
242 <dl> |
|
243 |
|
244 <dt><i>side</i> (UserInterfaceSide)</dt> |
|
245 <dd> |
|
246 side to add the widget to |
|
247 </dd> |
|
248 <dt><i>widget</i> (QWidget)</dt> |
|
249 <dd> |
|
250 reference to the widget to add |
|
251 </dd> |
|
252 <dt><i>icon</i> (QIcon)</dt> |
|
253 <dd> |
|
254 icon to be used |
|
255 </dd> |
|
256 <dt><i>label</i> (str)</dt> |
|
257 <dd> |
|
258 label text to be shown |
|
259 </dd> |
|
260 </dl> |
|
261 <a NAME="MicroPythonWindow.closeEvent" ID="MicroPythonWindow.closeEvent"></a> |
|
262 <h4>MicroPythonWindow.closeEvent</h4> |
|
263 <b>closeEvent</b>(<i>evt</i>) |
|
264 <p> |
|
265 Protected event handler for the close event. |
|
266 </p> |
|
267 |
|
268 <dl> |
|
269 |
|
270 <dt><i>evt</i> (QCloseEvent)</dt> |
|
271 <dd> |
|
272 reference to the close event |
|
273 <br />This event is simply accepted after the history has been |
|
274 saved and all window references have been deleted. |
|
275 </dd> |
|
276 </dl> |
|
277 <a NAME="MicroPythonWindow.getEditor" ID="MicroPythonWindow.getEditor"></a> |
|
278 <h4>MicroPythonWindow.getEditor</h4> |
|
279 <b>getEditor</b>(<i>fn</i>) |
|
280 <p> |
|
281 Public method to return the editor displaying the given file. |
|
282 </p> |
|
283 |
|
284 <dl> |
|
285 |
|
286 <dt><i>fn</i> (str)</dt> |
|
287 <dd> |
|
288 filename to look for |
|
289 </dd> |
|
290 </dl> |
|
291 <a NAME="MicroPythonWindow.launchHelpViewer" ID="MicroPythonWindow.launchHelpViewer"></a> |
|
292 <h4>MicroPythonWindow.launchHelpViewer</h4> |
|
293 <b>launchHelpViewer</b>(<i>url</i>) |
|
294 <p> |
|
295 Public slot to start the help viewer/web browser. |
|
296 </p> |
|
297 |
|
298 <dl> |
|
299 |
|
300 <dt><i>url</i> (str or QUrl)</dt> |
|
301 <dd> |
|
302 URL to be opened |
|
303 </dd> |
|
304 </dl> |
|
305 <a NAME="MicroPythonWindow.networkAccessManager" ID="MicroPythonWindow.networkAccessManager"></a> |
|
306 <h4>MicroPythonWindow.networkAccessManager</h4> |
|
307 <b>networkAccessManager</b>(<i></i>) |
|
308 <p> |
|
309 Public method to get a reference to the network access manager object. |
|
310 </p> |
|
311 |
|
312 <dl> |
|
313 <dt>Return:</dt> |
|
314 <dd> |
|
315 reference to the network access manager object |
|
316 </dd> |
|
317 </dl> |
|
318 <dl> |
|
319 <dt>Return Type:</dt> |
|
320 <dd> |
|
321 QNetworkAccessManager |
|
322 </dd> |
|
323 </dl> |
|
324 <a NAME="MicroPythonWindow.newEditorWithText" ID="MicroPythonWindow.newEditorWithText"></a> |
|
325 <h4>MicroPythonWindow.newEditorWithText</h4> |
|
326 <b>newEditorWithText</b>(<i>text, language="", fileName=""</i>) |
|
327 <p> |
|
328 Public method to generate a new editor with a given text and associated file |
|
329 name. |
|
330 </p> |
|
331 |
|
332 <dl> |
|
333 |
|
334 <dt><i>text</i> (str)</dt> |
|
335 <dd> |
|
336 text for the editor |
|
337 </dd> |
|
338 <dt><i>language</i> (str (optional))</dt> |
|
339 <dd> |
|
340 source language (defaults to "") |
|
341 </dd> |
|
342 <dt><i>fileName</i> (str (optional))</dt> |
|
343 <dd> |
|
344 associated file name (defaults to "") |
|
345 </dd> |
|
346 </dl> |
|
347 <a NAME="MicroPythonWindow.removeSideWidget" ID="MicroPythonWindow.removeSideWidget"></a> |
|
348 <h4>MicroPythonWindow.removeSideWidget</h4> |
|
349 <b>removeSideWidget</b>(<i>widget</i>) |
|
350 <p> |
|
351 Public method to remove a widget added using addSideWidget(). |
|
352 </p> |
|
353 |
|
354 <dl> |
|
355 |
|
356 <dt><i>widget</i> (QWidget)</dt> |
|
357 <dd> |
|
358 reference to the widget to remove |
|
359 </dd> |
|
360 </dl> |
|
361 <a NAME="MicroPythonWindow.showPreferences" ID="MicroPythonWindow.showPreferences"></a> |
|
362 <h4>MicroPythonWindow.showPreferences</h4> |
|
363 <b>showPreferences</b>(<i>pageName=None</i>) |
|
364 <p> |
|
365 Public slot to set the preferences. |
|
366 </p> |
|
367 |
|
368 <dl> |
|
369 |
|
370 <dt><i>pageName</i> (str)</dt> |
|
371 <dd> |
|
372 name of the configuration page to show |
|
373 </dd> |
|
374 </dl> |
|
375 <a NAME="MicroPythonWindow.showSideWidget" ID="MicroPythonWindow.showSideWidget"></a> |
|
376 <h4>MicroPythonWindow.showSideWidget</h4> |
|
377 <b>showSideWidget</b>(<i>widget</i>) |
|
378 <p> |
|
379 Public method to show a specific widget placed in the side widgets. |
|
380 </p> |
|
381 |
|
382 <dl> |
|
383 |
|
384 <dt><i>widget</i> (QWidget)</dt> |
|
385 <dd> |
|
386 reference to the widget to be shown |
|
387 </dd> |
|
388 </dl> |
|
389 <div align="right"><a href="#top">Up</a></div> |
|
390 <hr /> |
|
391 </body></html> |