eric7/Documentation/Source/eric7.Project.ProjectFormsBrowser.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Project.ProjectFormsBrowser</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>eric7.Project.ProjectFormsBrowser</h1>
24
25 <p>
26 Module implementing a class used to display the forms part of the project.
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="#ProjectFormsBrowser">ProjectFormsBrowser</a></td>
39 <td>A class used to display the forms part of the project.</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="ProjectFormsBrowser" ID="ProjectFormsBrowser"></a>
50 <h2>ProjectFormsBrowser</h2>
51
52 <p>
53 A class used to display the forms part of the project.
54 </p>
55 <h3>Signals</h3>
56 <dl>
57
58 <dt>appendStderr(str)</dt>
59 <dd>
60 emitted after something was received from
61 a QProcess on stderr
62 </dd>
63 <dt>menusAboutToBeCreated()</dt>
64 <dd>
65 emitted when the context menus are about to
66 be created. This is the right moment to add or remove hook methods.
67 </dd>
68 <dt>showMenu(str, QMenu)</dt>
69 <dd>
70 emitted when a menu is about to be shown. The
71 name of the menu and a reference to the menu are given.
72 </dd>
73 <dt>uipreview(str)</dt>
74 <dd>
75 emitted to preview a forms file
76 </dd>
77 </dl>
78 <h3>Derived from</h3>
79 ProjectBaseBrowser
80 <h3>Class Attributes</h3>
81
82 <table>
83 <tr><td>Pyuic5IndentDefault</td></tr><tr><td>Pyuic6IndentDefault</td></tr>
84 </table>
85 <h3>Class Methods</h3>
86
87 <table>
88 <tr><td>None</td></tr>
89 </table>
90 <h3>Methods</h3>
91
92 <table>
93
94 <tr>
95 <td><a href="#ProjectFormsBrowser.__init__">ProjectFormsBrowser</a></td>
96 <td>Constructor</td>
97 </tr>
98 <tr>
99 <td><a href="#ProjectFormsBrowser.__TRPreview">__TRPreview</a></td>
100 <td>Private slot to handle the Preview translations action.</td>
101 </tr>
102 <tr>
103 <td><a href="#ProjectFormsBrowser.__UIPreview">__UIPreview</a></td>
104 <td>Private slot to handle the Preview menu action.</td>
105 </tr>
106 <tr>
107 <td><a href="#ProjectFormsBrowser.__addFormFiles">__addFormFiles</a></td>
108 <td>Private method to add form files to the project.</td>
109 </tr>
110 <tr>
111 <td><a href="#ProjectFormsBrowser.__addFormsDirectory">__addFormsDirectory</a></td>
112 <td>Private method to add form files of a directory to the project.</td>
113 </tr>
114 <tr>
115 <td><a href="#ProjectFormsBrowser.__compileAllForms">__compileAllForms</a></td>
116 <td>Private method to compile all forms to source files.</td>
117 </tr>
118 <tr>
119 <td><a href="#ProjectFormsBrowser.__compileForm">__compileForm</a></td>
120 <td>Private method to compile a form to a source file.</td>
121 </tr>
122 <tr>
123 <td><a href="#ProjectFormsBrowser.__compileSelectedForms">__compileSelectedForms</a></td>
124 <td>Private method to compile selected forms to source files.</td>
125 </tr>
126 <tr>
127 <td><a href="#ProjectFormsBrowser.__compileUI">__compileUI</a></td>
128 <td>Private method to compile a .ui file to a .py/.rb file.</td>
129 </tr>
130 <tr>
131 <td><a href="#ProjectFormsBrowser.__compileUIDone">__compileUIDone</a></td>
132 <td>Private slot to handle the finished signal of the pyuic/rbuic process.</td>
133 </tr>
134 <tr>
135 <td><a href="#ProjectFormsBrowser.__configureUicCompiler">__configureUicCompiler</a></td>
136 <td>Private slot to configure some non-common uic compiler options.</td>
137 </tr>
138 <tr>
139 <td><a href="#ProjectFormsBrowser.__deleteFile">__deleteFile</a></td>
140 <td>Private method to delete a form file from the project.</td>
141 </tr>
142 <tr>
143 <td><a href="#ProjectFormsBrowser.__determineUiCompiler">__determineUiCompiler</a></td>
144 <td>Private method to determine the UI compiler for the project.</td>
145 </tr>
146 <tr>
147 <td><a href="#ProjectFormsBrowser.__generateDialogCode">__generateDialogCode</a></td>
148 <td>Private method to generate dialog code for the form (Qt only).</td>
149 </tr>
150 <tr>
151 <td><a href="#ProjectFormsBrowser.__newForm">__newForm</a></td>
152 <td>Private slot to handle the New Form menu action.</td>
153 </tr>
154 <tr>
155 <td><a href="#ProjectFormsBrowser.__newUiForm">__newUiForm</a></td>
156 <td>Private slot to handle the New Form menu action for Qt-related projects.</td>
157 </tr>
158 <tr>
159 <td><a href="#ProjectFormsBrowser.__openFile">__openFile</a></td>
160 <td>Private slot to handle the Open menu action.</td>
161 </tr>
162 <tr>
163 <td><a href="#ProjectFormsBrowser.__openFileInEditor">__openFileInEditor</a></td>
164 <td>Private slot to handle the Open in Editor menu action.</td>
165 </tr>
166 <tr>
167 <td><a href="#ProjectFormsBrowser.__readStderr">__readStderr</a></td>
168 <td>Private slot to handle the readyReadStandardError signal of the pyuic5/pyuic6/pyside2-uic/pyside6-uic process.</td>
169 </tr>
170 <tr>
171 <td><a href="#ProjectFormsBrowser.__readStdout">__readStdout</a></td>
172 <td>Private slot to handle the readyReadStandardOutput signal of the pyuic5/pyuic6/pyside2-uic/pyside6-uic process.</td>
173 </tr>
174 <tr>
175 <td><a href="#ProjectFormsBrowser.__resetUiCompiler">__resetUiCompiler</a></td>
176 <td>Private slot to reset the determined UI compiler executable.</td>
177 </tr>
178 <tr>
179 <td><a href="#ProjectFormsBrowser.__showContextMenu">__showContextMenu</a></td>
180 <td>Private slot called by the menu aboutToShow signal.</td>
181 </tr>
182 <tr>
183 <td><a href="#ProjectFormsBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
184 <td>Private slot called by the backMenu aboutToShow signal.</td>
185 </tr>
186 <tr>
187 <td><a href="#ProjectFormsBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
188 <td>Private slot called by the dirMenu aboutToShow signal.</td>
189 </tr>
190 <tr>
191 <td><a href="#ProjectFormsBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
192 <td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
193 </tr>
194 <tr>
195 <td><a href="#ProjectFormsBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
196 <td>Private slot called by the multiMenu aboutToShow signal.</td>
197 </tr>
198 <tr>
199 <td><a href="#ProjectFormsBrowser._contextMenuRequested">_contextMenuRequested</a></td>
200 <td>Protected slot to show the context menu.</td>
201 </tr>
202 <tr>
203 <td><a href="#ProjectFormsBrowser._createPopupMenus">_createPopupMenus</a></td>
204 <td>Protected overloaded method to generate the popup menu.</td>
205 </tr>
206 <tr>
207 <td><a href="#ProjectFormsBrowser._initHookMethods">_initHookMethods</a></td>
208 <td>Protected method to initialize the hooks dictionary.</td>
209 </tr>
210 <tr>
211 <td><a href="#ProjectFormsBrowser._openItem">_openItem</a></td>
212 <td>Protected slot to handle the open popup menu entry.</td>
213 </tr>
214 <tr>
215 <td><a href="#ProjectFormsBrowser.compileChangedForms">compileChangedForms</a></td>
216 <td>Public method to compile all changed forms to source files.</td>
217 </tr>
218 <tr>
219 <td><a href="#ProjectFormsBrowser.getUiCompiler">getUiCompiler</a></td>
220 <td>Public method to get the UI compiler executable of the project.</td>
221 </tr>
222 <tr>
223 <td><a href="#ProjectFormsBrowser.handlePreferencesChanged">handlePreferencesChanged</a></td>
224 <td>Public slot used to handle the preferencesChanged signal.</td>
225 </tr>
226 </table>
227 <h3>Static Methods</h3>
228
229 <table>
230 <tr><td>None</td></tr>
231 </table>
232
233 <a NAME="ProjectFormsBrowser.__init__" ID="ProjectFormsBrowser.__init__"></a>
234 <h4>ProjectFormsBrowser (Constructor)</h4>
235 <b>ProjectFormsBrowser</b>(<i>project, parent=None</i>)
236
237 <p>
238 Constructor
239 </p>
240 <dl>
241
242 <dt><i>project</i></dt>
243 <dd>
244 reference to the project object
245 </dd>
246 <dt><i>parent</i></dt>
247 <dd>
248 parent widget of this browser (QWidget)
249 </dd>
250 </dl>
251 <a NAME="ProjectFormsBrowser.__TRPreview" ID="ProjectFormsBrowser.__TRPreview"></a>
252 <h4>ProjectFormsBrowser.__TRPreview</h4>
253 <b>__TRPreview</b>(<i></i>)
254
255 <p>
256 Private slot to handle the Preview translations action.
257 </p>
258 <a NAME="ProjectFormsBrowser.__UIPreview" ID="ProjectFormsBrowser.__UIPreview"></a>
259 <h4>ProjectFormsBrowser.__UIPreview</h4>
260 <b>__UIPreview</b>(<i></i>)
261
262 <p>
263 Private slot to handle the Preview menu action.
264 </p>
265 <a NAME="ProjectFormsBrowser.__addFormFiles" ID="ProjectFormsBrowser.__addFormFiles"></a>
266 <h4>ProjectFormsBrowser.__addFormFiles</h4>
267 <b>__addFormFiles</b>(<i></i>)
268
269 <p>
270 Private method to add form files to the project.
271 </p>
272 <a NAME="ProjectFormsBrowser.__addFormsDirectory" ID="ProjectFormsBrowser.__addFormsDirectory"></a>
273 <h4>ProjectFormsBrowser.__addFormsDirectory</h4>
274 <b>__addFormsDirectory</b>(<i></i>)
275
276 <p>
277 Private method to add form files of a directory to the project.
278 </p>
279 <a NAME="ProjectFormsBrowser.__compileAllForms" ID="ProjectFormsBrowser.__compileAllForms"></a>
280 <h4>ProjectFormsBrowser.__compileAllForms</h4>
281 <b>__compileAllForms</b>(<i></i>)
282
283 <p>
284 Private method to compile all forms to source files.
285 </p>
286 <a NAME="ProjectFormsBrowser.__compileForm" ID="ProjectFormsBrowser.__compileForm"></a>
287 <h4>ProjectFormsBrowser.__compileForm</h4>
288 <b>__compileForm</b>(<i></i>)
289
290 <p>
291 Private method to compile a form to a source file.
292 </p>
293 <a NAME="ProjectFormsBrowser.__compileSelectedForms" ID="ProjectFormsBrowser.__compileSelectedForms"></a>
294 <h4>ProjectFormsBrowser.__compileSelectedForms</h4>
295 <b>__compileSelectedForms</b>(<i></i>)
296
297 <p>
298 Private method to compile selected forms to source files.
299 </p>
300 <a NAME="ProjectFormsBrowser.__compileUI" ID="ProjectFormsBrowser.__compileUI"></a>
301 <h4>ProjectFormsBrowser.__compileUI</h4>
302 <b>__compileUI</b>(<i>fn, noDialog=False, progress=None</i>)
303
304 <p>
305 Private method to compile a .ui file to a .py/.rb file.
306 </p>
307 <dl>
308
309 <dt><i>fn</i></dt>
310 <dd>
311 filename of the .ui file to be compiled
312 </dd>
313 <dt><i>noDialog</i></dt>
314 <dd>
315 flag indicating silent operations
316 </dd>
317 <dt><i>progress</i></dt>
318 <dd>
319 reference to the progress dialog
320 </dd>
321 </dl>
322 <dl>
323 <dt>Return:</dt>
324 <dd>
325 reference to the compile process (QProcess)
326 </dd>
327 </dl>
328 <a NAME="ProjectFormsBrowser.__compileUIDone" ID="ProjectFormsBrowser.__compileUIDone"></a>
329 <h4>ProjectFormsBrowser.__compileUIDone</h4>
330 <b>__compileUIDone</b>(<i>exitCode, exitStatus</i>)
331
332 <p>
333 Private slot to handle the finished signal of the pyuic/rbuic process.
334 </p>
335 <dl>
336
337 <dt><i>exitCode</i></dt>
338 <dd>
339 exit code of the process (integer)
340 </dd>
341 <dt><i>exitStatus</i></dt>
342 <dd>
343 exit status of the process (QProcess.ExitStatus)
344 </dd>
345 </dl>
346 <a NAME="ProjectFormsBrowser.__configureUicCompiler" ID="ProjectFormsBrowser.__configureUicCompiler"></a>
347 <h4>ProjectFormsBrowser.__configureUicCompiler</h4>
348 <b>__configureUicCompiler</b>(<i></i>)
349
350 <p>
351 Private slot to configure some non-common uic compiler options.
352 </p>
353 <a NAME="ProjectFormsBrowser.__deleteFile" ID="ProjectFormsBrowser.__deleteFile"></a>
354 <h4>ProjectFormsBrowser.__deleteFile</h4>
355 <b>__deleteFile</b>(<i></i>)
356
357 <p>
358 Private method to delete a form file from the project.
359 </p>
360 <a NAME="ProjectFormsBrowser.__determineUiCompiler" ID="ProjectFormsBrowser.__determineUiCompiler"></a>
361 <h4>ProjectFormsBrowser.__determineUiCompiler</h4>
362 <b>__determineUiCompiler</b>(<i></i>)
363
364 <p>
365 Private method to determine the UI compiler for the project.
366 </p>
367 <a NAME="ProjectFormsBrowser.__generateDialogCode" ID="ProjectFormsBrowser.__generateDialogCode"></a>
368 <h4>ProjectFormsBrowser.__generateDialogCode</h4>
369 <b>__generateDialogCode</b>(<i></i>)
370
371 <p>
372 Private method to generate dialog code for the form (Qt only).
373 </p>
374 <a NAME="ProjectFormsBrowser.__newForm" ID="ProjectFormsBrowser.__newForm"></a>
375 <h4>ProjectFormsBrowser.__newForm</h4>
376 <b>__newForm</b>(<i></i>)
377
378 <p>
379 Private slot to handle the New Form menu action.
380 </p>
381 <a NAME="ProjectFormsBrowser.__newUiForm" ID="ProjectFormsBrowser.__newUiForm"></a>
382 <h4>ProjectFormsBrowser.__newUiForm</h4>
383 <b>__newUiForm</b>(<i>path</i>)
384
385 <p>
386 Private slot to handle the New Form menu action for Qt-related
387 projects.
388 </p>
389 <dl>
390
391 <dt><i>path</i></dt>
392 <dd>
393 full directory path for the new form file (string)
394 </dd>
395 </dl>
396 <a NAME="ProjectFormsBrowser.__openFile" ID="ProjectFormsBrowser.__openFile"></a>
397 <h4>ProjectFormsBrowser.__openFile</h4>
398 <b>__openFile</b>(<i></i>)
399
400 <p>
401 Private slot to handle the Open menu action.
402 </p>
403 <a NAME="ProjectFormsBrowser.__openFileInEditor" ID="ProjectFormsBrowser.__openFileInEditor"></a>
404 <h4>ProjectFormsBrowser.__openFileInEditor</h4>
405 <b>__openFileInEditor</b>(<i></i>)
406
407 <p>
408 Private slot to handle the Open in Editor menu action.
409 </p>
410 <a NAME="ProjectFormsBrowser.__readStderr" ID="ProjectFormsBrowser.__readStderr"></a>
411 <h4>ProjectFormsBrowser.__readStderr</h4>
412 <b>__readStderr</b>(<i></i>)
413
414 <p>
415 Private slot to handle the readyReadStandardError signal of the
416 pyuic5/pyuic6/pyside2-uic/pyside6-uic process.
417 </p>
418 <a NAME="ProjectFormsBrowser.__readStdout" ID="ProjectFormsBrowser.__readStdout"></a>
419 <h4>ProjectFormsBrowser.__readStdout</h4>
420 <b>__readStdout</b>(<i></i>)
421
422 <p>
423 Private slot to handle the readyReadStandardOutput signal of the
424 pyuic5/pyuic6/pyside2-uic/pyside6-uic process.
425 </p>
426 <a NAME="ProjectFormsBrowser.__resetUiCompiler" ID="ProjectFormsBrowser.__resetUiCompiler"></a>
427 <h4>ProjectFormsBrowser.__resetUiCompiler</h4>
428 <b>__resetUiCompiler</b>(<i></i>)
429
430 <p>
431 Private slot to reset the determined UI compiler executable.
432 </p>
433 <a NAME="ProjectFormsBrowser.__showContextMenu" ID="ProjectFormsBrowser.__showContextMenu"></a>
434 <h4>ProjectFormsBrowser.__showContextMenu</h4>
435 <b>__showContextMenu</b>(<i></i>)
436
437 <p>
438 Private slot called by the menu aboutToShow signal.
439 </p>
440 <a NAME="ProjectFormsBrowser.__showContextMenuBack" ID="ProjectFormsBrowser.__showContextMenuBack"></a>
441 <h4>ProjectFormsBrowser.__showContextMenuBack</h4>
442 <b>__showContextMenuBack</b>(<i></i>)
443
444 <p>
445 Private slot called by the backMenu aboutToShow signal.
446 </p>
447 <a NAME="ProjectFormsBrowser.__showContextMenuDir" ID="ProjectFormsBrowser.__showContextMenuDir"></a>
448 <h4>ProjectFormsBrowser.__showContextMenuDir</h4>
449 <b>__showContextMenuDir</b>(<i></i>)
450
451 <p>
452 Private slot called by the dirMenu aboutToShow signal.
453 </p>
454 <a NAME="ProjectFormsBrowser.__showContextMenuDirMulti" ID="ProjectFormsBrowser.__showContextMenuDirMulti"></a>
455 <h4>ProjectFormsBrowser.__showContextMenuDirMulti</h4>
456 <b>__showContextMenuDirMulti</b>(<i></i>)
457
458 <p>
459 Private slot called by the dirMultiMenu aboutToShow signal.
460 </p>
461 <a NAME="ProjectFormsBrowser.__showContextMenuMulti" ID="ProjectFormsBrowser.__showContextMenuMulti"></a>
462 <h4>ProjectFormsBrowser.__showContextMenuMulti</h4>
463 <b>__showContextMenuMulti</b>(<i></i>)
464
465 <p>
466 Private slot called by the multiMenu aboutToShow signal.
467 </p>
468 <a NAME="ProjectFormsBrowser._contextMenuRequested" ID="ProjectFormsBrowser._contextMenuRequested"></a>
469 <h4>ProjectFormsBrowser._contextMenuRequested</h4>
470 <b>_contextMenuRequested</b>(<i>coord</i>)
471
472 <p>
473 Protected slot to show the context menu.
474 </p>
475 <dl>
476
477 <dt><i>coord</i></dt>
478 <dd>
479 the position of the mouse pointer (QPoint)
480 </dd>
481 </dl>
482 <a NAME="ProjectFormsBrowser._createPopupMenus" ID="ProjectFormsBrowser._createPopupMenus"></a>
483 <h4>ProjectFormsBrowser._createPopupMenus</h4>
484 <b>_createPopupMenus</b>(<i></i>)
485
486 <p>
487 Protected overloaded method to generate the popup menu.
488 </p>
489 <a NAME="ProjectFormsBrowser._initHookMethods" ID="ProjectFormsBrowser._initHookMethods"></a>
490 <h4>ProjectFormsBrowser._initHookMethods</h4>
491 <b>_initHookMethods</b>(<i></i>)
492
493 <p>
494 Protected method to initialize the hooks dictionary.
495 </p>
496 <p>
497 Supported hook methods are:
498 <ul>
499 <li>compileForm: takes filename as parameter</li>
500 <li>compileAllForms: takes list of filenames as parameter</li>
501 <li>compileSelectedForms: takes list of filenames as parameter</li>
502 <li>compileChangedForms: takes list of filenames as parameter</li>
503 <li>generateDialogCode: takes filename as parameter</li>
504 <li>newForm: takes full directory path of new file as parameter</li>
505 <li>open: takes a filename as parameter</li>
506 </ul>
507 </p>
508 <p>
509 <b>Note</b>: Filenames are relative to the project directory, if not
510 specified differently.
511 </p>
512 <a NAME="ProjectFormsBrowser._openItem" ID="ProjectFormsBrowser._openItem"></a>
513 <h4>ProjectFormsBrowser._openItem</h4>
514 <b>_openItem</b>(<i></i>)
515
516 <p>
517 Protected slot to handle the open popup menu entry.
518 </p>
519 <a NAME="ProjectFormsBrowser.compileChangedForms" ID="ProjectFormsBrowser.compileChangedForms"></a>
520 <h4>ProjectFormsBrowser.compileChangedForms</h4>
521 <b>compileChangedForms</b>(<i></i>)
522
523 <p>
524 Public method to compile all changed forms to source files.
525 </p>
526 <a NAME="ProjectFormsBrowser.getUiCompiler" ID="ProjectFormsBrowser.getUiCompiler"></a>
527 <h4>ProjectFormsBrowser.getUiCompiler</h4>
528 <b>getUiCompiler</b>(<i></i>)
529
530 <p>
531 Public method to get the UI compiler executable of the project.
532 </p>
533 <dl>
534 <dt>Return:</dt>
535 <dd>
536 UI compiler executable
537 </dd>
538 </dl>
539 <dl>
540 <dt>Return Type:</dt>
541 <dd>
542 str
543 </dd>
544 </dl>
545 <a NAME="ProjectFormsBrowser.handlePreferencesChanged" ID="ProjectFormsBrowser.handlePreferencesChanged"></a>
546 <h4>ProjectFormsBrowser.handlePreferencesChanged</h4>
547 <b>handlePreferencesChanged</b>(<i></i>)
548
549 <p>
550 Public slot used to handle the preferencesChanged signal.
551 </p>
552 <div align="right"><a href="#top">Up</a></div>
553 <hr />
554 </body></html>

eric ide

mercurial