Пример #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)