|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.UI.PixmapCache</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.UI.PixmapCache</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a pixmap cache for icons. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>pixCache</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#PixmapCache">PixmapCache</a></td> |
|
39 <td>Class implementing a pixmap cache for icons.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 |
|
46 <tr> |
|
47 <td><a href="#addSearchPath">addSearchPath</a></td> |
|
48 <td>Module function to add a path to the search path.</td> |
|
49 </tr> |
|
50 <tr> |
|
51 <td><a href="#getCombinedIcon">getCombinedIcon</a></td> |
|
52 <td>Module function to retrieve a symbolic link icon.</td> |
|
53 </tr> |
|
54 <tr> |
|
55 <td><a href="#getIcon">getIcon</a></td> |
|
56 <td>Module function to retrieve an icon.</td> |
|
57 </tr> |
|
58 <tr> |
|
59 <td><a href="#getPixmap">getPixmap</a></td> |
|
60 <td>Module function to retrieve a pixmap.</td> |
|
61 </tr> |
|
62 <tr> |
|
63 <td><a href="#getSymlinkIcon">getSymlinkIcon</a></td> |
|
64 <td>Module function to retrieve a symbolic link icon.</td> |
|
65 </tr> |
|
66 <tr> |
|
67 <td><a href="#removeSearchPath">removeSearchPath</a></td> |
|
68 <td>Public method to remove a path from the search path.</td> |
|
69 </tr> |
|
70 </table> |
|
71 <hr /> |
|
72 <hr /> |
|
73 <a NAME="PixmapCache" ID="PixmapCache"></a> |
|
74 <h2>PixmapCache</h2> |
|
75 |
|
76 <p> |
|
77 Class implementing a pixmap cache for icons. |
|
78 </p> |
|
79 <h3>Derived from</h3> |
|
80 None |
|
81 <h3>Class Attributes</h3> |
|
82 |
|
83 <table> |
|
84 <tr><td>SupportedExtensions</td></tr> |
|
85 </table> |
|
86 <h3>Class Methods</h3> |
|
87 |
|
88 <table> |
|
89 <tr><td>None</td></tr> |
|
90 </table> |
|
91 <h3>Methods</h3> |
|
92 |
|
93 <table> |
|
94 |
|
95 <tr> |
|
96 <td><a href="#PixmapCache.__init__">PixmapCache</a></td> |
|
97 <td>Constructor</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#PixmapCache.addSearchPath">addSearchPath</a></td> |
|
101 <td>Public method to add a path to the search path.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#PixmapCache.getPixmap">getPixmap</a></td> |
|
105 <td>Public method to retrieve a pixmap.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#PixmapCache.removeSearchPath">removeSearchPath</a></td> |
|
109 <td>Public method to remove a path from the search path.</td> |
|
110 </tr> |
|
111 </table> |
|
112 <h3>Static Methods</h3> |
|
113 |
|
114 <table> |
|
115 <tr><td>None</td></tr> |
|
116 </table> |
|
117 |
|
118 <a NAME="PixmapCache.__init__" ID="PixmapCache.__init__"></a> |
|
119 <h4>PixmapCache (Constructor)</h4> |
|
120 <b>PixmapCache</b>(<i></i>) |
|
121 |
|
122 <p> |
|
123 Constructor |
|
124 </p> |
|
125 <a NAME="PixmapCache.addSearchPath" ID="PixmapCache.addSearchPath"></a> |
|
126 <h4>PixmapCache.addSearchPath</h4> |
|
127 <b>addSearchPath</b>(<i>path</i>) |
|
128 |
|
129 <p> |
|
130 Public method to add a path to the search path. |
|
131 </p> |
|
132 <dl> |
|
133 |
|
134 <dt><i>path</i> (str)</dt> |
|
135 <dd> |
|
136 path to add |
|
137 </dd> |
|
138 </dl> |
|
139 <a NAME="PixmapCache.getPixmap" ID="PixmapCache.getPixmap"></a> |
|
140 <h4>PixmapCache.getPixmap</h4> |
|
141 <b>getPixmap</b>(<i>key, size=None</i>) |
|
142 |
|
143 <p> |
|
144 Public method to retrieve a pixmap. |
|
145 </p> |
|
146 <dl> |
|
147 |
|
148 <dt><i>key</i> (str)</dt> |
|
149 <dd> |
|
150 name of the wanted pixmap |
|
151 </dd> |
|
152 <dt><i>size</i> (QSize)</dt> |
|
153 <dd> |
|
154 requested size |
|
155 </dd> |
|
156 </dl> |
|
157 <dl> |
|
158 <dt>Return:</dt> |
|
159 <dd> |
|
160 the requested pixmap |
|
161 </dd> |
|
162 </dl> |
|
163 <dl> |
|
164 <dt>Return Type:</dt> |
|
165 <dd> |
|
166 QPixmap |
|
167 </dd> |
|
168 </dl> |
|
169 <a NAME="PixmapCache.removeSearchPath" ID="PixmapCache.removeSearchPath"></a> |
|
170 <h4>PixmapCache.removeSearchPath</h4> |
|
171 <b>removeSearchPath</b>(<i>path</i>) |
|
172 |
|
173 <p> |
|
174 Public method to remove a path from the search path. |
|
175 </p> |
|
176 <dl> |
|
177 |
|
178 <dt><i>path</i> (str)</dt> |
|
179 <dd> |
|
180 path to remove |
|
181 </dd> |
|
182 </dl> |
|
183 <div align="right"><a href="#top">Up</a></div> |
|
184 <hr /> |
|
185 <hr /> |
|
186 <a NAME="addSearchPath" ID="addSearchPath"></a> |
|
187 <h2>addSearchPath</h2> |
|
188 <b>addSearchPath</b>(<i>path, cache=pixCache</i>) |
|
189 |
|
190 <p> |
|
191 Module function to add a path to the search path. |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>path</i> (str)</dt> |
|
196 <dd> |
|
197 path to add |
|
198 </dd> |
|
199 <dt><i>cache</i> (PixmapCache)</dt> |
|
200 <dd> |
|
201 reference to the pixmap cache object |
|
202 </dd> |
|
203 </dl> |
|
204 <div align="right"><a href="#top">Up</a></div> |
|
205 <hr /> |
|
206 <hr /> |
|
207 <a NAME="getCombinedIcon" ID="getCombinedIcon"></a> |
|
208 <h2>getCombinedIcon</h2> |
|
209 <b>getCombinedIcon</b>(<i>keys, size=None, cache=pixCache</i>) |
|
210 |
|
211 <p> |
|
212 Module function to retrieve a symbolic link icon. |
|
213 </p> |
|
214 <dl> |
|
215 |
|
216 <dt><i>keys</i> (list of str)</dt> |
|
217 <dd> |
|
218 list of names of icons |
|
219 </dd> |
|
220 <dt><i>size</i> (QSize)</dt> |
|
221 <dd> |
|
222 requested size of individual icons |
|
223 </dd> |
|
224 <dt><i>cache</i> (PixmapCache)</dt> |
|
225 <dd> |
|
226 reference to the pixmap cache object |
|
227 </dd> |
|
228 </dl> |
|
229 <dl> |
|
230 <dt>Return:</dt> |
|
231 <dd> |
|
232 the requested icon |
|
233 </dd> |
|
234 </dl> |
|
235 <dl> |
|
236 <dt>Return Type:</dt> |
|
237 <dd> |
|
238 QIcon |
|
239 </dd> |
|
240 </dl> |
|
241 <div align="right"><a href="#top">Up</a></div> |
|
242 <hr /> |
|
243 <hr /> |
|
244 <a NAME="getIcon" ID="getIcon"></a> |
|
245 <h2>getIcon</h2> |
|
246 <b>getIcon</b>(<i>key, size=None, cache=pixCache</i>) |
|
247 |
|
248 <p> |
|
249 Module function to retrieve an icon. |
|
250 </p> |
|
251 <dl> |
|
252 |
|
253 <dt><i>key</i> (str)</dt> |
|
254 <dd> |
|
255 name of the wanted pixmap |
|
256 </dd> |
|
257 <dt><i>size</i> (QSize)</dt> |
|
258 <dd> |
|
259 requested size |
|
260 </dd> |
|
261 <dt><i>cache</i> (PixmapCache)</dt> |
|
262 <dd> |
|
263 reference to the pixmap cache object |
|
264 </dd> |
|
265 </dl> |
|
266 <dl> |
|
267 <dt>Return:</dt> |
|
268 <dd> |
|
269 the requested icon |
|
270 </dd> |
|
271 </dl> |
|
272 <dl> |
|
273 <dt>Return Type:</dt> |
|
274 <dd> |
|
275 QIcon |
|
276 </dd> |
|
277 </dl> |
|
278 <div align="right"><a href="#top">Up</a></div> |
|
279 <hr /> |
|
280 <hr /> |
|
281 <a NAME="getPixmap" ID="getPixmap"></a> |
|
282 <h2>getPixmap</h2> |
|
283 <b>getPixmap</b>(<i>key, size=None, cache=pixCache</i>) |
|
284 |
|
285 <p> |
|
286 Module function to retrieve a pixmap. |
|
287 </p> |
|
288 <dl> |
|
289 |
|
290 <dt><i>key</i> (str)</dt> |
|
291 <dd> |
|
292 name of the wanted pixmap |
|
293 </dd> |
|
294 <dt><i>size</i> (QSize)</dt> |
|
295 <dd> |
|
296 requested size |
|
297 </dd> |
|
298 <dt><i>cache</i> (PixmapCache)</dt> |
|
299 <dd> |
|
300 reference to the pixmap cache object |
|
301 </dd> |
|
302 </dl> |
|
303 <dl> |
|
304 <dt>Return:</dt> |
|
305 <dd> |
|
306 the requested pixmap |
|
307 </dd> |
|
308 </dl> |
|
309 <dl> |
|
310 <dt>Return Type:</dt> |
|
311 <dd> |
|
312 QPixmap |
|
313 </dd> |
|
314 </dl> |
|
315 <div align="right"><a href="#top">Up</a></div> |
|
316 <hr /> |
|
317 <hr /> |
|
318 <a NAME="getSymlinkIcon" ID="getSymlinkIcon"></a> |
|
319 <h2>getSymlinkIcon</h2> |
|
320 <b>getSymlinkIcon</b>(<i>key, size=None, cache=pixCache</i>) |
|
321 |
|
322 <p> |
|
323 Module function to retrieve a symbolic link icon. |
|
324 </p> |
|
325 <dl> |
|
326 |
|
327 <dt><i>key</i> (str)</dt> |
|
328 <dd> |
|
329 name of the wanted pixmap |
|
330 </dd> |
|
331 <dt><i>size</i> (QSize)</dt> |
|
332 <dd> |
|
333 requested size |
|
334 </dd> |
|
335 <dt><i>cache</i> (PixmapCache)</dt> |
|
336 <dd> |
|
337 reference to the pixmap cache object |
|
338 </dd> |
|
339 </dl> |
|
340 <dl> |
|
341 <dt>Return:</dt> |
|
342 <dd> |
|
343 the requested icon |
|
344 </dd> |
|
345 </dl> |
|
346 <dl> |
|
347 <dt>Return Type:</dt> |
|
348 <dd> |
|
349 QIcon |
|
350 </dd> |
|
351 </dl> |
|
352 <div align="right"><a href="#top">Up</a></div> |
|
353 <hr /> |
|
354 <hr /> |
|
355 <a NAME="removeSearchPath" ID="removeSearchPath"></a> |
|
356 <h2>removeSearchPath</h2> |
|
357 <b>removeSearchPath</b>(<i>path, cache=pixCache</i>) |
|
358 |
|
359 <p> |
|
360 Public method to remove a path from the search path. |
|
361 </p> |
|
362 <dl> |
|
363 |
|
364 <dt><i>path</i> (str)</dt> |
|
365 <dd> |
|
366 path to remove |
|
367 </dd> |
|
368 <dt><i>cache</i> (PixmapCache)</dt> |
|
369 <dd> |
|
370 reference to the pixmap cache object |
|
371 </dd> |
|
372 </dl> |
|
373 <div align="right"><a href="#top">Up</a></div> |
|
374 <hr /> |
|
375 </body></html> |