Exemplo n.º 1
0
    def about(self):
        """Creates the about window"""
        about_msg = _fromUtf8(
            """collector |kəˈlektər|
noun a person or thing that collects something, in particular.
 - New Oxford dictionary

https://www.ariel.cat
                """
        )
        QtGui.QMessageBox.about(self, "About Collector", about_msg)
Exemplo n.º 2
0
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.plugin_manager = PluginManager.get_instance()
        MainWindow.instance = self
        self.collection = Collection.get_instance()

        self.setupUi(self)
        self.showMaximized()
        self.setUnifiedTitleAndToolBarOnMac(True)
        #  TODO clean toolbar code?
        # self.createToolbar()
        self.views = None
        self.view = "dashboard"
        # self.views = self.init_views()
        # self.display_view('dashboard')
        self.statusbar.hide()
        # Menu actions
        self.help_menu = self.menuBar().addMenu("&Help")
        self.about_action = QtGui.QAction(
            "&About", self, statusTip="Show the application's About box", triggered=self.about
        )
        self.help_menu.addAction(self.about_action)
        # Connect menu actions
        self.actionView_Dashboard.triggered.connect(lambda: self.display_view("dashboard"))
        self.connect(
            self.actionQuick_search, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("quicksearch")
        )
        self.connect(self.actionFullscreen, QtCore.SIGNAL(_fromUtf8("triggered()")), self.switch_fullscreen)
        self.connect(
            self.actionDiscover, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("discover")
        )
        self.connect(
            self.actionPreferences, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("preferences")
        )
        self.connect(
            self.actionProperties, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("properties")
        )
        self.connect(
            self.actionAdvanced_Search, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("filters")
        )
        self.connect(self.actionImport, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("import"))
        self.connect(self.actionExport, QtCore.SIGNAL(_fromUtf8("triggered()")), lambda: self.display_view("export"))