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