36 """ |
36 """ |
37 Public method to retrieve a pixmap. |
37 Public method to retrieve a pixmap. |
38 |
38 |
39 @param key name of the wanted pixmap |
39 @param key name of the wanted pixmap |
40 @type str |
40 @type str |
41 @param size requested size |
41 @param size requested size (defaults to None) |
42 @type QSize |
42 @type QSize (optional) |
43 @return the requested pixmap |
43 @return the requested pixmap |
44 @rtype QPixmap |
44 @rtype QPixmap |
45 """ |
45 """ |
46 if key: |
46 if key: |
47 basename, ext = os.path.splitext(key) |
47 basename, ext = os.path.splitext(key) |
119 """ |
119 """ |
120 Module function to retrieve a pixmap. |
120 Module function to retrieve a pixmap. |
121 |
121 |
122 @param key name of the wanted pixmap |
122 @param key name of the wanted pixmap |
123 @type str |
123 @type str |
124 @param size requested size |
124 @param size requested size (defaults to None) |
125 @type QSize |
125 @type QSize (optional) |
126 @param cache reference to the pixmap cache object |
126 @param cache reference to the pixmap cache object (defaults to pixCache) |
127 @type EricPixmapCache |
127 @type EricPixmapCache (optional) |
128 @return the requested pixmap |
128 @return the requested pixmap |
129 @rtype QPixmap |
129 @rtype QPixmap |
130 """ |
130 """ |
131 return cache.getPixmap(key, size=size) |
131 return cache.getPixmap(key, size=size) |
132 |
132 |
135 """ |
135 """ |
136 Module function to retrieve an icon. |
136 Module function to retrieve an icon. |
137 |
137 |
138 @param key name of the wanted pixmap |
138 @param key name of the wanted pixmap |
139 @type str |
139 @type str |
140 @param size requested size |
140 @param size requested size (defaults to None) |
141 @type QSize |
141 @type QSize (optional) |
142 @param cache reference to the pixmap cache object |
142 @param cache reference to the pixmap cache object (defaults to pixCache) |
143 @type EricPixmapCache |
143 @type EricPixmapCache (optional) |
144 @return the requested icon |
144 @return the requested icon |
145 @rtype QIcon |
145 @rtype QIcon |
146 """ |
146 """ |
147 return QIcon(cache.getPixmap(key, size=size)) |
147 return QIcon(cache.getPixmap(key, size=size)) |
148 |
148 |
151 """ |
151 """ |
152 Module function to retrieve a symbolic link icon. |
152 Module function to retrieve a symbolic link icon. |
153 |
153 |
154 @param key name of the wanted pixmap |
154 @param key name of the wanted pixmap |
155 @type str |
155 @type str |
156 @param size requested size |
156 @param size requested size (defaults to None) |
157 @type QSize |
157 @type QSize (optional) |
158 @param cache reference to the pixmap cache object |
158 @param cache reference to the pixmap cache object (defaults to pixCache) |
159 @type EricPixmapCache |
159 @type EricPixmapCache (optional) |
160 @return the requested icon |
160 @return the requested icon |
161 @rtype QIcon |
161 @rtype QIcon |
162 """ |
162 """ |
163 pix1 = QPixmap(cache.getPixmap(key, size=size)) |
163 pix1 = QPixmap(cache.getPixmap(key, size=size)) |
164 pix2 = cache.getPixmap("symlink") |
164 pix2 = cache.getPixmap("symlink") |
172 """ |
172 """ |
173 Module function to retrieve a symbolic link icon. |
173 Module function to retrieve a symbolic link icon. |
174 |
174 |
175 @param keys list of names of icons |
175 @param keys list of names of icons |
176 @type list of str |
176 @type list of str |
177 @param size requested size of individual icons |
177 @param size requested size of individual icons (defaults to None) |
178 @type QSize |
178 @type QSize (optional) |
179 @param cache reference to the pixmap cache object |
179 @param cache reference to the pixmap cache object (defaults to pixCache) |
180 @type EricPixmapCache |
180 @type EricPixmapCache (optional) |
181 @return the requested icon |
181 @return the requested icon |
182 @rtype QIcon |
182 @rtype QIcon |
183 """ |
183 """ |
184 height = width = 0 |
184 height = width = 0 |
185 pixmaps = [] |
185 pixmaps = [] |
208 """ |
208 """ |
209 Module function to add a path to the search path. |
209 Module function to add a path to the search path. |
210 |
210 |
211 @param path path to add |
211 @param path path to add |
212 @type str |
212 @type str |
213 @param cache reference to the pixmap cache object |
213 @param cache reference to the pixmap cache object (defaults to pixCache) |
214 @type EricPixmapCache |
214 @type EricPixmapCache (optional) |
215 """ |
215 """ |
216 cache.addSearchPath(path) |
216 cache.addSearchPath(path) |
217 |
217 |
218 |
218 |
219 def removeSearchPath(path, cache=pixCache): |
219 def removeSearchPath(path, cache=pixCache): |
220 """ |
220 """ |
221 Public method to remove a path from the search path. |
221 Public method to remove a path from the search path. |
222 |
222 |
223 @param path path to remove |
223 @param path path to remove |
224 @type str |
224 @type str |
225 @param cache reference to the pixmap cache object |
225 @param cache reference to the pixmap cache object (defaults to pixCache) |
226 @type EricPixmapCache |
226 @type EricPixmapCache (optional) |
227 """ |
227 """ |
228 cache.removeSearchPath(path) |
228 cache.removeSearchPath(path) |
229 |
229 |
230 |
230 |
231 def setPreferVectorIcons(vectorFirst=True, cache=pixCache): |
231 def setPreferVectorIcons(vectorFirst=True, cache=pixCache): |
233 Function to set the preference of vector based icons. |
233 Function to set the preference of vector based icons. |
234 |
234 |
235 @param vectorFirst flag indicating the preference of vector icons |
235 @param vectorFirst flag indicating the preference of vector icons |
236 (defaults to True) |
236 (defaults to True) |
237 @type bool (optional) |
237 @type bool (optional) |
|
238 @param cache reference to the pixmap cache object (defaults to pixCache) |
|
239 @type EricPixmapCache (optional) |
238 """ |
240 """ |
239 cache.setPreferVectorIcons(vectorFirst) |
241 cache.setPreferVectorIcons(vectorFirst) |