src/eric7/Documentation/Source/eric7.EricWidgets.EricApplication.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8886
d6c8e8105e57
child 10303
ee1aadab1215
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.EricWidgets.EricApplication</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.EricWidgets.EricApplication</h1>
10
11 <p>
12 Class implementing a specialized application class.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>ericApp</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#EricApplication">EricApplication</a></td>
25 <td>Eric application class with an object registry.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="EricApplication" ID="EricApplication"></a>
36 <h2>EricApplication</h2>
37
38 <p>
39 Eric application class with an object registry.
40 </p>
41 <h3>Derived from</h3>
42 QApplication
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>PaletteRoleMapping</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#EricApplication.__init__">EricApplication</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#EricApplication.__setPaletteFromStyleSheet">__setPaletteFromStyleSheet</a></td>
63 <td>Private method to set the palette from a style sheet.</td>
64 </tr>
65 <tr>
66 <td><a href="#EricApplication.getObject">getObject</a></td>
67 <td>Public method to get a reference to a registered object.</td>
68 </tr>
69 <tr>
70 <td><a href="#EricApplication.getPluginObject">getPluginObject</a></td>
71 <td>Public method to get a reference to a registered plugin object.</td>
72 </tr>
73 <tr>
74 <td><a href="#EricApplication.getPluginObjectType">getPluginObjectType</a></td>
75 <td>Public method to get the type of a registered plugin object.</td>
76 </tr>
77 <tr>
78 <td><a href="#EricApplication.getPluginObjects">getPluginObjects</a></td>
79 <td>Public method to get a list of (name, reference) pairs of all registered plugin objects.</td>
80 </tr>
81 <tr>
82 <td><a href="#EricApplication.getStyleIconsPath">getStyleIconsPath</a></td>
83 <td>Public method to get the path for the style icons.</td>
84 </tr>
85 <tr>
86 <td><a href="#EricApplication.registerObject">registerObject</a></td>
87 <td>Public method to register an object in the object registry.</td>
88 </tr>
89 <tr>
90 <td><a href="#EricApplication.registerPluginObject">registerPluginObject</a></td>
91 <td>Public method to register a plugin object in the object registry.</td>
92 </tr>
93 <tr>
94 <td><a href="#EricApplication.setStyleSheetFile">setStyleSheetFile</a></td>
95 <td>Public method to read a QSS style sheet file and set the application style sheet based on its contents.</td>
96 </tr>
97 <tr>
98 <td><a href="#EricApplication.unregisterPluginObject">unregisterPluginObject</a></td>
99 <td>Public method to unregister a plugin object in the object registry.</td>
100 </tr>
101 <tr>
102 <td><a href="#EricApplication.usesDarkPalette">usesDarkPalette</a></td>
103 <td>Public method to check, if the application uses a palette with a dark background.</td>
104 </tr>
105 <tr>
106 <td><a href="#EricApplication.usesSmallScreen">usesSmallScreen</a></td>
107 <td>Public method to determine, if the application is used on a small screen.</td>
108 </tr>
109 </table>
110 <h3>Static Methods</h3>
111
112 <table>
113 <tr><td>None</td></tr>
114 </table>
115
116 <a NAME="EricApplication.__init__" ID="EricApplication.__init__"></a>
117 <h4>EricApplication (Constructor)</h4>
118 <b>EricApplication</b>(<i>argv</i>)
119
120 <p>
121 Constructor
122 </p>
123 <dl>
124
125 <dt><i>argv</i> (list)</dt>
126 <dd>
127 command line arguments
128 </dd>
129 </dl>
130 <a NAME="EricApplication.__setPaletteFromStyleSheet" ID="EricApplication.__setPaletteFromStyleSheet"></a>
131 <h4>EricApplication.__setPaletteFromStyleSheet</h4>
132 <b>__setPaletteFromStyleSheet</b>(<i>styleSheet</i>)
133
134 <p>
135 Private method to set the palette from a style sheet.
136 </p>
137 <dl>
138
139 <dt><i>styleSheet</i> (str)</dt>
140 <dd>
141 style sheet
142 </dd>
143 </dl>
144 <a NAME="EricApplication.getObject" ID="EricApplication.getObject"></a>
145 <h4>EricApplication.getObject</h4>
146 <b>getObject</b>(<i>name</i>)
147
148 <p>
149 Public method to get a reference to a registered object.
150 </p>
151 <dl>
152
153 <dt><i>name</i> (str)</dt>
154 <dd>
155 name of the object
156 </dd>
157 </dl>
158 <dl>
159 <dt>Return:</dt>
160 <dd>
161 reference to the registered object
162 </dd>
163 </dl>
164 <dl>
165 <dt>Return Type:</dt>
166 <dd>
167 any
168 </dd>
169 </dl>
170 <dl>
171
172 <dt>Raises <b>KeyError</b>:</dt>
173 <dd>
174 raised when the given name is not known
175 </dd>
176 </dl>
177 <a NAME="EricApplication.getPluginObject" ID="EricApplication.getPluginObject"></a>
178 <h4>EricApplication.getPluginObject</h4>
179 <b>getPluginObject</b>(<i>name</i>)
180
181 <p>
182 Public method to get a reference to a registered plugin object.
183 </p>
184 <dl>
185
186 <dt><i>name</i> (str)</dt>
187 <dd>
188 name of the plugin object
189 </dd>
190 </dl>
191 <dl>
192 <dt>Return:</dt>
193 <dd>
194 reference to the registered plugin object
195 </dd>
196 </dl>
197 <dl>
198 <dt>Return Type:</dt>
199 <dd>
200 any
201 </dd>
202 </dl>
203 <dl>
204
205 <dt>Raises <b>KeyError</b>:</dt>
206 <dd>
207 raised when the given name is not known
208 </dd>
209 </dl>
210 <a NAME="EricApplication.getPluginObjectType" ID="EricApplication.getPluginObjectType"></a>
211 <h4>EricApplication.getPluginObjectType</h4>
212 <b>getPluginObjectType</b>(<i>name</i>)
213
214 <p>
215 Public method to get the type of a registered plugin object.
216 </p>
217 <dl>
218
219 <dt><i>name</i> (str)</dt>
220 <dd>
221 name of the plugin object
222 </dd>
223 </dl>
224 <dl>
225 <dt>Return:</dt>
226 <dd>
227 type of the plugin object
228 </dd>
229 </dl>
230 <dl>
231 <dt>Return Type:</dt>
232 <dd>
233 str
234 </dd>
235 </dl>
236 <dl>
237
238 <dt>Raises <b>KeyError</b>:</dt>
239 <dd>
240 raised when the given name is not known
241 </dd>
242 </dl>
243 <a NAME="EricApplication.getPluginObjects" ID="EricApplication.getPluginObjects"></a>
244 <h4>EricApplication.getPluginObjects</h4>
245 <b>getPluginObjects</b>(<i></i>)
246
247 <p>
248 Public method to get a list of (name, reference) pairs of all
249 registered plugin objects.
250 </p>
251 <dl>
252 <dt>Return:</dt>
253 <dd>
254 list of (name, reference) pairs
255 </dd>
256 </dl>
257 <dl>
258 <dt>Return Type:</dt>
259 <dd>
260 list of (str, any)
261 </dd>
262 </dl>
263 <a NAME="EricApplication.getStyleIconsPath" ID="EricApplication.getStyleIconsPath"></a>
264 <h4>EricApplication.getStyleIconsPath</h4>
265 <b>getStyleIconsPath</b>(<i>universal=False</i>)
266
267 <p>
268 Public method to get the path for the style icons.
269 </p>
270 <dl>
271
272 <dt><i>universal</i> (bool (optional))</dt>
273 <dd>
274 flag indicating a universal file path (defaults to
275 False)
276 </dd>
277 </dl>
278 <dl>
279 <dt>Return:</dt>
280 <dd>
281 directory path containing the style icons
282 </dd>
283 </dl>
284 <dl>
285 <dt>Return Type:</dt>
286 <dd>
287 str
288 </dd>
289 </dl>
290 <a NAME="EricApplication.registerObject" ID="EricApplication.registerObject"></a>
291 <h4>EricApplication.registerObject</h4>
292 <b>registerObject</b>(<i>name, objectRef</i>)
293
294 <p>
295 Public method to register an object in the object registry.
296 </p>
297 <dl>
298
299 <dt><i>name</i> (str)</dt>
300 <dd>
301 name of the object
302 </dd>
303 <dt><i>objectRef</i> (any)</dt>
304 <dd>
305 reference to the object
306 </dd>
307 </dl>
308 <dl>
309
310 <dt>Raises <b>KeyError</b>:</dt>
311 <dd>
312 raised when the given name is already in use
313 </dd>
314 </dl>
315 <a NAME="EricApplication.registerPluginObject" ID="EricApplication.registerPluginObject"></a>
316 <h4>EricApplication.registerPluginObject</h4>
317 <b>registerPluginObject</b>(<i>name, objectRef, pluginType=None</i>)
318
319 <p>
320 Public method to register a plugin object in the object registry.
321 </p>
322 <dl>
323
324 <dt><i>name</i> (str)</dt>
325 <dd>
326 name of the plugin object
327 </dd>
328 <dt><i>objectRef</i> (any)</dt>
329 <dd>
330 reference to the plugin object
331 </dd>
332 <dt><i>pluginType</i> (str)</dt>
333 <dd>
334 type of the plugin object
335 </dd>
336 </dl>
337 <dl>
338
339 <dt>Raises <b>KeyError</b>:</dt>
340 <dd>
341 raised when the given name is already in use
342 </dd>
343 </dl>
344 <a NAME="EricApplication.setStyleSheetFile" ID="EricApplication.setStyleSheetFile"></a>
345 <h4>EricApplication.setStyleSheetFile</h4>
346 <b>setStyleSheetFile</b>(<i>filename</i>)
347
348 <p>
349 Public method to read a QSS style sheet file and set the application
350 style sheet based on its contents.
351 </p>
352 <dl>
353
354 <dt><i>filename</i> (str)</dt>
355 <dd>
356 name of the QSS style sheet file
357 </dd>
358 </dl>
359 <a NAME="EricApplication.unregisterPluginObject" ID="EricApplication.unregisterPluginObject"></a>
360 <h4>EricApplication.unregisterPluginObject</h4>
361 <b>unregisterPluginObject</b>(<i>name</i>)
362
363 <p>
364 Public method to unregister a plugin object in the object registry.
365 </p>
366 <dl>
367
368 <dt><i>name</i> (str)</dt>
369 <dd>
370 name of the plugin object
371 </dd>
372 </dl>
373 <a NAME="EricApplication.usesDarkPalette" ID="EricApplication.usesDarkPalette"></a>
374 <h4>EricApplication.usesDarkPalette</h4>
375 <b>usesDarkPalette</b>(<i></i>)
376
377 <p>
378 Public method to check, if the application uses a palette with a dark
379 background.
380 </p>
381 <dl>
382 <dt>Return:</dt>
383 <dd>
384 flag indicating the use of a palette with a dark background
385 </dd>
386 </dl>
387 <dl>
388 <dt>Return Type:</dt>
389 <dd>
390 bool
391 </dd>
392 </dl>
393 <a NAME="EricApplication.usesSmallScreen" ID="EricApplication.usesSmallScreen"></a>
394 <h4>EricApplication.usesSmallScreen</h4>
395 <b>usesSmallScreen</b>(<i></i>)
396
397 <p>
398 Public method to determine, if the application is used on a small
399 screen.
400 </p>
401 <dl>
402 <dt>Return:</dt>
403 <dd>
404 flag indicating the use of a small screen
405 </dd>
406 </dl>
407 <dl>
408 <dt>Return Type:</dt>
409 <dd>
410 bool
411 </dd>
412 </dl>
413 <div align="right"><a href="#top">Up</a></div>
414 <hr />
415 </body></html>

eric ide

mercurial