eric7/Documentation/Source/eric7.Project.ProjectResourcesBrowser.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.ProjectResourcesBrowser</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.ProjectResourcesBrowser</h1>
24
25 <p>
26 Module implementing a class used to display the resources 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="#ProjectResourcesBrowser">ProjectResourcesBrowser</a></td>
39 <td>A class used to display the resources 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="ProjectResourcesBrowser" ID="ProjectResourcesBrowser"></a>
50 <h2>ProjectResourcesBrowser</h2>
51
52 <p>
53 A class used to display the resources 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>showMenu(str, QMenu)</dt>
64 <dd>
65 emitted when a menu is about to be shown.
66 The name of the menu and a reference to the menu are given.
67 </dd>
68 </dl>
69 <h3>Derived from</h3>
70 ProjectBaseBrowser
71 <h3>Class Attributes</h3>
72
73 <table>
74 <tr><td>RCFilenameFormatPython</td></tr><tr><td>RCFilenameFormatRuby</td></tr>
75 </table>
76 <h3>Class Methods</h3>
77
78 <table>
79 <tr><td>None</td></tr>
80 </table>
81 <h3>Methods</h3>
82
83 <table>
84
85 <tr>
86 <td><a href="#ProjectResourcesBrowser.__init__">ProjectResourcesBrowser</a></td>
87 <td>Constructor</td>
88 </tr>
89 <tr>
90 <td><a href="#ProjectResourcesBrowser.__addResourceFiles">__addResourceFiles</a></td>
91 <td>Private method to add resource files to the project.</td>
92 </tr>
93 <tr>
94 <td><a href="#ProjectResourcesBrowser.__addResourcesDirectory">__addResourcesDirectory</a></td>
95 <td>Private method to add resource files of a directory to the project.</td>
96 </tr>
97 <tr>
98 <td><a href="#ProjectResourcesBrowser.__checkResourcesNewer">__checkResourcesNewer</a></td>
99 <td>Private method to check, if any file referenced in a resource file is newer than a given time.</td>
100 </tr>
101 <tr>
102 <td><a href="#ProjectResourcesBrowser.__compileAllResources">__compileAllResources</a></td>
103 <td>Private method to compile all resources to source files.</td>
104 </tr>
105 <tr>
106 <td><a href="#ProjectResourcesBrowser.__compileQRC">__compileQRC</a></td>
107 <td>Private method to compile a .qrc file to a .py file.</td>
108 </tr>
109 <tr>
110 <td><a href="#ProjectResourcesBrowser.__compileQRCDone">__compileQRCDone</a></td>
111 <td>Private slot to handle the finished signal of the compile process.</td>
112 </tr>
113 <tr>
114 <td><a href="#ProjectResourcesBrowser.__compileResource">__compileResource</a></td>
115 <td>Private method to compile a resource to a source file.</td>
116 </tr>
117 <tr>
118 <td><a href="#ProjectResourcesBrowser.__compileSelectedResources">__compileSelectedResources</a></td>
119 <td>Private method to compile selected resources to source files.</td>
120 </tr>
121 <tr>
122 <td><a href="#ProjectResourcesBrowser.__configureRccCompiler">__configureRccCompiler</a></td>
123 <td>Private slot to configure some non-common rcc compiler options.</td>
124 </tr>
125 <tr>
126 <td><a href="#ProjectResourcesBrowser.__deleteFile">__deleteFile</a></td>
127 <td>Private method to delete a resource file from the project.</td>
128 </tr>
129 <tr>
130 <td><a href="#ProjectResourcesBrowser.__newResource">__newResource</a></td>
131 <td>Private slot to handle the New Resource menu action.</td>
132 </tr>
133 <tr>
134 <td><a href="#ProjectResourcesBrowser.__openFile">__openFile</a></td>
135 <td>Private slot to handle the Open menu action.</td>
136 </tr>
137 <tr>
138 <td><a href="#ProjectResourcesBrowser.__readStderr">__readStderr</a></td>
139 <td>Private slot to handle the readyReadStandardError signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.</td>
140 </tr>
141 <tr>
142 <td><a href="#ProjectResourcesBrowser.__readStdout">__readStdout</a></td>
143 <td>Private slot to handle the readyReadStandardOutput signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.</td>
144 </tr>
145 <tr>
146 <td><a href="#ProjectResourcesBrowser.__showContextMenu">__showContextMenu</a></td>
147 <td>Private slot called by the menu aboutToShow signal.</td>
148 </tr>
149 <tr>
150 <td><a href="#ProjectResourcesBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
151 <td>Private slot called by the backMenu aboutToShow signal.</td>
152 </tr>
153 <tr>
154 <td><a href="#ProjectResourcesBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
155 <td>Private slot called by the dirMenu aboutToShow signal.</td>
156 </tr>
157 <tr>
158 <td><a href="#ProjectResourcesBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
159 <td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
160 </tr>
161 <tr>
162 <td><a href="#ProjectResourcesBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
163 <td>Private slot called by the multiMenu aboutToShow signal.</td>
164 </tr>
165 <tr>
166 <td><a href="#ProjectResourcesBrowser._contextMenuRequested">_contextMenuRequested</a></td>
167 <td>Protected slot to show the context menu.</td>
168 </tr>
169 <tr>
170 <td><a href="#ProjectResourcesBrowser._createPopupMenus">_createPopupMenus</a></td>
171 <td>Protected overloaded method to generate the popup menu.</td>
172 </tr>
173 <tr>
174 <td><a href="#ProjectResourcesBrowser._initHookMethods">_initHookMethods</a></td>
175 <td>Protected method to initialize the hooks dictionary.</td>
176 </tr>
177 <tr>
178 <td><a href="#ProjectResourcesBrowser._openItem">_openItem</a></td>
179 <td>Protected slot to handle the open popup menu entry.</td>
180 </tr>
181 <tr>
182 <td><a href="#ProjectResourcesBrowser.compileChangedResources">compileChangedResources</a></td>
183 <td>Public method to compile all changed resources to source files.</td>
184 </tr>
185 <tr>
186 <td><a href="#ProjectResourcesBrowser.handlePreferencesChanged">handlePreferencesChanged</a></td>
187 <td>Public slot used to handle the preferencesChanged signal.</td>
188 </tr>
189 </table>
190 <h3>Static Methods</h3>
191
192 <table>
193 <tr><td>None</td></tr>
194 </table>
195
196 <a NAME="ProjectResourcesBrowser.__init__" ID="ProjectResourcesBrowser.__init__"></a>
197 <h4>ProjectResourcesBrowser (Constructor)</h4>
198 <b>ProjectResourcesBrowser</b>(<i>project, parent=None</i>)
199
200 <p>
201 Constructor
202 </p>
203 <dl>
204
205 <dt><i>project</i></dt>
206 <dd>
207 reference to the project object
208 </dd>
209 <dt><i>parent</i></dt>
210 <dd>
211 parent widget of this browser (QWidget)
212 </dd>
213 </dl>
214 <a NAME="ProjectResourcesBrowser.__addResourceFiles" ID="ProjectResourcesBrowser.__addResourceFiles"></a>
215 <h4>ProjectResourcesBrowser.__addResourceFiles</h4>
216 <b>__addResourceFiles</b>(<i></i>)
217
218 <p>
219 Private method to add resource files to the project.
220 </p>
221 <a NAME="ProjectResourcesBrowser.__addResourcesDirectory" ID="ProjectResourcesBrowser.__addResourcesDirectory"></a>
222 <h4>ProjectResourcesBrowser.__addResourcesDirectory</h4>
223 <b>__addResourcesDirectory</b>(<i></i>)
224
225 <p>
226 Private method to add resource files of a directory to the project.
227 </p>
228 <a NAME="ProjectResourcesBrowser.__checkResourcesNewer" ID="ProjectResourcesBrowser.__checkResourcesNewer"></a>
229 <h4>ProjectResourcesBrowser.__checkResourcesNewer</h4>
230 <b>__checkResourcesNewer</b>(<i>filename, mtime</i>)
231
232 <p>
233 Private method to check, if any file referenced in a resource
234 file is newer than a given time.
235 </p>
236 <dl>
237
238 <dt><i>filename</i></dt>
239 <dd>
240 filename of the resource file (string)
241 </dd>
242 <dt><i>mtime</i></dt>
243 <dd>
244 modification time to check against
245 </dd>
246 </dl>
247 <dl>
248 <dt>Return:</dt>
249 <dd>
250 flag indicating some file is newer (boolean)
251 </dd>
252 </dl>
253 <a NAME="ProjectResourcesBrowser.__compileAllResources" ID="ProjectResourcesBrowser.__compileAllResources"></a>
254 <h4>ProjectResourcesBrowser.__compileAllResources</h4>
255 <b>__compileAllResources</b>(<i></i>)
256
257 <p>
258 Private method to compile all resources to source files.
259 </p>
260 <a NAME="ProjectResourcesBrowser.__compileQRC" ID="ProjectResourcesBrowser.__compileQRC"></a>
261 <h4>ProjectResourcesBrowser.__compileQRC</h4>
262 <b>__compileQRC</b>(<i>fn, noDialog=False, progress=None</i>)
263
264 <p>
265 Private method to compile a .qrc file to a .py file.
266 </p>
267 <dl>
268
269 <dt><i>fn</i></dt>
270 <dd>
271 filename of the .ui file to be compiled
272 </dd>
273 <dt><i>noDialog</i></dt>
274 <dd>
275 flag indicating silent operations
276 </dd>
277 <dt><i>progress</i></dt>
278 <dd>
279 reference to the progress dialog
280 </dd>
281 </dl>
282 <dl>
283 <dt>Return:</dt>
284 <dd>
285 reference to the compile process (QProcess)
286 </dd>
287 </dl>
288 <a NAME="ProjectResourcesBrowser.__compileQRCDone" ID="ProjectResourcesBrowser.__compileQRCDone"></a>
289 <h4>ProjectResourcesBrowser.__compileQRCDone</h4>
290 <b>__compileQRCDone</b>(<i>exitCode, exitStatus</i>)
291
292 <p>
293 Private slot to handle the finished signal of the compile process.
294 </p>
295 <dl>
296
297 <dt><i>exitCode</i></dt>
298 <dd>
299 exit code of the process (integer)
300 </dd>
301 <dt><i>exitStatus</i></dt>
302 <dd>
303 exit status of the process (QProcess.ExitStatus)
304 </dd>
305 </dl>
306 <a NAME="ProjectResourcesBrowser.__compileResource" ID="ProjectResourcesBrowser.__compileResource"></a>
307 <h4>ProjectResourcesBrowser.__compileResource</h4>
308 <b>__compileResource</b>(<i></i>)
309
310 <p>
311 Private method to compile a resource to a source file.
312 </p>
313 <a NAME="ProjectResourcesBrowser.__compileSelectedResources" ID="ProjectResourcesBrowser.__compileSelectedResources"></a>
314 <h4>ProjectResourcesBrowser.__compileSelectedResources</h4>
315 <b>__compileSelectedResources</b>(<i></i>)
316
317 <p>
318 Private method to compile selected resources to source files.
319 </p>
320 <a NAME="ProjectResourcesBrowser.__configureRccCompiler" ID="ProjectResourcesBrowser.__configureRccCompiler"></a>
321 <h4>ProjectResourcesBrowser.__configureRccCompiler</h4>
322 <b>__configureRccCompiler</b>(<i></i>)
323
324 <p>
325 Private slot to configure some non-common rcc compiler options.
326 </p>
327 <a NAME="ProjectResourcesBrowser.__deleteFile" ID="ProjectResourcesBrowser.__deleteFile"></a>
328 <h4>ProjectResourcesBrowser.__deleteFile</h4>
329 <b>__deleteFile</b>(<i></i>)
330
331 <p>
332 Private method to delete a resource file from the project.
333 </p>
334 <a NAME="ProjectResourcesBrowser.__newResource" ID="ProjectResourcesBrowser.__newResource"></a>
335 <h4>ProjectResourcesBrowser.__newResource</h4>
336 <b>__newResource</b>(<i></i>)
337
338 <p>
339 Private slot to handle the New Resource menu action.
340 </p>
341 <a NAME="ProjectResourcesBrowser.__openFile" ID="ProjectResourcesBrowser.__openFile"></a>
342 <h4>ProjectResourcesBrowser.__openFile</h4>
343 <b>__openFile</b>(<i></i>)
344
345 <p>
346 Private slot to handle the Open menu action.
347 </p>
348 <a NAME="ProjectResourcesBrowser.__readStderr" ID="ProjectResourcesBrowser.__readStderr"></a>
349 <h4>ProjectResourcesBrowser.__readStderr</h4>
350 <b>__readStderr</b>(<i></i>)
351
352 <p>
353 Private slot to handle the readyReadStandardError signal of the
354 pyrcc5/pyside2-rcc/pyside6-rcc process.
355 </p>
356 <a NAME="ProjectResourcesBrowser.__readStdout" ID="ProjectResourcesBrowser.__readStdout"></a>
357 <h4>ProjectResourcesBrowser.__readStdout</h4>
358 <b>__readStdout</b>(<i></i>)
359
360 <p>
361 Private slot to handle the readyReadStandardOutput signal of the
362 pyrcc5/pyside2-rcc/pyside6-rcc process.
363 </p>
364 <a NAME="ProjectResourcesBrowser.__showContextMenu" ID="ProjectResourcesBrowser.__showContextMenu"></a>
365 <h4>ProjectResourcesBrowser.__showContextMenu</h4>
366 <b>__showContextMenu</b>(<i></i>)
367
368 <p>
369 Private slot called by the menu aboutToShow signal.
370 </p>
371 <a NAME="ProjectResourcesBrowser.__showContextMenuBack" ID="ProjectResourcesBrowser.__showContextMenuBack"></a>
372 <h4>ProjectResourcesBrowser.__showContextMenuBack</h4>
373 <b>__showContextMenuBack</b>(<i></i>)
374
375 <p>
376 Private slot called by the backMenu aboutToShow signal.
377 </p>
378 <a NAME="ProjectResourcesBrowser.__showContextMenuDir" ID="ProjectResourcesBrowser.__showContextMenuDir"></a>
379 <h4>ProjectResourcesBrowser.__showContextMenuDir</h4>
380 <b>__showContextMenuDir</b>(<i></i>)
381
382 <p>
383 Private slot called by the dirMenu aboutToShow signal.
384 </p>
385 <a NAME="ProjectResourcesBrowser.__showContextMenuDirMulti" ID="ProjectResourcesBrowser.__showContextMenuDirMulti"></a>
386 <h4>ProjectResourcesBrowser.__showContextMenuDirMulti</h4>
387 <b>__showContextMenuDirMulti</b>(<i></i>)
388
389 <p>
390 Private slot called by the dirMultiMenu aboutToShow signal.
391 </p>
392 <a NAME="ProjectResourcesBrowser.__showContextMenuMulti" ID="ProjectResourcesBrowser.__showContextMenuMulti"></a>
393 <h4>ProjectResourcesBrowser.__showContextMenuMulti</h4>
394 <b>__showContextMenuMulti</b>(<i></i>)
395
396 <p>
397 Private slot called by the multiMenu aboutToShow signal.
398 </p>
399 <a NAME="ProjectResourcesBrowser._contextMenuRequested" ID="ProjectResourcesBrowser._contextMenuRequested"></a>
400 <h4>ProjectResourcesBrowser._contextMenuRequested</h4>
401 <b>_contextMenuRequested</b>(<i>coord</i>)
402
403 <p>
404 Protected slot to show the context menu.
405 </p>
406 <dl>
407
408 <dt><i>coord</i></dt>
409 <dd>
410 the position of the mouse pointer (QPoint)
411 </dd>
412 </dl>
413 <a NAME="ProjectResourcesBrowser._createPopupMenus" ID="ProjectResourcesBrowser._createPopupMenus"></a>
414 <h4>ProjectResourcesBrowser._createPopupMenus</h4>
415 <b>_createPopupMenus</b>(<i></i>)
416
417 <p>
418 Protected overloaded method to generate the popup menu.
419 </p>
420 <a NAME="ProjectResourcesBrowser._initHookMethods" ID="ProjectResourcesBrowser._initHookMethods"></a>
421 <h4>ProjectResourcesBrowser._initHookMethods</h4>
422 <b>_initHookMethods</b>(<i></i>)
423
424 <p>
425 Protected method to initialize the hooks dictionary.
426 </p>
427 <p>
428 Supported hook methods are:
429 <ul>
430 <li>compileResource: takes filename as parameter</li>
431 <li>compileAllResources: takes list of filenames as parameter</li>
432 <li>compileChangedResources: takes list of filenames as parameter</li>
433 <li>compileSelectedResources: takes list of all form filenames as
434 parameter</li>
435 <li>newResource: takes full directory path of new file as
436 parameter</li>
437 </ul>
438 </p>
439 <p>
440 <b>Note</b>: Filenames are relative to the project directory, if not
441 specified differently.
442 </p>
443 <a NAME="ProjectResourcesBrowser._openItem" ID="ProjectResourcesBrowser._openItem"></a>
444 <h4>ProjectResourcesBrowser._openItem</h4>
445 <b>_openItem</b>(<i></i>)
446
447 <p>
448 Protected slot to handle the open popup menu entry.
449 </p>
450 <a NAME="ProjectResourcesBrowser.compileChangedResources" ID="ProjectResourcesBrowser.compileChangedResources"></a>
451 <h4>ProjectResourcesBrowser.compileChangedResources</h4>
452 <b>compileChangedResources</b>(<i></i>)
453
454 <p>
455 Public method to compile all changed resources to source files.
456 </p>
457 <a NAME="ProjectResourcesBrowser.handlePreferencesChanged" ID="ProjectResourcesBrowser.handlePreferencesChanged"></a>
458 <h4>ProjectResourcesBrowser.handlePreferencesChanged</h4>
459 <b>handlePreferencesChanged</b>(<i></i>)
460
461 <p>
462 Public slot used to handle the preferencesChanged signal.
463 </p>
464 <div align="right"><a href="#top">Up</a></div>
465 <hr />
466 </body></html>

eric ide

mercurial