62 def getPixmap(key, cache=pixCache): |
62 def getPixmap(key, cache=pixCache): |
63 """ |
63 """ |
64 Module function to retrieve a pixmap. |
64 Module function to retrieve a pixmap. |
65 |
65 |
66 @param key name of the wanted pixmap (string) |
66 @param key name of the wanted pixmap (string) |
|
67 @param cache reference to the pixmap cache object (PixmapCache) |
67 @return the requested pixmap (QPixmap) |
68 @return the requested pixmap (QPixmap) |
68 """ |
69 """ |
69 return cache.getPixmap(key) |
70 return cache.getPixmap(key) |
70 |
71 |
71 |
72 |
72 def getIcon(key, cache=pixCache): |
73 def getIcon(key, cache=pixCache): |
73 """ |
74 """ |
74 Module function to retrieve an icon. |
75 Module function to retrieve an icon. |
75 |
76 |
76 @param key name of the wanted icon (string) |
77 @param key name of the wanted icon (string) |
|
78 @param cache reference to the pixmap cache object (PixmapCache) |
77 @return the requested icon (QIcon) |
79 @return the requested icon (QIcon) |
78 """ |
80 """ |
79 return QIcon(cache.getPixmap(key)) |
81 return QIcon(cache.getPixmap(key)) |
80 |
82 |
81 |
83 |
82 def getSymlinkIcon(key, cache=pixCache): |
84 def getSymlinkIcon(key, cache=pixCache): |
83 """ |
85 """ |
84 Module function to retrieve a symbolic link icon. |
86 Module function to retrieve a symbolic link icon. |
85 |
87 |
86 @param key name of the wanted icon (string) |
88 @param key name of the wanted icon (string) |
|
89 @param cache reference to the pixmap cache object (PixmapCache) |
87 @return the requested icon (QIcon) |
90 @return the requested icon (QIcon) |
88 """ |
91 """ |
89 pix1 = QPixmap(cache.getPixmap(key)) |
92 pix1 = QPixmap(cache.getPixmap(key)) |
90 pix2 = cache.getPixmap("symlink.png") |
93 pix2 = cache.getPixmap("symlink.png") |
91 painter = QPainter(pix1) |
94 painter = QPainter(pix1) |
97 def addSearchPath(path, cache=pixCache): |
100 def addSearchPath(path, cache=pixCache): |
98 """ |
101 """ |
99 Module function to add a path to the search path. |
102 Module function to add a path to the search path. |
100 |
103 |
101 @param path path to add (string) |
104 @param path path to add (string) |
|
105 @param cache reference to the pixmap cache object (PixmapCache) |
102 """ |
106 """ |
103 cache.addSearchPath(path) |
107 cache.addSearchPath(path) |