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

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

eric ide

mercurial