Exemple #1
0
 def onItem_expanded(self, item):
     AbstractTree.onItem_expanded(self, item)
     #---
     if item.childCount() == 0:
         self.refresh(item)
     if item.childCount() == 0:
         item.setChildIndicatorPolicy(QTreeWidgetItem.DontShowIndicatorWhenChildless)
Exemple #2
0
 def __init__(self, parent=None):
     AbstractTree.__init__(self, parent)
     #---
     self.setEditTriggers(QAbstractItemView.NoEditTriggers)
     self.setProperty("showDropIndicator", False)
     self.setDragDropOverwriteMode(True)
     self.setDragDropMode(QAbstractItemView.DragDrop)
     self.setSelectionMode(QAbstractItemView.ExtendedSelection)
     #---
     self.expanded_items = {}
     self.relative_root_path = None
     #self.filter_text = ""
     #self.header().setResizeMode(QHeaderView.ResizeToContents)
     self.drop_item_highligthed = None
     #---
     self.commands = {}
     self.commands["rename"] = RenameCommand.RenameCommand(self)
     self.commands["create folder"] = CreateFolderCommand.CreateFolderCommand(self)
     self.commands["refresh"] = RefreshCommand.RefreshCommand(self)
     self.commands["create file"] = CreateFileCommand.CreateFileCommand(self)
Exemple #3
0
 def create_connection(self):
     AbstractTree.create_connection(self)