eric6/Documentation/Source/eric6.Project.ProjectFormsBrowser.html

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

eric ide

mercurial