Exemple #1
0
    def __init__(self, parent=None):
        BaseMainWindow.__init__(self, parent)

        icon = QtGui.QIcon(":icons/plugins.png")
        plugin_action = QtGui.QAction(icon, _("Plugins"), self)

        self.plugin_toolbar = QtGui.QToolBar()
        '''
        A toolbar which plugins can (should?) add a QAction to
        '''
        self.plugin_toolbar.setObjectName("plugins toolbar")
        self.plugin_toolbar.toggleViewAction().setText(_("Plugins Toolbar"))

        self.plugin_toolbar.addAction(plugin_action)

        self.addToolBar(self.plugin_toolbar)
        self.loadSettings()

        plugin_action.triggered.connect(self.plugin_action_triggered)
    def __init__(self, parent=None):
        BaseMainWindow.__init__(self, parent)

        icon = QtGui.QIcon(":icons/plugins.png")
        plugin_action = QtGui.QAction(icon, _("Plugins"), self)

        self.plugin_toolbar = QtGui.QToolBar()
        '''
        A toolbar which plugins can (should?) add a QAction to
        '''
        self.plugin_toolbar.setObjectName("plugins toolbar")
        self.plugin_toolbar.toggleViewAction().setText(_("Plugins Toolbar"))

        self.plugin_toolbar.addAction(plugin_action)

        self.addToolBar(self.plugin_toolbar)
        self.loadSettings()

        plugin_action.triggered.connect(self.plugin_action_triggered)
 def test_mainwindow(self):
     mw = BaseMainWindow()
     mw.show()