diff -r 85fc2a5cddb4 -r 59137afca666 UI/PixmapCache.py --- a/UI/PixmapCache.py Sat Feb 06 11:14:30 2010 +0000 +++ b/UI/PixmapCache.py Sat Feb 06 17:40:24 2010 +0000 @@ -9,7 +9,7 @@ import os -from PyQt4.QtGui import QPixmap, QIcon +from PyQt4.QtGui import QPixmap, QIcon, QPainter class PixmapCache(object): """ @@ -75,6 +75,20 @@ """ return QIcon(cache.getPixmap(key)) +def getSymlinkIcon(key, cache = pixCache): + """ + Module function to retrieve a symbolic link icon. + + @param key name of the wanted icon (string) + @return the requested icon (QIcon) + """ + pix1 = QPixmap(cache.getPixmap(key)) + pix2 = cache.getPixmap("symlink.png") + painter = QPainter(pix1) + painter.drawPixmap(0, 10, pix2) + painter.end() + return QIcon(pix1) + def addSearchPath(path, cache = pixCache): """ Module function to add a path to the search path.