Example #1
0
    def addIconFromCache(self, node):
        item = NodeItem(node)
	pixmap = self.pixmapCache.find(node.path + "/" + node.name)
        icon = QIcon(pixmap)
        item.setIcon(icon)
        item.setText(str(node.name))
        item.setEditable(False)
        items = []
        items.append(item)
        self.appendRow(items)
Example #2
0
 def addIconFromCache(self, node):
     item = NodeItem(node)
     pixmap = self.pixmapCache.find(node.path + "/" + node.name)
     icon = QIcon(pixmap)
     item.setIcon(icon)
     item.setText(str(node.name))
     item.setEditable(False)
     items = []
     items.append(item)
     self.appendRow(items)
Example #3
0
 def addIconFromImage(self, img, node):
     item = NodeItem(node)
     pixmap = QPixmap()
     pixmap = pixmap.fromImage(img)
     self.pixmapCache.insert(node.path + "/" + node.name, pixmap) 
     icon = QIcon(pixmap)
     item.setIcon(icon)
     item.setText(str(node.name))
     item.setEditable(False)
     items = []
     items.append(item)
     self.appendRow(items)
Example #4
0
 def addIconFromImage(self, img, node):
     item = NodeItem(node)
     pixmap = QPixmap()
     pixmap = pixmap.fromImage(img)
     self.pixmapCache.insert(node.path + "/" + node.name, pixmap)
     icon = QIcon(pixmap)
     item.setIcon(icon)
     item.setText(str(node.name))
     item.setEditable(False)
     items = []
     items.append(item)
     self.appendRow(items)
Example #5
0
    def addIcon(self, node):
        item = NodeItem(node)
        if node.next.empty():
          icon = QIcon(":folder_empty_128.png")
        else:
          if node.attr.size != 0: 
   	    icon = QIcon(":folder_documents_128.png") 
          else:
	    icon = QIcon(":folder_128.png")
        item.setIcon(icon)
        item.setText(str(node.name))
        item.setEditable(False)
        items = []
        items.append(item)
        self.appendRow(items)
Example #6
0
 def addIcon(self, node):
     item = NodeItem(node)
     if node.next.empty():
         icon = QIcon(":folder_empty_128.png")
     else:
         if node.attr.size != 0:
             icon = QIcon(":folder_documents_128.png")
         else:
             icon = QIcon(":folder_128.png")
     item.setIcon(icon)
     item.setText(str(node.name))
     item.setEditable(False)
     items = []
     items.append(item)
     self.appendRow(items)