Ejemplo n.º 1
0
    def __init__(self):
        ProjectBrowserView.__init__(self)

        self.paradigm_container = None
        self.contextual_creator = ParadigmCreator(self)
        self.contextual_creator.paradigm_clicked.connect(self.new_contextual_paradigm)

        self.paradigm = ParadigmCreator(self)
        self.paradigm.paradigm_clicked.connect(self.new_paradigm)
Ejemplo n.º 2
0
    def create_menu(self):

        menu = QtGui.QMenu(self)
        actions = ProjectBrowserView.create_menu(self).actions()
        if actions:
            menu.addActions(actions)
            menu.addSeparator()

        project, category, obj = self.selected_data()

        if category == 'category' and obj == 'model':
            self.add_new_file_actions(menu)

        elif category == 'category' and obj in ('startup', 'lib'):
            self.add_new_file_actions(menu, ['Python'])

        if category == 'model':
            self.add_new_file_actions(menu)

        return menu