Esempio n. 1
0
class PMXBundleWidget(PMXEditorBaseWidget, Ui_Menu):
    TYPE = 'bundle'
    def __init__(self, parent = None):
        super(PMXBundleWidget, self).__init__(parent)
        self.setupUi(self)
        manager = QtGui.QApplication.instance().supportManager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)

    def on_menuChanged(self):
        self.changes['mainMenu'] = self.treeMenuModel.getMainMenu()

    @property
    def title(self):
        if self.bundleItem != None:
            return 'Edit Menu: "%s"' % self.bundleItem.name
        return super(PMXBundleWidget, self).title()

    def getScope(self):
        return None
    
    def getTabTrigger(self):
        return None
    
    def getKeyEquivalent(self):
        return None
    
    def edit(self, bundle):
        super(PMXBundleWidget, self).edit(bundle)
        self.treeMenuModel.setBundle(bundle)
Esempio n. 2
0
class BundleEditorWidget(BundleItemEditorBaseWidget, Ui_Menu):
    TYPE = 'bundle'
    def __init__(self, parent = None):
        super(BundleEditorWidget, self).__init__(parent)
        self.setupUi(self)
        manager = parent.manager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)

    def on_menuChanged(self):
        self.changes['mainMenu'] = self.treeMenuModel.getMainMenu()

    def getScope(self):
        return None
    
    def getTabTrigger(self):
        return None
    
    def getKeySequence(self):
        return None
    
    def getSemanticClass(self):
        return None
    
    def edit(self, bundleItem):
        BundleItemEditorBaseWidget.edit(self, bundleItem)
        self.treeMenuModel.setBundle(bundleItem)
Esempio n. 3
0
class PMXBundleWidget(PMXEditorBaseWidget, Ui_Menu):
    TYPE = 'bundle'

    def __init__(self, parent=None):
        super(PMXBundleWidget, self).__init__(parent)
        self.setupUi(self)
        manager = QtGui.QApplication.instance().supportManager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)

    def on_menuChanged(self):
        self.changes['mainMenu'] = self.treeMenuModel.getMainMenu()

    @property
    def title(self):
        if self.bundleItem != None:
            return 'Edit Menu: "%s"' % self.bundleItem.name
        return super(PMXBundleWidget, self).title()

    def getScope(self):
        return None

    def getTabTrigger(self):
        return None

    def getKeyEquivalent(self):
        return None

    def edit(self, bundle):
        super(PMXBundleWidget, self).edit(bundle)
        self.treeMenuModel.setBundle(bundle)
Esempio n. 4
0
    def __init__(self, parent=None):
        super(PMXBundleWidget, self).__init__(parent)
        self.setupUi(self)
        manager = QtGui.QApplication.instance().supportManager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)
Esempio n. 5
0
    def __init__(self, parent = None):
        super(PMXBundleWidget, self).__init__(parent)
        self.setupUi(self)
        manager = QtGui.QApplication.instance().supportManager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)
Esempio n. 6
0
    def __init__(self, parent = None):
        super(BundleEditorWidget, self).__init__(parent)
        self.setupUi(self)
        manager = parent.manager

        self.treeMenuModel = BundleItemMenuTreeModel(manager)
        self.treeMenuView.setModel(self.treeMenuModel)
        self.listExcludedView.setModel(self.treeMenuModel.excludedListModel())

        self.treeMenuModel.menuChanged.connect(self.on_menuChanged)