eric6/Documentation/Source/eric6.Project.ProjectResourcesBrowser.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.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><a NAME="top" ID="top"></a>
22 <h1>eric6.Project.ProjectResourcesBrowser</h1>
23 <p>
24 Module implementing a class used to display the resources 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="#ProjectResourcesBrowser">ProjectResourcesBrowser</a></td>
34 <td>A class used to display the resources 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="ProjectResourcesBrowser" ID="ProjectResourcesBrowser"></a>
43 <h2>ProjectResourcesBrowser</h2>
44 <p>
45 A class used to display the resources 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>showMenu(str, QMenu)</dt>
53 <dd>
54 emitted when a menu is about to be shown.
55 The name of the menu and a reference to the menu are given.
56 </dd>
57 </dl>
58 <h3>Derived from</h3>
59 ProjectBaseBrowser
60 <h3>Class Attributes</h3>
61 <table>
62 <tr><td>RCFilenameFormatPython</td></tr><tr><td>RCFilenameFormatRuby</td></tr>
63 </table>
64 <h3>Class Methods</h3>
65 <table>
66 <tr><td>None</td></tr>
67 </table>
68 <h3>Methods</h3>
69 <table>
70 <tr>
71 <td><a href="#ProjectResourcesBrowser.__init__">ProjectResourcesBrowser</a></td>
72 <td>Constructor</td>
73 </tr><tr>
74 <td><a href="#ProjectResourcesBrowser.__addResourceFiles">__addResourceFiles</a></td>
75 <td>Private method to add resource files to the project.</td>
76 </tr><tr>
77 <td><a href="#ProjectResourcesBrowser.__addResourcesDirectory">__addResourcesDirectory</a></td>
78 <td>Private method to add resource files of a directory to the project.</td>
79 </tr><tr>
80 <td><a href="#ProjectResourcesBrowser.__checkResourcesNewer">__checkResourcesNewer</a></td>
81 <td>Private method to check, if any file referenced in a resource file is newer than a given time.</td>
82 </tr><tr>
83 <td><a href="#ProjectResourcesBrowser.__compileAllResources">__compileAllResources</a></td>
84 <td>Private method to compile all resources to source files.</td>
85 </tr><tr>
86 <td><a href="#ProjectResourcesBrowser.__compileQRC">__compileQRC</a></td>
87 <td>Private method to compile a .qrc file to a .py file.</td>
88 </tr><tr>
89 <td><a href="#ProjectResourcesBrowser.__compileQRCDone">__compileQRCDone</a></td>
90 <td>Private slot to handle the finished signal of the compile process.</td>
91 </tr><tr>
92 <td><a href="#ProjectResourcesBrowser.__compileResource">__compileResource</a></td>
93 <td>Private method to compile a resource to a source file.</td>
94 </tr><tr>
95 <td><a href="#ProjectResourcesBrowser.__compileSelectedResources">__compileSelectedResources</a></td>
96 <td>Private method to compile selected resources to source files.</td>
97 </tr><tr>
98 <td><a href="#ProjectResourcesBrowser.__configureRccCompiler">__configureRccCompiler</a></td>
99 <td>Private slot to configure some non-common rcc compiler options.</td>
100 </tr><tr>
101 <td><a href="#ProjectResourcesBrowser.__deleteFile">__deleteFile</a></td>
102 <td>Private method to delete a resource file from the project.</td>
103 </tr><tr>
104 <td><a href="#ProjectResourcesBrowser.__newResource">__newResource</a></td>
105 <td>Private slot to handle the New Resource menu action.</td>
106 </tr><tr>
107 <td><a href="#ProjectResourcesBrowser.__openFile">__openFile</a></td>
108 <td>Private slot to handle the Open menu action.</td>
109 </tr><tr>
110 <td><a href="#ProjectResourcesBrowser.__readStderr">__readStderr</a></td>
111 <td>Private slot to handle the readyReadStandardError signal of the pyrcc4/pyrcc5/pyside-rcc/pyside2-rcc/rbrcc process.</td>
112 </tr><tr>
113 <td><a href="#ProjectResourcesBrowser.__readStdout">__readStdout</a></td>
114 <td>Private slot to handle the readyReadStandardOutput signal of the pyrcc4/pyrcc5/pyside-rcc/pyside2-rcc/rbrcc process.</td>
115 </tr><tr>
116 <td><a href="#ProjectResourcesBrowser.__showContextMenu">__showContextMenu</a></td>
117 <td>Private slot called by the menu aboutToShow signal.</td>
118 </tr><tr>
119 <td><a href="#ProjectResourcesBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
120 <td>Private slot called by the backMenu aboutToShow signal.</td>
121 </tr><tr>
122 <td><a href="#ProjectResourcesBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
123 <td>Private slot called by the dirMenu aboutToShow signal.</td>
124 </tr><tr>
125 <td><a href="#ProjectResourcesBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
126 <td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
127 </tr><tr>
128 <td><a href="#ProjectResourcesBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
129 <td>Private slot called by the multiMenu aboutToShow signal.</td>
130 </tr><tr>
131 <td><a href="#ProjectResourcesBrowser._contextMenuRequested">_contextMenuRequested</a></td>
132 <td>Protected slot to show the context menu.</td>
133 </tr><tr>
134 <td><a href="#ProjectResourcesBrowser._createPopupMenus">_createPopupMenus</a></td>
135 <td>Protected overloaded method to generate the popup menu.</td>
136 </tr><tr>
137 <td><a href="#ProjectResourcesBrowser._initHookMethods">_initHookMethods</a></td>
138 <td>Protected method to initialize the hooks dictionary.</td>
139 </tr><tr>
140 <td><a href="#ProjectResourcesBrowser._openItem">_openItem</a></td>
141 <td>Protected slot to handle the open popup menu entry.</td>
142 </tr><tr>
143 <td><a href="#ProjectResourcesBrowser.compileChangedResources">compileChangedResources</a></td>
144 <td>Public method to compile all changed resources to source files.</td>
145 </tr><tr>
146 <td><a href="#ProjectResourcesBrowser.handlePreferencesChanged">handlePreferencesChanged</a></td>
147 <td>Public slot used to handle the preferencesChanged signal.</td>
148 </tr>
149 </table>
150 <h3>Static Methods</h3>
151 <table>
152 <tr><td>None</td></tr>
153 </table>
154 <a NAME="ProjectResourcesBrowser.__init__" ID="ProjectResourcesBrowser.__init__"></a>
155 <h4>ProjectResourcesBrowser (Constructor)</h4>
156 <b>ProjectResourcesBrowser</b>(<i>project, parent=None</i>)
157 <p>
158 Constructor
159 </p><dl>
160 <dt><i>project</i></dt>
161 <dd>
162 reference to the project object
163 </dd><dt><i>parent</i></dt>
164 <dd>
165 parent widget of this browser (QWidget)
166 </dd>
167 </dl><a NAME="ProjectResourcesBrowser.__addResourceFiles" ID="ProjectResourcesBrowser.__addResourceFiles"></a>
168 <h4>ProjectResourcesBrowser.__addResourceFiles</h4>
169 <b>__addResourceFiles</b>(<i></i>)
170 <p>
171 Private method to add resource files to the project.
172 </p><a NAME="ProjectResourcesBrowser.__addResourcesDirectory" ID="ProjectResourcesBrowser.__addResourcesDirectory"></a>
173 <h4>ProjectResourcesBrowser.__addResourcesDirectory</h4>
174 <b>__addResourcesDirectory</b>(<i></i>)
175 <p>
176 Private method to add resource files of a directory to the project.
177 </p><a NAME="ProjectResourcesBrowser.__checkResourcesNewer" ID="ProjectResourcesBrowser.__checkResourcesNewer"></a>
178 <h4>ProjectResourcesBrowser.__checkResourcesNewer</h4>
179 <b>__checkResourcesNewer</b>(<i>filename, mtime</i>)
180 <p>
181 Private method to check, if any file referenced in a resource
182 file is newer than a given time.
183 </p><dl>
184 <dt><i>filename</i></dt>
185 <dd>
186 filename of the resource file (string)
187 </dd><dt><i>mtime</i></dt>
188 <dd>
189 modification time to check against
190 </dd>
191 </dl><dl>
192 <dt>Returns:</dt>
193 <dd>
194 flag indicating some file is newer (boolean)
195 </dd>
196 </dl><a NAME="ProjectResourcesBrowser.__compileAllResources" ID="ProjectResourcesBrowser.__compileAllResources"></a>
197 <h4>ProjectResourcesBrowser.__compileAllResources</h4>
198 <b>__compileAllResources</b>(<i></i>)
199 <p>
200 Private method to compile all resources to source files.
201 </p><a NAME="ProjectResourcesBrowser.__compileQRC" ID="ProjectResourcesBrowser.__compileQRC"></a>
202 <h4>ProjectResourcesBrowser.__compileQRC</h4>
203 <b>__compileQRC</b>(<i>fn, noDialog=False, progress=None</i>)
204 <p>
205 Private method to compile a .qrc file to a .py file.
206 </p><dl>
207 <dt><i>fn</i></dt>
208 <dd>
209 filename of the .ui file to be compiled
210 </dd><dt><i>noDialog</i></dt>
211 <dd>
212 flag indicating silent operations
213 </dd><dt><i>progress</i></dt>
214 <dd>
215 reference to the progress dialog
216 </dd>
217 </dl><dl>
218 <dt>Returns:</dt>
219 <dd>
220 reference to the compile process (QProcess)
221 </dd>
222 </dl><a NAME="ProjectResourcesBrowser.__compileQRCDone" ID="ProjectResourcesBrowser.__compileQRCDone"></a>
223 <h4>ProjectResourcesBrowser.__compileQRCDone</h4>
224 <b>__compileQRCDone</b>(<i>exitCode, exitStatus</i>)
225 <p>
226 Private slot to handle the finished signal of the compile process.
227 </p><dl>
228 <dt><i>exitCode</i></dt>
229 <dd>
230 exit code of the process (integer)
231 </dd><dt><i>exitStatus</i></dt>
232 <dd>
233 exit status of the process (QProcess.ExitStatus)
234 </dd>
235 </dl><a NAME="ProjectResourcesBrowser.__compileResource" ID="ProjectResourcesBrowser.__compileResource"></a>
236 <h4>ProjectResourcesBrowser.__compileResource</h4>
237 <b>__compileResource</b>(<i></i>)
238 <p>
239 Private method to compile a resource to a source file.
240 </p><a NAME="ProjectResourcesBrowser.__compileSelectedResources" ID="ProjectResourcesBrowser.__compileSelectedResources"></a>
241 <h4>ProjectResourcesBrowser.__compileSelectedResources</h4>
242 <b>__compileSelectedResources</b>(<i></i>)
243 <p>
244 Private method to compile selected resources to source files.
245 </p><a NAME="ProjectResourcesBrowser.__configureRccCompiler" ID="ProjectResourcesBrowser.__configureRccCompiler"></a>
246 <h4>ProjectResourcesBrowser.__configureRccCompiler</h4>
247 <b>__configureRccCompiler</b>(<i></i>)
248 <p>
249 Private slot to configure some non-common rcc compiler options.
250 </p><a NAME="ProjectResourcesBrowser.__deleteFile" ID="ProjectResourcesBrowser.__deleteFile"></a>
251 <h4>ProjectResourcesBrowser.__deleteFile</h4>
252 <b>__deleteFile</b>(<i></i>)
253 <p>
254 Private method to delete a resource file from the project.
255 </p><a NAME="ProjectResourcesBrowser.__newResource" ID="ProjectResourcesBrowser.__newResource"></a>
256 <h4>ProjectResourcesBrowser.__newResource</h4>
257 <b>__newResource</b>(<i></i>)
258 <p>
259 Private slot to handle the New Resource menu action.
260 </p><a NAME="ProjectResourcesBrowser.__openFile" ID="ProjectResourcesBrowser.__openFile"></a>
261 <h4>ProjectResourcesBrowser.__openFile</h4>
262 <b>__openFile</b>(<i></i>)
263 <p>
264 Private slot to handle the Open menu action.
265 </p><a NAME="ProjectResourcesBrowser.__readStderr" ID="ProjectResourcesBrowser.__readStderr"></a>
266 <h4>ProjectResourcesBrowser.__readStderr</h4>
267 <b>__readStderr</b>(<i></i>)
268 <p>
269 Private slot to handle the readyReadStandardError signal of the
270 pyrcc4/pyrcc5/pyside-rcc/pyside2-rcc/rbrcc process.
271 </p><a NAME="ProjectResourcesBrowser.__readStdout" ID="ProjectResourcesBrowser.__readStdout"></a>
272 <h4>ProjectResourcesBrowser.__readStdout</h4>
273 <b>__readStdout</b>(<i></i>)
274 <p>
275 Private slot to handle the readyReadStandardOutput signal of the
276 pyrcc4/pyrcc5/pyside-rcc/pyside2-rcc/rbrcc process.
277 </p><a NAME="ProjectResourcesBrowser.__showContextMenu" ID="ProjectResourcesBrowser.__showContextMenu"></a>
278 <h4>ProjectResourcesBrowser.__showContextMenu</h4>
279 <b>__showContextMenu</b>(<i></i>)
280 <p>
281 Private slot called by the menu aboutToShow signal.
282 </p><a NAME="ProjectResourcesBrowser.__showContextMenuBack" ID="ProjectResourcesBrowser.__showContextMenuBack"></a>
283 <h4>ProjectResourcesBrowser.__showContextMenuBack</h4>
284 <b>__showContextMenuBack</b>(<i></i>)
285 <p>
286 Private slot called by the backMenu aboutToShow signal.
287 </p><a NAME="ProjectResourcesBrowser.__showContextMenuDir" ID="ProjectResourcesBrowser.__showContextMenuDir"></a>
288 <h4>ProjectResourcesBrowser.__showContextMenuDir</h4>
289 <b>__showContextMenuDir</b>(<i></i>)
290 <p>
291 Private slot called by the dirMenu aboutToShow signal.
292 </p><a NAME="ProjectResourcesBrowser.__showContextMenuDirMulti" ID="ProjectResourcesBrowser.__showContextMenuDirMulti"></a>
293 <h4>ProjectResourcesBrowser.__showContextMenuDirMulti</h4>
294 <b>__showContextMenuDirMulti</b>(<i></i>)
295 <p>
296 Private slot called by the dirMultiMenu aboutToShow signal.
297 </p><a NAME="ProjectResourcesBrowser.__showContextMenuMulti" ID="ProjectResourcesBrowser.__showContextMenuMulti"></a>
298 <h4>ProjectResourcesBrowser.__showContextMenuMulti</h4>
299 <b>__showContextMenuMulti</b>(<i></i>)
300 <p>
301 Private slot called by the multiMenu aboutToShow signal.
302 </p><a NAME="ProjectResourcesBrowser._contextMenuRequested" ID="ProjectResourcesBrowser._contextMenuRequested"></a>
303 <h4>ProjectResourcesBrowser._contextMenuRequested</h4>
304 <b>_contextMenuRequested</b>(<i>coord</i>)
305 <p>
306 Protected slot to show the context menu.
307 </p><dl>
308 <dt><i>coord</i></dt>
309 <dd>
310 the position of the mouse pointer (QPoint)
311 </dd>
312 </dl><a NAME="ProjectResourcesBrowser._createPopupMenus" ID="ProjectResourcesBrowser._createPopupMenus"></a>
313 <h4>ProjectResourcesBrowser._createPopupMenus</h4>
314 <b>_createPopupMenus</b>(<i></i>)
315 <p>
316 Protected overloaded method to generate the popup menu.
317 </p><a NAME="ProjectResourcesBrowser._initHookMethods" ID="ProjectResourcesBrowser._initHookMethods"></a>
318 <h4>ProjectResourcesBrowser._initHookMethods</h4>
319 <b>_initHookMethods</b>(<i></i>)
320 <p>
321 Protected method to initialize the hooks dictionary.
322 </p><p>
323 Supported hook methods are:
324 <ul>
325 <li>compileResource: takes filename as parameter</li>
326 <li>compileAllResources: takes list of filenames as parameter</li>
327 <li>compileChangedResources: takes list of filenames as parameter</li>
328 <li>compileSelectedResources: takes list of all form filenames as
329 parameter</li>
330 <li>newResource: takes full directory path of new file as
331 parameter</li>
332 </ul>
333 </p><p>
334 <b>Note</b>: Filenames are relative to the project directory, if not
335 specified differently.
336 </p><a NAME="ProjectResourcesBrowser._openItem" ID="ProjectResourcesBrowser._openItem"></a>
337 <h4>ProjectResourcesBrowser._openItem</h4>
338 <b>_openItem</b>(<i></i>)
339 <p>
340 Protected slot to handle the open popup menu entry.
341 </p><a NAME="ProjectResourcesBrowser.compileChangedResources" ID="ProjectResourcesBrowser.compileChangedResources"></a>
342 <h4>ProjectResourcesBrowser.compileChangedResources</h4>
343 <b>compileChangedResources</b>(<i></i>)
344 <p>
345 Public method to compile all changed resources to source files.
346 </p><a NAME="ProjectResourcesBrowser.handlePreferencesChanged" ID="ProjectResourcesBrowser.handlePreferencesChanged"></a>
347 <h4>ProjectResourcesBrowser.handlePreferencesChanged</h4>
348 <b>handlePreferencesChanged</b>(<i></i>)
349 <p>
350 Public slot used to handle the preferencesChanged signal.
351 </p>
352 <div align="right"><a href="#top">Up</a></div>
353 <hr />
354 </body></html>

eric ide

mercurial