Ejemplo n.º 1
0
    def __init__(self, category, parent=None):
        WelcomePage.__init__(self, parent=parent)

        self._actions = {}
        self._sorted_actions = []
        for plugin_class in plugins(category):
            action = QtGui.QAction(obj_icon(plugin_class), alias(plugin_class), self)
            action.triggered.connect(self._on_action_triggered)
            self._actions[action] = plugin_class
            self._sorted_actions.append(action)

        self.set_actions(self._sorted_actions)
Ejemplo n.º 2
0
    def __init__(self, category, parent=None):
        WelcomePage.__init__(self, parent=parent)

        self._actions = {}
        self._sorted_actions = []
        for plugin_class in plugins(category):
            action = QtGui.QAction(obj_icon(plugin_class), alias(plugin_class),
                                   self)
            action.triggered.connect(self._on_action_triggered)
            self._actions[action] = plugin_class
            self._sorted_actions.append(action)

        self.set_actions(self._sorted_actions)
Ejemplo n.º 3
0
 def addProjectTab(self):
     """
     Display a welcome tab if nothing is opened
     """
     pm = get_applet(identifier='ProjectManager')
     if pm:
         actions = [pm.actionNewProj, pm.actionOpenProj]
         welcomePage = WelcomePage(actions=actions, parent=self.parent())
         self.addTab(welcomePage, "Welcome")
Ejemplo n.º 4
0
 def addCreateFileTab(self):
     """
     Display a tab to select type of file that you can create
     """
     if self.paradigms_actions:
         page = WelcomePage(actions=self.paradigms_actions)
         self.addTab(page, "Create File")
     else:
         self.addProjectTab()
     self.rmTab("Welcome")
Ejemplo n.º 5
0
 def resize(self, *args, **kwargs):
     WelcomePage.resize(self, *args, **kwargs)
     self.set_actions(self._sorted_actions)
Ejemplo n.º 6
0
 def resize(self, *args, **kwargs):
     WelcomePage.resize(self, *args, **kwargs)
     self.set_actions(self._sorted_actions)