Beispiel #1
0
    def set_icons(self):
        # -------------------------------------
        # Create Icons for buttons
        # -------------------------------------
        load_icon = get32Icon('folder')
        save_icon = get32Icon('file_save_as')
        # -------------------------------------
        # Set Icons for buttons
        # -------------------------------------
        #self.loadButton.setIconSize(QSize(32, 32))
        #self.loadButton.setIcon(load_icon)

        #self.saveButton.setIconSize(QSize(32, 32))
        #self.saveButton.setIcon(save_icon)

        # -------------------------------------
        # Create Icons for actions
        # -------------------------------------
        load_icon = get16Icon('folder')
        save_icon = get16Icon('file_save_as')
        exit_icon = get16Icon('cancel')
        overview_icon = get16Icon('tree_list')
        create_icon = get16Icon('application_add')
        reload_icon = get16Icon('arrow_rotate_clockwise')
        help_icon = get16Icon('help')
        info_icon = get16Icon('information')
        refresh_icon = get16Icon('arrow_refresh')
        delete_icon = get16Icon('delete')
        view_icon = get16Icon('reviewing_pane')

        # -------------------------------------
        # Set Icons for actions
        # -------------------------------------
        self.actionLoad.setIcon(load_icon)
        self.actionSave.setIcon(save_icon)
        self.actionExit.setIcon(exit_icon)
        self.actionOverview.setIcon(overview_icon)
        self.actionCreate.setIcon(create_icon)
        self.actionReload_Plugin_DB.setIcon(reload_icon)
        self.actionReloadConfig.setIcon(reload_icon)
        self.actionPaPI_Wiki.setIcon(help_icon)
        self.actionPaPI_Doc.setIcon(help_icon)
        self.actionAbout.setIcon(info_icon)
        self.actionAbout_Qt.setIcon(info_icon)
        self.actionAbout_PySide.setIcon(info_icon)
        self.actionResetPaPI.setIcon(delete_icon)
        self.actionRunMode.setIcon(view_icon)

        # -------------------------------------
        # Set Icons visible in menu
        # -------------------------------------
        self.actionLoad.setIconVisibleInMenu(True)
        self.actionSave.setIconVisibleInMenu(True)
        self.actionExit.setIconVisibleInMenu(True)
        self.actionOverview.setIconVisibleInMenu(True)
        self.actionCreate.setIconVisibleInMenu(True)
        self.actionReload_Plugin_DB.setIconVisibleInMenu(True)
        self.actionReloadConfig.setIconVisibleInMenu(True)
        self.actionPaPI_Wiki.setIconVisibleInMenu(True)
        self.actionPaPI_Doc.setIconVisibleInMenu(True)
        self.actionAbout.setIconVisibleInMenu(True)
        self.actionAbout_Qt.setIconVisibleInMenu(True)
        self.actionAbout_PySide.setIconVisibleInMenu(True)
        self.actionResetPaPI.setIconVisibleInMenu(True)
        self.actionRunMode.setIconVisibleInMenu(True)
Beispiel #2
0
    def set_icons(self):
        # -------------------------------------
        # Create Icons for buttons
        # -------------------------------------
        load_icon = get32Icon('folder')
        save_icon = get32Icon('file_save_as')
        # -------------------------------------
        # Set Icons for buttons
        # -------------------------------------
        #self.loadButton.setIconSize(QSize(32, 32))
        #self.loadButton.setIcon(load_icon)

        #self.saveButton.setIconSize(QSize(32, 32))
        #self.saveButton.setIcon(save_icon)

        # -------------------------------------
        # Create Icons for actions
        # -------------------------------------
        load_icon = get16Icon('folder')
        save_icon = get16Icon('file_save_as')
        exit_icon = get16Icon('cancel')
        overview_icon = get16Icon('tree_list')
        create_icon = get16Icon('application_add')
        reload_icon = get16Icon('arrow_rotate_clockwise')
        help_icon = get16Icon('help')
        info_icon = get16Icon('information')
        refresh_icon = get16Icon('arrow_refresh')
        delete_icon = get16Icon('delete')
        view_icon = get16Icon('reviewing_pane')

        # -------------------------------------
        # Set Icons for actions
        # -------------------------------------
        self.actionLoad.setIcon(load_icon)
        self.actionSave.setIcon(save_icon)
        self.actionExit.setIcon(exit_icon)
        self.actionOverview.setIcon(overview_icon)
        self.actionCreate.setIcon(create_icon)
        self.actionReload_Plugin_DB.setIcon(reload_icon)
        self.actionReloadConfig.setIcon(reload_icon)
        self.actionPaPI_Wiki.setIcon(help_icon)
        self.actionPaPI_Doc.setIcon(help_icon)
        self.actionAbout.setIcon(info_icon)
        self.actionAbout_Qt.setIcon(info_icon)
        self.actionAbout_PySide.setIcon(info_icon)
        self.actionResetPaPI.setIcon(delete_icon)
        self.actionRunMode.setIcon(view_icon)

        # -------------------------------------
        # Set Icons visible in menu
        # -------------------------------------
        self.actionLoad.setIconVisibleInMenu(True)
        self.actionSave.setIconVisibleInMenu(True)
        self.actionExit.setIconVisibleInMenu(True)
        self.actionOverview.setIconVisibleInMenu(True)
        self.actionCreate.setIconVisibleInMenu(True)
        self.actionReload_Plugin_DB.setIconVisibleInMenu(True)
        self.actionReloadConfig.setIconVisibleInMenu(True)
        self.actionPaPI_Wiki.setIconVisibleInMenu(True)
        self.actionPaPI_Doc.setIconVisibleInMenu(True)
        self.actionAbout.setIconVisibleInMenu(True)
        self.actionAbout_Qt.setIconVisibleInMenu(True)
        self.actionAbout_PySide.setIconVisibleInMenu(True)
        self.actionResetPaPI.setIconVisibleInMenu(True)
        self.actionRunMode.setIconVisibleInMenu(True)
Beispiel #3
0
    def create_widget(self):

        # -------------------
        # Create structure
        # -------------------

        self.centralwidget = QtWidgets.QWidget()
        self.centralwidget.setObjectName('centralwidget')
        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)

        # -------------------
        # Create and add table
        # -------------------

        #self.tableWidget = QtWidgets.QWidget()
        self.tableWidget = QtWidgets.QTableWidget()

        self.gridWidget = QtWidgets.QWidget()

        self.verticalLayout.addWidget(self.gridWidget)

        self.verticalLayout.addWidget(self.tableWidget)
        #        self.tableWidget.horizontalHeader().setStretchLastSection(True)
        #        self.tableWidget.verticalHeader().setStretchLastSection(True)

        #        self.tableWidget.horizontalHeader().setVisible(False)
        #        self.tableWidget.verticalHeader().setVisible(False)

        self.horizonLayoutButtons = QtWidgets.QHBoxLayout()
        self.allButons = QtWidgets.QWidget()
        self.allButons.setLayout(self.horizonLayoutButtons)

        self.verticalLayout.addWidget(self.allButons)

        # -------------------
        # Add Buttons: LoadSave
        # -------------------

        self.loadsaveButtonsWidget = QtWidgets.QWidget()

        self.loadsaveButtonVLayout = QtWidgets.QVBoxLayout(
            self.loadsaveButtonsWidget)

        self.saveConfigButton = QtWidgets.QPushButton("Speichern")
        self.saveConfigButton.setToolTip("Aktuelle Konfiguration speichern.")
        self.loadConfigButton = QtWidgets.QPushButton("Laden")
        self.loadConfigButton.setToolTip("Neue Konfiguration laden.")

        load_icon = get32Icon('folder')
        save_icon = get32Icon('file_save_as')

        self.saveConfigButton.setIcon(save_icon)
        self.loadConfigButton.setIcon(load_icon)

        self.loadsaveButtonVLayout.addWidget(self.saveConfigButton)
        self.loadsaveButtonVLayout.addWidget(self.loadConfigButton)

        self.horizonLayoutButtons.addWidget(self.loadsaveButtonsWidget)

        # -------------------
        # Add Buttons: Start/Stop configButtonsWidget
        # -------------------

        self.configButtonsWidget = QtWidgets.QWidget()
        self.configButtonVLayout = QtWidgets.QVBoxLayout(
            self.configButtonsWidget)

        self.sendConfigButton = QtWidgets.QPushButton()
        self.stopButton = QtWidgets.QPushButton()
        self.finishedCalibrationButton = QtWidgets.QPushButton(
            "Beende Kalibrierung")
        self.reCalibrationButton = QtWidgets.QPushButton("Erneut Kalibrierung")
        self.reCalibrationButton.hide()

        self.stopButton.hide()
        stop_icon = get32Icon('delete')
        start_icon = get32Icon('control_play_blue')

        self.stopButton.setIcon(stop_icon)
        self.sendConfigButton.setIcon(start_icon)
        self.configButtonVLayout.addWidget(self.finishedCalibrationButton)
        self.configButtonVLayout.addWidget(self.reCalibrationButton)
        self.configButtonVLayout.addWidget(self.sendConfigButton)
        self.configButtonVLayout.addWidget(self.stopButton)

        self.horizonLayoutButtons.addWidget(self.configButtonsWidget)

        # -------------------
        # Add Buttons: State/Channels
        # -------------------

        self.tableButtonsWidget = QtWidgets.QWidget()

        self.tableButtonVLayout = QtWidgets.QVBoxLayout(
            self.tableButtonsWidget)

        self.addStateButton = QtWidgets.QPushButton("Neuen Zustand erzeugen")
        self.addChButton = QtWidgets.QPushButton("Neuen Kanal anlegen")

        if not self.readOnly:

            self.tableButtonVLayout.addWidget(self.addStateButton)
            self.tableButtonVLayout.addWidget(self.addChButton)

            self.horizonLayoutButtons.addWidget(self.tableButtonsWidget)

        return self.centralwidget
Beispiel #4
0
    def create_widget(self):

        # -------------------
        # Create structure
        # -------------------

        self.centralwidget = QtWidgets.QWidget()
        self.centralwidget.setObjectName('centralwidget')
        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)

        # -------------------
        # Create and add table
        # -------------------


        #self.tableWidget = QtWidgets.QWidget()
        self.tableWidget = QtWidgets.QTableWidget()

        self.gridWidget = QtWidgets.QWidget()

        self.verticalLayout.addWidget(self.gridWidget)

        self.verticalLayout.addWidget(self.tableWidget)
#        self.tableWidget.horizontalHeader().setStretchLastSection(True)
#        self.tableWidget.verticalHeader().setStretchLastSection(True)

#        self.tableWidget.horizontalHeader().setVisible(False)
#        self.tableWidget.verticalHeader().setVisible(False)

        self.horizonLayoutButtons = QtWidgets.QHBoxLayout()
        self.allButons = QtWidgets.QWidget()
        self.allButons.setLayout(self.horizonLayoutButtons)

        self.verticalLayout.addWidget(self.allButons)

        # -------------------
        # Add Buttons: LoadSave
        # -------------------

        self.loadsaveButtonsWidget = QtWidgets.QWidget()

        self.loadsaveButtonVLayout = QtWidgets.QVBoxLayout(self.loadsaveButtonsWidget)

        self.saveConfigButton = QtWidgets.QPushButton("Speichern")
        self.saveConfigButton.setToolTip("Aktuelle Konfiguration speichern.")
        self.loadConfigButton = QtWidgets.QPushButton("Laden")
        self.loadConfigButton.setToolTip("Neue Konfiguration laden.")

        load_icon = get32Icon('folder')
        save_icon = get32Icon('file_save_as')

        self.saveConfigButton.setIcon(save_icon)
        self.loadConfigButton.setIcon(load_icon)

        self.loadsaveButtonVLayout.addWidget(self.saveConfigButton)
        self.loadsaveButtonVLayout.addWidget(self.loadConfigButton)

        self.horizonLayoutButtons.addWidget(self.loadsaveButtonsWidget)

        # -------------------
        # Add Buttons: Start/Stop configButtonsWidget
        # -------------------

        self.configButtonsWidget = QtWidgets.QWidget()
        self.configButtonVLayout = QtWidgets.QVBoxLayout(self.configButtonsWidget)

        self.sendConfigButton = QtWidgets.QPushButton()
        self.stopButton = QtWidgets.QPushButton()
        self.finishedCalibrationButton = QtWidgets.QPushButton("Beende Kalibrierung")
        self.reCalibrationButton = QtWidgets.QPushButton("Erneut Kalibrierung")
        self.reCalibrationButton.hide()

        self.stopButton.hide()
        stop_icon = get32Icon('delete')
        start_icon = get32Icon('control_play_blue')

        self.stopButton.setIcon(stop_icon)
        self.sendConfigButton.setIcon(start_icon)
        self.configButtonVLayout.addWidget(self.finishedCalibrationButton)
        self.configButtonVLayout.addWidget(self.reCalibrationButton)
        self.configButtonVLayout.addWidget(self.sendConfigButton)
        self.configButtonVLayout.addWidget(self.stopButton)


        self.horizonLayoutButtons.addWidget(self.configButtonsWidget)

        # -------------------
        # Add Buttons: State/Channels
        # -------------------

        self.tableButtonsWidget = QtWidgets.QWidget()

        self.tableButtonVLayout = QtWidgets.QVBoxLayout(self.tableButtonsWidget)

        self.addStateButton = QtWidgets.QPushButton("Neuen Zustand erzeugen")
        self.addChButton = QtWidgets.QPushButton("Neuen Kanal anlegen")

        if not self.readOnly:

            self.tableButtonVLayout.addWidget(self.addStateButton)
            self.tableButtonVLayout.addWidget(self.addChButton)

            self.horizonLayoutButtons.addWidget(self.tableButtonsWidget)

        return self.centralwidget