Documentation/Source/eric6.Project.ProjectFormsBrowser.html

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

eric ide

mercurial