示例#1
0
 def __init__(self):
     QFileIconProvider.__init__(self)
     self.icons = {}
     for key in self.__class__.ICONS.keys():
         self.icons[key] = I('mimetypes/')+self.__class__.ICONS[key]+'.png'
     self.icons['calibre'] = I('lt.png')
     for i in ('dir', 'default', 'zero'):
         self.icons[i] = QIcon(self.icons[i])
示例#2
0
 def __init__(self):
     QFileIconProvider.__init__(self)
     self.icons = {}
     for key in self.__class__.ICONS.keys():
         self.icons[key] = I('mimetypes/')+self.__class__.ICONS[key]+'.png'
     self.icons['calibre'] = I('lt.png')
     for i in ('dir', 'default', 'zero'):
         self.icons[i] = QIcon(self.icons[i])
示例#3
0
 def __init__(self):
     QFileIconProvider.__init__(self)
     self.icons = {}
     for key in self.__class__.ICONS.keys():
         self.icons[key] = I("mimetypes/") + self.__class__.ICONS[key] + ".png"
     self.icons["calibre"] = I("lt.png")
     for i in ("dir", "default", "zero"):
         self.icons[i] = QIcon(self.icons[i])
示例#4
0
 def icon(self, arg):
     if isinstance(arg, QFileInfo):
         return self.load_icon(arg)
     if arg == QFileIconProvider.Folder:
         return self.icons['dir']
     if arg == QFileIconProvider.File:
         return self.icons['default']
     return QFileIconProvider.icon(self, arg)
示例#5
0
 def icon(self, arg):
     if isinstance(arg, QFileInfo):
         return self.load_icon(arg)
     if arg == QFileIconProvider.Folder:
         return self.icons['dir']
     if arg == QFileIconProvider.File:
         return self.icons['default']
     return QFileIconProvider.icon(self, arg)