|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Project_Flask.ProjectFlask.Project</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.Project</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the Flask project support. |
|
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="#Project">Project</a></td> |
|
39 <td>Class implementing the Flask project support.</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="Project" ID="Project"></a> |
|
50 <h2>Project</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the Flask project support. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 QObject |
|
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="#Project.__init__">Project</a></td> |
|
73 <td>Constructor</td> |
|
74 </tr> |
|
75 <tr> |
|
76 <td><a href="#Project.__configureFlaskForProject">__configureFlaskForProject</a></td> |
|
77 <td>Private slot to configure the project specific flask parameters.</td> |
|
78 </tr> |
|
79 <tr> |
|
80 <td><a href="#Project.__determineCapabilities">__determineCapabilities</a></td> |
|
81 <td>Private method to determine capabilities provided by supported extensions.</td> |
|
82 </tr> |
|
83 <tr> |
|
84 <td><a href="#Project.__flaskInfo">__flaskInfo</a></td> |
|
85 <td>Private slot to show some info about Flask.</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#Project.__getVirtualEnvironment">__getVirtualEnvironment</a></td> |
|
89 <td>Private method to get the path of the virtual environment.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#Project.__initDatabase">__initDatabase</a></td> |
|
93 <td>Private slot showing the result of the database creation.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#Project.__isSuitableForVariant">__isSuitableForVariant</a></td> |
|
97 <td>Private method to test, if a detected command file is suitable for the given Python variant.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#Project.__runDevelopmentServer">__runDevelopmentServer</a></td> |
|
101 <td>Private slot to start the Flask Web server in development mode.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#Project.__runPythonShell">__runPythonShell</a></td> |
|
105 <td>Private slot to start a Python console in the app context.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#Project.__runServer">__runServer</a></td> |
|
109 <td>Private slot to start the Flask Web server.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#Project.__shellProcessFinished">__shellProcessFinished</a></td> |
|
113 <td>Private slot connected to the finished signal.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#Project.__showDocumentation">__showDocumentation</a></td> |
|
117 <td>Private slot to show the helpviewer with the Flask documentation.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#Project.__showRoutes">__showRoutes</a></td> |
|
121 <td>Private slot showing all URL dispatch routes.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#Project.__terminatePythonShell">__terminatePythonShell</a></td> |
|
125 <td>Private method to terminate the current Python console.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#Project.getApplication">getApplication</a></td> |
|
129 <td>Public method to determine the application name and the respective working directory.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#Project.getData">getData</a></td> |
|
133 <td>Public method to get data stored in the project store.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#Project.getFlaskCommand">getFlaskCommand</a></td> |
|
137 <td>Public method to build the Flask command.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#Project.getFlaskVersionStrings">getFlaskVersionStrings</a></td> |
|
141 <td>Public method to get the Flask, Werkzeug and Python versions as a string.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#Project.getFullCommand">getFullCommand</a></td> |
|
145 <td>Public method to get the full command for a given command name.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#Project.getMenu">getMenu</a></td> |
|
149 <td>Public method to get a reference to the requested menu.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#Project.getMenuNames">getMenuNames</a></td> |
|
153 <td>Public method to get the names of all menus.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#Project.hasCapability">hasCapability</a></td> |
|
157 <td>Public method to check, if a capability is available.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#Project.initActions">initActions</a></td> |
|
161 <td>Public method to define the Flask actions.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#Project.initMenu">initMenu</a></td> |
|
165 <td>Public method to initialize the Flask menu.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#Project.newForm">newForm</a></td> |
|
169 <td>Public method to create a new form.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#Project.prepareRuntimeEnvironment">prepareRuntimeEnvironment</a></td> |
|
173 <td>Public method to prepare a QProcessEnvironment object and determine the appropriate working directory.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#Project.projectClosed">projectClosed</a></td> |
|
177 <td>Public method to handle the closing of a project.</td> |
|
178 </tr> |
|
179 <tr> |
|
180 <td><a href="#Project.projectClosedHooks">projectClosedHooks</a></td> |
|
181 <td>Public method to remove our hook methods.</td> |
|
182 </tr> |
|
183 <tr> |
|
184 <td><a href="#Project.projectOpenedHooks">projectOpenedHooks</a></td> |
|
185 <td>Public method to add our hook methods.</td> |
|
186 </tr> |
|
187 <tr> |
|
188 <td><a href="#Project.setCapability">setCapability</a></td> |
|
189 <td>Public method to set the availability status of a capability.</td> |
|
190 </tr> |
|
191 <tr> |
|
192 <td><a href="#Project.setData">setData</a></td> |
|
193 <td>Public method to store data in the project store.</td> |
|
194 </tr> |
|
195 <tr> |
|
196 <td><a href="#Project.supportedPythonVariants">supportedPythonVariants</a></td> |
|
197 <td>Public method to get the supported Python variants.</td> |
|
198 </tr> |
|
199 </table> |
|
200 <h3>Static Methods</h3> |
|
201 |
|
202 <table> |
|
203 <tr><td>None</td></tr> |
|
204 </table> |
|
205 |
|
206 <a NAME="Project.__init__" ID="Project.__init__"></a> |
|
207 <h4>Project (Constructor)</h4> |
|
208 <b>Project</b>(<i>plugin, iconSuffix, parent=None</i>) |
|
209 |
|
210 <p> |
|
211 Constructor |
|
212 </p> |
|
213 <dl> |
|
214 |
|
215 <dt><i>plugin</i> (ProjectFlaskPlugin)</dt> |
|
216 <dd> |
|
217 reference to the plugin object |
|
218 </dd> |
|
219 <dt><i>iconSuffix</i> (str)</dt> |
|
220 <dd> |
|
221 suffix for the icons |
|
222 </dd> |
|
223 <dt><i>parent</i> (QObject)</dt> |
|
224 <dd> |
|
225 parent |
|
226 </dd> |
|
227 </dl> |
|
228 <a NAME="Project.__configureFlaskForProject" ID="Project.__configureFlaskForProject"></a> |
|
229 <h4>Project.__configureFlaskForProject</h4> |
|
230 <b>__configureFlaskForProject</b>(<i></i>) |
|
231 |
|
232 <p> |
|
233 Private slot to configure the project specific flask parameters. |
|
234 </p> |
|
235 <a NAME="Project.__determineCapabilities" ID="Project.__determineCapabilities"></a> |
|
236 <h4>Project.__determineCapabilities</h4> |
|
237 <b>__determineCapabilities</b>(<i></i>) |
|
238 |
|
239 <p> |
|
240 Private method to determine capabilities provided by supported |
|
241 extensions. |
|
242 </p> |
|
243 <a NAME="Project.__flaskInfo" ID="Project.__flaskInfo"></a> |
|
244 <h4>Project.__flaskInfo</h4> |
|
245 <b>__flaskInfo</b>(<i></i>) |
|
246 |
|
247 <p> |
|
248 Private slot to show some info about Flask. |
|
249 </p> |
|
250 <a NAME="Project.__getVirtualEnvironment" ID="Project.__getVirtualEnvironment"></a> |
|
251 <h4>Project.__getVirtualEnvironment</h4> |
|
252 <b>__getVirtualEnvironment</b>(<i></i>) |
|
253 |
|
254 <p> |
|
255 Private method to get the path of the virtual environment. |
|
256 </p> |
|
257 <dl> |
|
258 <dt>Returns:</dt> |
|
259 <dd> |
|
260 path of the virtual environment |
|
261 </dd> |
|
262 </dl> |
|
263 <dl> |
|
264 <dt>Return Type:</dt> |
|
265 <dd> |
|
266 str |
|
267 </dd> |
|
268 </dl> |
|
269 <a NAME="Project.__initDatabase" ID="Project.__initDatabase"></a> |
|
270 <h4>Project.__initDatabase</h4> |
|
271 <b>__initDatabase</b>(<i></i>) |
|
272 |
|
273 <p> |
|
274 Private slot showing the result of the database creation. |
|
275 </p> |
|
276 <a NAME="Project.__isSuitableForVariant" ID="Project.__isSuitableForVariant"></a> |
|
277 <h4>Project.__isSuitableForVariant</h4> |
|
278 <b>__isSuitableForVariant</b>(<i>variant, line0</i>) |
|
279 |
|
280 <p> |
|
281 Private method to test, if a detected command file is suitable for the |
|
282 given Python variant. |
|
283 </p> |
|
284 <dl> |
|
285 |
|
286 <dt><i>variant</i> (str)</dt> |
|
287 <dd> |
|
288 Python variant to test for |
|
289 </dd> |
|
290 <dt><i>line0</i> (str)</dt> |
|
291 <dd> |
|
292 first line of the executable |
|
293 </dd> |
|
294 </dl> |
|
295 <dl> |
|
296 <dt>Returns:</dt> |
|
297 <dd> |
|
298 flag indicating a suitable file was found |
|
299 </dd> |
|
300 </dl> |
|
301 <dl> |
|
302 <dt>Return Type:</dt> |
|
303 <dd> |
|
304 bool |
|
305 </dd> |
|
306 </dl> |
|
307 <a NAME="Project.__runDevelopmentServer" ID="Project.__runDevelopmentServer"></a> |
|
308 <h4>Project.__runDevelopmentServer</h4> |
|
309 <b>__runDevelopmentServer</b>(<i></i>) |
|
310 |
|
311 <p> |
|
312 Private slot to start the Flask Web server in development mode. |
|
313 </p> |
|
314 <a NAME="Project.__runPythonShell" ID="Project.__runPythonShell"></a> |
|
315 <h4>Project.__runPythonShell</h4> |
|
316 <b>__runPythonShell</b>(<i></i>) |
|
317 |
|
318 <p> |
|
319 Private slot to start a Python console in the app context. |
|
320 </p> |
|
321 <a NAME="Project.__runServer" ID="Project.__runServer"></a> |
|
322 <h4>Project.__runServer</h4> |
|
323 <b>__runServer</b>(<i>development=False</i>) |
|
324 |
|
325 <p> |
|
326 Private slot to start the Flask Web server. |
|
327 </p> |
|
328 <dl> |
|
329 |
|
330 <dt><i>development</i> (bool)</dt> |
|
331 <dd> |
|
332 flag indicating development mode |
|
333 </dd> |
|
334 </dl> |
|
335 <a NAME="Project.__shellProcessFinished" ID="Project.__shellProcessFinished"></a> |
|
336 <h4>Project.__shellProcessFinished</h4> |
|
337 <b>__shellProcessFinished</b>(<i></i>) |
|
338 |
|
339 <p> |
|
340 Private slot connected to the finished signal. |
|
341 </p> |
|
342 <a NAME="Project.__showDocumentation" ID="Project.__showDocumentation"></a> |
|
343 <h4>Project.__showDocumentation</h4> |
|
344 <b>__showDocumentation</b>(<i></i>) |
|
345 |
|
346 <p> |
|
347 Private slot to show the helpviewer with the Flask documentation. |
|
348 </p> |
|
349 <a NAME="Project.__showRoutes" ID="Project.__showRoutes"></a> |
|
350 <h4>Project.__showRoutes</h4> |
|
351 <b>__showRoutes</b>(<i></i>) |
|
352 |
|
353 <p> |
|
354 Private slot showing all URL dispatch routes. |
|
355 </p> |
|
356 <a NAME="Project.__terminatePythonShell" ID="Project.__terminatePythonShell"></a> |
|
357 <h4>Project.__terminatePythonShell</h4> |
|
358 <b>__terminatePythonShell</b>(<i></i>) |
|
359 |
|
360 <p> |
|
361 Private method to terminate the current Python console. |
|
362 </p> |
|
363 <a NAME="Project.getApplication" ID="Project.getApplication"></a> |
|
364 <h4>Project.getApplication</h4> |
|
365 <b>getApplication</b>(<i></i>) |
|
366 |
|
367 <p> |
|
368 Public method to determine the application name and the respective |
|
369 working directory. |
|
370 </p> |
|
371 <dl> |
|
372 <dt>Returns:</dt> |
|
373 <dd> |
|
374 tuple containing the working directory and the application name |
|
375 </dd> |
|
376 </dl> |
|
377 <dl> |
|
378 <dt>Return Type:</dt> |
|
379 <dd> |
|
380 tuple of (str, str) |
|
381 </dd> |
|
382 </dl> |
|
383 <a NAME="Project.getData" ID="Project.getData"></a> |
|
384 <h4>Project.getData</h4> |
|
385 <b>getData</b>(<i>category, key</i>) |
|
386 |
|
387 <p> |
|
388 Public method to get data stored in the project store. |
|
389 </p> |
|
390 <dl> |
|
391 |
|
392 <dt><i>category</i> (str)</dt> |
|
393 <dd> |
|
394 data category |
|
395 </dd> |
|
396 <dt><i>key</i> (str)</dt> |
|
397 <dd> |
|
398 data key |
|
399 </dd> |
|
400 </dl> |
|
401 <dl> |
|
402 <dt>Returns:</dt> |
|
403 <dd> |
|
404 referenced data |
|
405 </dd> |
|
406 </dl> |
|
407 <dl> |
|
408 <dt>Return Type:</dt> |
|
409 <dd> |
|
410 any |
|
411 </dd> |
|
412 </dl> |
|
413 <a NAME="Project.getFlaskCommand" ID="Project.getFlaskCommand"></a> |
|
414 <h4>Project.getFlaskCommand</h4> |
|
415 <b>getFlaskCommand</b>(<i></i>) |
|
416 |
|
417 <p> |
|
418 Public method to build the Flask command. |
|
419 </p> |
|
420 <dl> |
|
421 <dt>Returns:</dt> |
|
422 <dd> |
|
423 full flask command |
|
424 </dd> |
|
425 </dl> |
|
426 <dl> |
|
427 <dt>Return Type:</dt> |
|
428 <dd> |
|
429 str |
|
430 </dd> |
|
431 </dl> |
|
432 <a NAME="Project.getFlaskVersionStrings" ID="Project.getFlaskVersionStrings"></a> |
|
433 <h4>Project.getFlaskVersionStrings</h4> |
|
434 <b>getFlaskVersionStrings</b>(<i></i>) |
|
435 |
|
436 <p> |
|
437 Public method to get the Flask, Werkzeug and Python versions as a |
|
438 string. |
|
439 </p> |
|
440 <dl> |
|
441 <dt>Returns:</dt> |
|
442 <dd> |
|
443 dictionary containing the Flask, Werkzeug and Python versions |
|
444 </dd> |
|
445 </dl> |
|
446 <dl> |
|
447 <dt>Return Type:</dt> |
|
448 <dd> |
|
449 dict |
|
450 </dd> |
|
451 </dl> |
|
452 <a NAME="Project.getFullCommand" ID="Project.getFullCommand"></a> |
|
453 <h4>Project.getFullCommand</h4> |
|
454 <b>getFullCommand</b>(<i>command</i>) |
|
455 |
|
456 <p> |
|
457 Public method to get the full command for a given command name. |
|
458 </p> |
|
459 <dl> |
|
460 |
|
461 <dt><i>command</i> (str)</dt> |
|
462 <dd> |
|
463 command name |
|
464 </dd> |
|
465 </dl> |
|
466 <dl> |
|
467 <dt>Returns:</dt> |
|
468 <dd> |
|
469 full command |
|
470 </dd> |
|
471 </dl> |
|
472 <dl> |
|
473 <dt>Return Type:</dt> |
|
474 <dd> |
|
475 str |
|
476 </dd> |
|
477 </dl> |
|
478 <a NAME="Project.getMenu" ID="Project.getMenu"></a> |
|
479 <h4>Project.getMenu</h4> |
|
480 <b>getMenu</b>(<i>name</i>) |
|
481 |
|
482 <p> |
|
483 Public method to get a reference to the requested menu. |
|
484 </p> |
|
485 <dl> |
|
486 |
|
487 <dt><i>name</i> (str)</dt> |
|
488 <dd> |
|
489 name of the menu |
|
490 </dd> |
|
491 </dl> |
|
492 <dl> |
|
493 <dt>Returns:</dt> |
|
494 <dd> |
|
495 reference to the menu or None, if no menu with the given |
|
496 name exists |
|
497 </dd> |
|
498 </dl> |
|
499 <dl> |
|
500 <dt>Return Type:</dt> |
|
501 <dd> |
|
502 QMenu or None |
|
503 </dd> |
|
504 </dl> |
|
505 <a NAME="Project.getMenuNames" ID="Project.getMenuNames"></a> |
|
506 <h4>Project.getMenuNames</h4> |
|
507 <b>getMenuNames</b>(<i></i>) |
|
508 |
|
509 <p> |
|
510 Public method to get the names of all menus. |
|
511 </p> |
|
512 <dl> |
|
513 <dt>Returns:</dt> |
|
514 <dd> |
|
515 menu names |
|
516 </dd> |
|
517 </dl> |
|
518 <dl> |
|
519 <dt>Return Type:</dt> |
|
520 <dd> |
|
521 list of str |
|
522 </dd> |
|
523 </dl> |
|
524 <a NAME="Project.hasCapability" ID="Project.hasCapability"></a> |
|
525 <h4>Project.hasCapability</h4> |
|
526 <b>hasCapability</b>(<i>key</i>) |
|
527 |
|
528 <p> |
|
529 Public method to check, if a capability is available. |
|
530 </p> |
|
531 <dl> |
|
532 |
|
533 <dt><i>key</i> (str)</dt> |
|
534 <dd> |
|
535 key of the capability to check |
|
536 </dd> |
|
537 </dl> |
|
538 <dl> |
|
539 <dt>Returns:</dt> |
|
540 <dd> |
|
541 flag indicating the availability of the capability |
|
542 </dd> |
|
543 </dl> |
|
544 <dl> |
|
545 <dt>Return Type:</dt> |
|
546 <dd> |
|
547 bool |
|
548 </dd> |
|
549 </dl> |
|
550 <a NAME="Project.initActions" ID="Project.initActions"></a> |
|
551 <h4>Project.initActions</h4> |
|
552 <b>initActions</b>(<i></i>) |
|
553 |
|
554 <p> |
|
555 Public method to define the Flask actions. |
|
556 </p> |
|
557 <a NAME="Project.initMenu" ID="Project.initMenu"></a> |
|
558 <h4>Project.initMenu</h4> |
|
559 <b>initMenu</b>(<i></i>) |
|
560 |
|
561 <p> |
|
562 Public method to initialize the Flask menu. |
|
563 </p> |
|
564 <dl> |
|
565 <dt>Returns:</dt> |
|
566 <dd> |
|
567 the menu generated |
|
568 </dd> |
|
569 </dl> |
|
570 <dl> |
|
571 <dt>Return Type:</dt> |
|
572 <dd> |
|
573 QMenu |
|
574 </dd> |
|
575 </dl> |
|
576 <a NAME="Project.newForm" ID="Project.newForm"></a> |
|
577 <h4>Project.newForm</h4> |
|
578 <b>newForm</b>(<i>dirPath</i>) |
|
579 |
|
580 <p> |
|
581 Public method to create a new form. |
|
582 </p> |
|
583 <dl> |
|
584 |
|
585 <dt><i>dirPath</i> (str)</dt> |
|
586 <dd> |
|
587 full directory path for the new form file |
|
588 </dd> |
|
589 </dl> |
|
590 <a NAME="Project.prepareRuntimeEnvironment" ID="Project.prepareRuntimeEnvironment"></a> |
|
591 <h4>Project.prepareRuntimeEnvironment</h4> |
|
592 <b>prepareRuntimeEnvironment</b>(<i>development=False</i>) |
|
593 |
|
594 <p> |
|
595 Public method to prepare a QProcessEnvironment object and determine |
|
596 the appropriate working directory. |
|
597 </p> |
|
598 <dl> |
|
599 |
|
600 <dt><i>development</i> (bool)</dt> |
|
601 <dd> |
|
602 flag indicating development mode |
|
603 </dd> |
|
604 </dl> |
|
605 <dl> |
|
606 <dt>Returns:</dt> |
|
607 <dd> |
|
608 tuple containing the working directory and a prepared |
|
609 environment object to be used with QProcess |
|
610 </dd> |
|
611 </dl> |
|
612 <dl> |
|
613 <dt>Return Type:</dt> |
|
614 <dd> |
|
615 tuple of (str, QProcessEnvironment) |
|
616 </dd> |
|
617 </dl> |
|
618 <a NAME="Project.projectClosed" ID="Project.projectClosed"></a> |
|
619 <h4>Project.projectClosed</h4> |
|
620 <b>projectClosed</b>(<i></i>) |
|
621 |
|
622 <p> |
|
623 Public method to handle the closing of a project. |
|
624 </p> |
|
625 <a NAME="Project.projectClosedHooks" ID="Project.projectClosedHooks"></a> |
|
626 <h4>Project.projectClosedHooks</h4> |
|
627 <b>projectClosedHooks</b>(<i></i>) |
|
628 |
|
629 <p> |
|
630 Public method to remove our hook methods. |
|
631 </p> |
|
632 <a NAME="Project.projectOpenedHooks" ID="Project.projectOpenedHooks"></a> |
|
633 <h4>Project.projectOpenedHooks</h4> |
|
634 <b>projectOpenedHooks</b>(<i></i>) |
|
635 |
|
636 <p> |
|
637 Public method to add our hook methods. |
|
638 </p> |
|
639 <a NAME="Project.setCapability" ID="Project.setCapability"></a> |
|
640 <h4>Project.setCapability</h4> |
|
641 <b>setCapability</b>(<i>key, available</i>) |
|
642 |
|
643 <p> |
|
644 Public method to set the availability status of a capability. |
|
645 </p> |
|
646 <dl> |
|
647 |
|
648 <dt><i>key</i> (str)</dt> |
|
649 <dd> |
|
650 key of the capability to set |
|
651 </dd> |
|
652 <dt><i>available</i> (bool)</dt> |
|
653 <dd> |
|
654 flag indicating the availability of the capability |
|
655 </dd> |
|
656 </dl> |
|
657 <a NAME="Project.setData" ID="Project.setData"></a> |
|
658 <h4>Project.setData</h4> |
|
659 <b>setData</b>(<i>category, key, value</i>) |
|
660 |
|
661 <p> |
|
662 Public method to store data in the project store. |
|
663 </p> |
|
664 <dl> |
|
665 |
|
666 <dt><i>category</i> (str)</dt> |
|
667 <dd> |
|
668 data category |
|
669 </dd> |
|
670 <dt><i>key</i> (str)</dt> |
|
671 <dd> |
|
672 data key |
|
673 </dd> |
|
674 <dt><i>value</i> (any (serializable type))</dt> |
|
675 <dd> |
|
676 data to be stored |
|
677 </dd> |
|
678 </dl> |
|
679 <a NAME="Project.supportedPythonVariants" ID="Project.supportedPythonVariants"></a> |
|
680 <h4>Project.supportedPythonVariants</h4> |
|
681 <b>supportedPythonVariants</b>(<i></i>) |
|
682 |
|
683 <p> |
|
684 Public method to get the supported Python variants. |
|
685 </p> |
|
686 <dl> |
|
687 <dt>Returns:</dt> |
|
688 <dd> |
|
689 list of supported Python variants |
|
690 </dd> |
|
691 </dl> |
|
692 <dl> |
|
693 <dt>Return Type:</dt> |
|
694 <dd> |
|
695 list of str |
|
696 </dd> |
|
697 </dl> |
|
698 <div align="right"><a href="#top">Up</a></div> |
|
699 <hr /> |
|
700 </body></html> |