72 return QPixmap() |
72 return QPixmap() |
73 |
73 |
74 def addSearchPath(self, path): |
74 def addSearchPath(self, path): |
75 """ |
75 """ |
76 Public method to add a path to the search path. |
76 Public method to add a path to the search path. |
77 |
77 |
78 @param path path to add (string) |
78 @param path path to add |
|
79 @type str |
79 """ |
80 """ |
80 if path not in self.searchPath: |
81 if path not in self.searchPath: |
81 self.searchPath.append(path) |
82 self.searchPath.append(path) |
|
83 |
|
84 def removeSearchPath(self, path): |
|
85 """ |
|
86 Public method to remove a path from the search path. |
|
87 |
|
88 @param path path to remove |
|
89 @type str |
|
90 """ |
|
91 if path in self.searchPath: |
|
92 self.searchPath.remove(path) |
82 |
93 |
83 pixCache = PixmapCache() |
94 pixCache = PixmapCache() |
84 |
95 |
85 |
96 |
86 def getPixmap(key, size=None, cache=pixCache): |
97 def getPixmap(key, size=None, cache=pixCache): |
174 |
185 |
175 def addSearchPath(path, cache=pixCache): |
186 def addSearchPath(path, cache=pixCache): |
176 """ |
187 """ |
177 Module function to add a path to the search path. |
188 Module function to add a path to the search path. |
178 |
189 |
179 @param path path to add (string) |
190 @param path path to add |
180 @param cache reference to the pixmap cache object (PixmapCache) |
191 @type str |
|
192 @param cache reference to the pixmap cache object |
|
193 @type PixmapCache |
181 """ |
194 """ |
182 cache.addSearchPath(path) |
195 cache.addSearchPath(path) |
|
196 |
|
197 |
|
198 def removeSearchPath(path, cache=pixCache): |
|
199 """ |
|
200 Public method to remove a path from the search path. |
|
201 |
|
202 @param path path to remove |
|
203 @type str |
|
204 @param cache reference to the pixmap cache object |
|
205 @type PixmapCache |
|
206 """ |
|
207 cache.removeSearchPath(path) |