Esempio n. 1
0
    def __init__(self, parent=None):
        """Set up the ui."""
        super().__init__(parent)

        # setup the ui
        uifile = _get_ui_file(self)
        self.ui = _uic.loadUi(uifile, self)

        self.meas = _meas
        # connect signals and slots
        self.connect_signal_slots()
    def __init__(self, parent=None):
        """Set up the ui."""
        super().__init__(parent)

        # setup the ui
        uifile = _get_ui_file(self)
        self.ui = _uic.loadUi(uifile, self)

        self.mdriver = _mdriver
        self.mint = _mint
        self.config = _config

        self.connect_signal_slots()
        self.update_serial_ports()
Esempio n. 3
0
    def __init__(self,
                 parent=None,
                 width=_utils.WINDOW_WIDTH,
                 height=_utils.WINDOW_HEIGHT):
        """Set up the ui and add main tabs."""
        super().__init__(parent)

        # setup the ui
        uifile = _get_ui_file(self)
        self.ui = _uic.loadUi(uifile, self)
        self.resize(width, height)

        # define tab names and corresponding widgets
        self.tab_names = [
            'Connection', 'Motors', 'Integrator', 'PowerSupply',
            'Measurements', 'Results', 'Database'
        ]

        self.tab_widgets = [
            _ConnectionWidget(),
            _MotorsWidget(),
            _IntegratorWidget(),
            _PowerSupplyWidget(),
            _MeasurementsWidget(),
            _ResultsWidget(),
            _DatabaseWidget(),
        ]

        # show database name
        self.ui.le_database.setText(self.database_name)

        # add widgets to main tab
        self.ui.twg_main_tab.clear()
        for i in range(len(self.tab_names)):
            tab_name = self.tab_names[i]
            tab = self.tab_widgets[i]
            setattr(self, tab_name, tab)
            icon = _get_icon_path(tab_name)
            self.ui.twg_main_tab.addTab(tab, _QIcon(icon),
                                        tab_name.capitalize())

        self.connect_signal_slots()
Esempio n. 4
0
    def __init__(self, parent=None):
        """Set up the ui."""
        super().__init__(parent)

        # setup the ui
        uifile = _get_ui_file(self)
        self.ui = _uic.loadUi(uifile, self)

        self._table_object_dict = {
            self._ps_table_name: _PowerSupplyConfig,
            self._config_table_name: _Config,
            self._meas_table_name: _Meas,
            }

        self.twg_database = _databasewidgets.DatabaseTabWidget(
            database_name=self.database_name,
            mongo=self.mongo, server=self.server)
        self.ui.lyt_database.addWidget(self.twg_database)

        # connect signals and slots
        self.connect_signal_slots()
Esempio n. 5
0
    def __init__(self, parent=None):
        """Set up the ui."""
        super().__init__(parent)

        # setup the ui
        uifile = _get_ui_file(self)
        self.ui = _uic.loadUi(uifile, self)

        self.ui.la_connection_status.setText('OK')
        self.ui.la_connection_status.setStyleSheet('color: rgb(0, 0, 0)')

        self.mdriver = _mdriver
        self.mint = _mint
        self.config = _config
        self.meas = _meas
        self.stop = True
        self.update_timer = 500
        self.position_timer = _QTimer()
        self.list_config_files()

        # connect signals and slots
        self.connect_signal_slots()