~mcfletch/eric/update-to-4.5.13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html><head>
<title>eric4.Project.ProjectResourcesBrowser</title>
<style>
body {
    background:white;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #4FA4FF; }
h2 { color: white; background: #4FA4FF; }
h3 { color: white; background: #00557F; }
h4 { color: white; background: #00557F; }
    
a { color: #AA5500; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric4.Project.ProjectResourcesBrowser</h1>
<p>
Module implementing a class used to display the resources part of the project.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#ProjectResourcesBrowser">ProjectResourcesBrowser</a></td>
<td>A class used to display the resources part of the project.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="ProjectResourcesBrowser" ID="ProjectResourcesBrowser"></a>
<h2>ProjectResourcesBrowser</h2>
<p>
    A class used to display the resources part of the project. 
</p><h3>Signals</h3>
<dl>
<dt>appendStderr(string)</dt>
<dd>
emitted after something was received from
            a QProcess on stderr
</dd><dt>closeSourceWindow(string)</dt>
<dd>
emitted after a file has been removed/deleted
            from the project
</dd><dt>showMenu(string, QMenu)</dt>
<dd>
emitted when a menu is about to be shown. The name
            of the menu and a reference to the menu are given.
</dd><dt>sourceFile(string)</dt>
<dd>
emitted to open a resources file in an editor
</dd>
</dl>
<h3>Derived from</h3>
ProjectBaseBrowser
<h3>Class Attributes</h3>
<table>
<tr><td>RCFilenameFormatPython</td></tr><tr><td>RCFilenameFormatRuby</td></tr>
</table>
<h3>Class Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>
<table>
<tr>
<td><a href="#ProjectResourcesBrowser.__init__">ProjectResourcesBrowser</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__addResourceFiles">__addResourceFiles</a></td>
<td>Private method to add resource files to the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__addResourcesDirectory">__addResourcesDirectory</a></td>
<td>Private method to add resource files of a directory to the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__checkResourcesNewer">__checkResourcesNewer</a></td>
<td>Private method to check, if any file referenced in a resource file is newer than a given time.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileAllResources">__compileAllResources</a></td>
<td>Private method to compile all resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileQRC">__compileQRC</a></td>
<td>Privat method to compile a .qrc file to a .py file.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileQRCDone">__compileQRCDone</a></td>
<td>Private slot to handle the finished signal of the compile process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileResource">__compileResource</a></td>
<td>Private method to compile a resource to a source file.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__compileSelectedResources">__compileSelectedResources</a></td>
<td>Private method to compile selected resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__deleteFile">__deleteFile</a></td>
<td>Private method to delete a resource file from the project.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__newResource">__newResource</a></td>
<td>Private slot to handle the New Resource menu action.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__openFile">__openFile</a></td>
<td>Private slot to handle the Open menu action.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__readStderr">__readStderr</a></td>
<td>Private slot to handle the readyReadStandardError signal of the pyrcc4/rbrcc process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__readStdout">__readStdout</a></td>
<td>Private slot to handle the readyReadStandardOutput signal of the pyrcc4/rbrcc process.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenu">__showContextMenu</a></td>
<td>Private slot called by the menu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuBack">__showContextMenuBack</a></td>
<td>Private slot called by the backMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuDir">__showContextMenuDir</a></td>
<td>Private slot called by the dirMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuDirMulti">__showContextMenuDirMulti</a></td>
<td>Private slot called by the dirMultiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.__showContextMenuMulti">__showContextMenuMulti</a></td>
<td>Private slot called by the multiMenu aboutToShow signal.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._contextMenuRequested">_contextMenuRequested</a></td>
<td>Protected slot to show the context menu.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._createPopupMenus">_createPopupMenus</a></td>
<td>Protected overloaded method to generate the popup menu.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._initHookMethods">_initHookMethods</a></td>
<td>Protected method to initialize the hooks dictionary.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser._openItem">_openItem</a></td>
<td>Protected slot to handle the open popup menu entry.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.compileChangedResources">compileChangedResources</a></td>
<td>Public method to compile all changed resources to source files.</td>
</tr><tr>
<td><a href="#ProjectResourcesBrowser.handlePreferencesChanged">handlePreferencesChanged</a></td>
<td>Public slot used to handle the preferencesChanged signal.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="ProjectResourcesBrowser.__init__" ID="ProjectResourcesBrowser.__init__"></a>
<h4>ProjectResourcesBrowser (Constructor)</h4>
<b>ProjectResourcesBrowser</b>(<i>project, parent = None</i>)
<p>
        Constructor
</p><dl>
<dt><i>project</i></dt>
<dd>
reference to the project object
</dd><dt><i>parent</i></dt>
<dd>
parent widget of this browser (QWidget)
</dd>
</dl><a NAME="ProjectResourcesBrowser.__addResourceFiles" ID="ProjectResourcesBrowser.__addResourceFiles"></a>
<h4>ProjectResourcesBrowser.__addResourceFiles</h4>
<b>__addResourceFiles</b>(<i></i>)
<p>
        Private method to add resource files to the project.
</p><a NAME="ProjectResourcesBrowser.__addResourcesDirectory" ID="ProjectResourcesBrowser.__addResourcesDirectory"></a>
<h4>ProjectResourcesBrowser.__addResourcesDirectory</h4>
<b>__addResourcesDirectory</b>(<i></i>)
<p>
        Private method to add resource files of a directory to the project.
</p><a NAME="ProjectResourcesBrowser.__checkResourcesNewer" ID="ProjectResourcesBrowser.__checkResourcesNewer"></a>
<h4>ProjectResourcesBrowser.__checkResourcesNewer</h4>
<b>__checkResourcesNewer</b>(<i>filename, mtime</i>)
<p>
        Private method to check, if any file referenced in a resource
        file is newer than a given time.
</p><dl>
<dt><i>filename</i></dt>
<dd>
filename of the resource file (string)
</dd><dt><i>mtime</i></dt>
<dd>
modification time to check against
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
flag indicating some file is newer (boolean)
</dd>
</dl><a NAME="ProjectResourcesBrowser.__compileAllResources" ID="ProjectResourcesBrowser.__compileAllResources"></a>
<h4>ProjectResourcesBrowser.__compileAllResources</h4>
<b>__compileAllResources</b>(<i></i>)
<p>
        Private method to compile all resources to source files.
</p><a NAME="ProjectResourcesBrowser.__compileQRC" ID="ProjectResourcesBrowser.__compileQRC"></a>
<h4>ProjectResourcesBrowser.__compileQRC</h4>
<b>__compileQRC</b>(<i>fn, noDialog = False, progress = None</i>)
<p>
        Privat method to compile a .qrc file to a .py file.
</p><dl>
<dt><i>fn</i></dt>
<dd>
filename of the .ui file to be compiled
</dd><dt><i>noDialog</i></dt>
<dd>
flag indicating silent operations
</dd><dt><i>progress</i></dt>
<dd>
reference to the progress dialog
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
reference to the compile process (QProcess)
</dd>
</dl><a NAME="ProjectResourcesBrowser.__compileQRCDone" ID="ProjectResourcesBrowser.__compileQRCDone"></a>
<h4>ProjectResourcesBrowser.__compileQRCDone</h4>
<b>__compileQRCDone</b>(<i>exitCode, exitStatus</i>)
<p>
        Private slot to handle the finished signal of the compile process.
</p><dl>
<dt><i>exitCode</i></dt>
<dd>
exit code of the process (integer)
</dd><dt><i>exitStatus</i></dt>
<dd>
exit status of the process (QProcess.ExitStatus)
</dd>
</dl><a NAME="ProjectResourcesBrowser.__compileResource" ID="ProjectResourcesBrowser.__compileResource"></a>
<h4>ProjectResourcesBrowser.__compileResource</h4>
<b>__compileResource</b>(<i></i>)
<p>
        Private method to compile a resource to a source file.
</p><a NAME="ProjectResourcesBrowser.__compileSelectedResources" ID="ProjectResourcesBrowser.__compileSelectedResources"></a>
<h4>ProjectResourcesBrowser.__compileSelectedResources</h4>
<b>__compileSelectedResources</b>(<i></i>)
<p>
        Private method to compile selected resources to source files.
</p><a NAME="ProjectResourcesBrowser.__deleteFile" ID="ProjectResourcesBrowser.__deleteFile"></a>
<h4>ProjectResourcesBrowser.__deleteFile</h4>
<b>__deleteFile</b>(<i></i>)
<p>
        Private method to delete a resource file from the project.
</p><a NAME="ProjectResourcesBrowser.__newResource" ID="ProjectResourcesBrowser.__newResource"></a>
<h4>ProjectResourcesBrowser.__newResource</h4>
<b>__newResource</b>(<i></i>)
<p>
        Private slot to handle the New Resource menu action.
</p><a NAME="ProjectResourcesBrowser.__openFile" ID="ProjectResourcesBrowser.__openFile"></a>
<h4>ProjectResourcesBrowser.__openFile</h4>
<b>__openFile</b>(<i></i>)
<p>
        Private slot to handle the Open menu action.
</p><a NAME="ProjectResourcesBrowser.__readStderr" ID="ProjectResourcesBrowser.__readStderr"></a>
<h4>ProjectResourcesBrowser.__readStderr</h4>
<b>__readStderr</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardError signal of the 
        pyrcc4/rbrcc process.
</p><a NAME="ProjectResourcesBrowser.__readStdout" ID="ProjectResourcesBrowser.__readStdout"></a>
<h4>ProjectResourcesBrowser.__readStdout</h4>
<b>__readStdout</b>(<i></i>)
<p>
        Private slot to handle the readyReadStandardOutput signal of the 
        pyrcc4/rbrcc process.
</p><a NAME="ProjectResourcesBrowser.__showContextMenu" ID="ProjectResourcesBrowser.__showContextMenu"></a>
<h4>ProjectResourcesBrowser.__showContextMenu</h4>
<b>__showContextMenu</b>(<i></i>)
<p>
        Private slot called by the menu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuBack" ID="ProjectResourcesBrowser.__showContextMenuBack"></a>
<h4>ProjectResourcesBrowser.__showContextMenuBack</h4>
<b>__showContextMenuBack</b>(<i></i>)
<p>
        Private slot called by the backMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuDir" ID="ProjectResourcesBrowser.__showContextMenuDir"></a>
<h4>ProjectResourcesBrowser.__showContextMenuDir</h4>
<b>__showContextMenuDir</b>(<i></i>)
<p>
        Private slot called by the dirMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuDirMulti" ID="ProjectResourcesBrowser.__showContextMenuDirMulti"></a>
<h4>ProjectResourcesBrowser.__showContextMenuDirMulti</h4>
<b>__showContextMenuDirMulti</b>(<i></i>)
<p>
        Private slot called by the dirMultiMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser.__showContextMenuMulti" ID="ProjectResourcesBrowser.__showContextMenuMulti"></a>
<h4>ProjectResourcesBrowser.__showContextMenuMulti</h4>
<b>__showContextMenuMulti</b>(<i></i>)
<p>
        Private slot called by the multiMenu aboutToShow signal.
</p><a NAME="ProjectResourcesBrowser._contextMenuRequested" ID="ProjectResourcesBrowser._contextMenuRequested"></a>
<h4>ProjectResourcesBrowser._contextMenuRequested</h4>
<b>_contextMenuRequested</b>(<i>coord</i>)
<p>
        Protected slot to show the context menu.
</p><dl>
<dt><i>coord</i></dt>
<dd>
the position of the mouse pointer (QPoint)
</dd>
</dl><a NAME="ProjectResourcesBrowser._createPopupMenus" ID="ProjectResourcesBrowser._createPopupMenus"></a>
<h4>ProjectResourcesBrowser._createPopupMenus</h4>
<b>_createPopupMenus</b>(<i></i>)
<p>
        Protected overloaded method to generate the popup menu.
</p><a NAME="ProjectResourcesBrowser._initHookMethods" ID="ProjectResourcesBrowser._initHookMethods"></a>
<h4>ProjectResourcesBrowser._initHookMethods</h4>
<b>_initHookMethods</b>(<i></i>)
<p>
        Protected method to initialize the hooks dictionary.
</p><p>
        Supported hook methods are:
        <ul>
        <li>compileResource: takes filename as parameter</li>
        <li>compileAllResources: takes list of filenames as parameter</li>
        <li>compileChangedResources: takes list of filenames as parameter</li>
        <li>compileSelectedResources: takes list of all form filenames as parameter</li>
        <li>newResource: takes full directory path of new file as parameter</li>
        </ul>
</p><p>
        <b>Note</b>: Filenames are relative to the project directory, if not
        specified differently.
</p><a NAME="ProjectResourcesBrowser._openItem" ID="ProjectResourcesBrowser._openItem"></a>
<h4>ProjectResourcesBrowser._openItem</h4>
<b>_openItem</b>(<i></i>)
<p>
        Protected slot to handle the open popup menu entry.
</p><a NAME="ProjectResourcesBrowser.compileChangedResources" ID="ProjectResourcesBrowser.compileChangedResources"></a>
<h4>ProjectResourcesBrowser.compileChangedResources</h4>
<b>compileChangedResources</b>(<i></i>)
<p>
        Public method to compile all changed resources to source files.
</p><a NAME="ProjectResourcesBrowser.handlePreferencesChanged" ID="ProjectResourcesBrowser.handlePreferencesChanged"></a>
<h4>ProjectResourcesBrowser.handlePreferencesChanged</h4>
<b>handlePreferencesChanged</b>(<i></i>)
<p>
        Public slot used to handle the preferencesChanged signal.
</p>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>