コード例 #1
0
ファイル: FileTreeItem.py プロジェクト: Gatou/AGM3D
 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"))
コード例 #2
0
ファイル: FileTreeActions.py プロジェクト: Gatou/AGM3D
 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)
コード例 #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)
コード例 #4
0
ファイル: FileTreeCreateActions.py プロジェクト: Gatou/AGM3D
 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)
コード例 #5
0
ファイル: FileTreeActions.py プロジェクト: Gatou/AGM3D
 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)
コード例 #6
0
ファイル: FileActions.py プロジェクト: PlumpMath/AGM3D
 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)
コード例 #7
0
ファイル: FileActions.py プロジェクト: PlumpMath/AGM3D
 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)
コード例 #8
0
ファイル: FileActions.py プロジェクト: PlumpMath/AGM3D
 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)
コード例 #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"))
コード例 #10
0
ファイル: FileActions.py プロジェクト: Gatou/AGM3D
 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)
コード例 #11
0
ファイル: FileActions.py プロジェクト: Gatou/AGM3D
 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)
コード例 #12
0
ファイル: FileActions.py プロジェクト: Gatou/AGM3D
 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)