Exemplo n.º 1
0
 def __init__(self, tree, path):
     AbstractTreeItem.__init__(self)
     #---
     #self.background_changing = False
     self.path = relpath(path, tree.absolute_path())
     self.setText(0, self.filename_prefix())
     #print os.path.abspath(self.path)
     #self.setIcon(0, IconMgr.icon_by_path(path))
     self.setFlags(Qt.ItemIsEditable|Qt.ItemIsEnabled|Qt.ItemIsSelectable|Qt.ItemIsDragEnabled|Qt.ItemIsDropEnabled)
     #self.setFlags(Qt.ItemIsEnabled|Qt.ItemIsSelectable|Qt.ItemIsDragEnabled|Qt.ItemIsDropEnabled)
     #---
     if isdir(path):
         self.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator)
         self.setIcon(0, IconManager.application_icon("folder.png"))
     else:
         self.setIcon(0, IconManager.application_icon(splitext(path)[1][1:] + ".png"))
Exemplo n.º 2
0
 def __init__(self):
     icon = IconManager.application_icon("explorer.png")
     text = "Show in Explorer"
     widget = DockManager.DOCKS["AssetsDock"].ui.tree
     AbstractContextMenuAction.__init__(self, icon, text, widget)
     #---
     self.position = (0, 100)
Exemplo n.º 3
0
 def __init__(self):
     icon = IconManager.application_icon("folder.png")
     text = "Folder"
     widget = DockManager.DOCKS["AssetsDock"].ui.tree
     AbstractContextMenuAction.__init__(self, icon, text, widget)
     #---
     self.path = "Create"
     self.position = (0, 0)
Exemplo n.º 4
0
 def __init__(self):
     icon = IconManager.application_icon("folder.png")
     text = "Folder"
     widget = DockManager.DOCKS["AssetsDock"].ui.tree
     AbstractContextMenuAction.__init__(self, icon, text, widget)
     #---
     self.path = "Create"
     self.position = (0, 0)
Exemplo n.º 5
0
 def __init__(self):
     icon = IconManager.application_icon("refresh.png")
     text = "Refresh"
     shortcut = "F5"
     widget = DockManager.DOCKS["AssetsDock"].ui.tree
     AbstractContextMenuAction.__init__(self, icon, text, widget, shortcut)
     self.setShortcutContext(Qt.ApplicationShortcut)
     #---
     #.shortcut = QShortcut("F5", self.widget, self.action_performed, Qt.WidgetShortcut)
     self.position = (300, 0)
Exemplo n.º 6
0
 def __init__(self):
     icon = IconManager.application_icon("floppy.png")
     text = "Save Project"
     shortcut = "Ctrl+S"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Save the active project.")
     self.setStatusTip("Save the active project.")
     #---
     self.path = "File"
     self.position = (0, 300)
     self.toolbar_position = (0, 200)
Exemplo n.º 7
0
 def __init__(self):
     icon = IconManager.application_icon("open.png")
     text = "Open Project..."
     shortcut = "Ctrl+O"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Open an existing project.")
     self.setStatusTip("Open an existing project.")
     #---
     self.path = "File"
     self.position = (0, 100)
     self.toolbar_position = (0, 100)
Exemplo n.º 8
0
 def __init__(self):
     icon = IconManager.application_icon("new.png")
     text = "New Project..."
     shortcut = "Ctrl+N"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Create a new project.")
     self.setStatusTip("Create a new project.")
     #---
     self.path = "File"
     self.position = (0, 0)
     self.toolbar_position = (0, 0)
Exemplo n.º 9
0
 def __init__(self, tree, path):
     AbstractTreeItem.__init__(self)
     #---
     #self.background_changing = False
     self.path = relpath(path, tree.absolute_path())
     self.setText(0, self.filename_prefix())
     #print os.path.abspath(self.path)
     #self.setIcon(0, IconMgr.icon_by_path(path))
     self.setFlags(Qt.ItemIsEditable | Qt.ItemIsEnabled
                   | Qt.ItemIsSelectable | Qt.ItemIsDragEnabled
                   | Qt.ItemIsDropEnabled)
     #self.setFlags(Qt.ItemIsEnabled|Qt.ItemIsSelectable|Qt.ItemIsDragEnabled|Qt.ItemIsDropEnabled)
     #---
     if isdir(path):
         self.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator)
         self.setIcon(0, IconManager.application_icon("folder.png"))
     else:
         self.setIcon(
             0,
             IconManager.application_icon(splitext(path)[1][1:] + ".png"))
Exemplo n.º 10
0
 def __init__(self):
     icon = IconManager.application_icon("floppy.png")
     text = "Save Project"
     shortcut = "Ctrl+S"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Save the active project.")
     self.setStatusTip("Save the active project.")
     #---
     self.path = "File"
     self.position = (0, 300)
     self.toolbar_position = (0, 200)
Exemplo n.º 11
0
 def __init__(self):
     icon = IconManager.application_icon("open.png")
     text = "Open Project..."
     shortcut = "Ctrl+O"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Open an existing project.")
     self.setStatusTip("Open an existing project.")
     #---
     self.path = "File"
     self.position = (0, 100)
     self.toolbar_position = (0, 100)
Exemplo n.º 12
0
 def __init__(self):
     icon = IconManager.application_icon("new.png")
     text = "New Project..."
     shortcut = "Ctrl+N"
     AbstractMenuAction.__init__(self, icon, text, shortcut)
     self.setToolTip("Create a new project.")
     self.setStatusTip("Create a new project.")
     #---
     self.path = "File"
     self.position = (0, 0)
     self.toolbar_position = (0, 0)