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