Пример #1
0
        self.verticalLayout_main.addWidget(self.vna_controller)

        self.splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal, self)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        size_policy.setVerticalStretch(1)
        self.splitter.setSizePolicy(size_policy)

        self.measurements_widget = QtWidgets.QWidget(self.splitter)
        self.measurements_widget_layout = QtWidgets.QVBoxLayout(self.measurements_widget)
        self.measurements_widget_layout.setContentsMargins(0, 0, 0, 0)

        self.listWidget_measurements = skrf_qtwidgets.networkListWidget.NetworkListWidget(self.measurements_widget)
        self.measurement_buttons = self.listWidget_measurements.get_input_buttons()
        self.measurements_widget_layout.addWidget(self.measurement_buttons)
        self.measurements_widget_layout.addWidget(self.listWidget_measurements)

        self.save_buttons = self.listWidget_measurements.get_save_buttons()
        self.measurements_widget_layout.addWidget(self.save_buttons)

        self.ntwk_plot = skrf_qtwidgets.networkPlotWidget.NetworkPlotWidget(self.splitter)
        self.ntwk_plot.corrected_data_enabled = False

        self.verticalLayout_main.addWidget(self.splitter)
        self.splitter.setStretchFactor(1, 100)  # important that this goes at the end
        # --- END SETUP UI --- #

        self.listWidget_measurements.ntwk_plot = self.ntwk_plot
        self.listWidget_measurements.get_analyzer = self.vna_controller.get_analyzer

app = qt.single_widget_application(DataGrabber)
Пример #2
0
        self.verticalLayout_main.addWidget(self.vna_controller)

        self.splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal, self)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        size_policy.setVerticalStretch(1)
        self.splitter.setSizePolicy(size_policy)

        self.measurements_widget = QtWidgets.QWidget(self.splitter)
        self.measurements_widget_layout = QtWidgets.QVBoxLayout(self.measurements_widget)
        self.measurements_widget_layout.setContentsMargins(0, 0, 0, 0)

        self.listWidget_measurements = skrf_qtwidgets.networkListWidget.NetworkListWidget(self.measurements_widget)
        self.measurement_buttons = self.listWidget_measurements.get_input_buttons()
        self.measurements_widget_layout.addWidget(self.measurement_buttons)
        self.measurements_widget_layout.addWidget(self.listWidget_measurements)

        self.save_buttons = self.listWidget_measurements.get_save_buttons()
        self.measurements_widget_layout.addWidget(self.save_buttons)

        self.ntwk_plot = skrf_qtwidgets.networkPlotWidget.NetworkPlotWidget(self.splitter)
        self.ntwk_plot.corrected_data_enabled = False

        self.verticalLayout_main.addWidget(self.splitter)
        self.splitter.setStretchFactor(1, 100)  # important that this goes at the end
        # --- END SETUP UI --- #

        self.listWidget_measurements.ntwk_plot = self.ntwk_plot
        self.listWidget_measurements.get_analyzer = self.vna_controller.get_analyzer

app = qt.single_widget_application(DataGrabber, appid="DataGrabber")
Пример #3
0
        self.vna_controller.verticalLayout.setContentsMargins(3, 3, 3, 3)
        self.verticalLayout_main.addWidget(self.vna_controller)

        self.splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal, self)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Preferred)
        size_policy.setVerticalStretch(1)
        self.splitter.setSizePolicy(size_policy)

        self.tabWidget = QtWidgets.QTabWidget(self.splitter)
        self.tab_calStandards = calibration_widgets.TRLStandardsWidget()
        self.tab_measurements = calibration_widgets.CalibratedMeasurementsWidget(
        )
        self.tabWidget.addTab(self.tab_calStandards, "Cal Standards")
        self.tabWidget.addTab(self.tab_measurements, "Measurements")

        self.ntwk_plot = skrf_qtwidgets.networkPlotWidget.NetworkPlotWidget(
            self.splitter)

        self.verticalLayout_main.addWidget(self.splitter)
        self.splitter.setStretchFactor(1, 100)
        # --- END SETUP UI --- #

        # necessary rigging of widgets
        self.tab_calStandards.connect_plot(self.ntwk_plot)
        self.tab_measurements.connect_plot(self.ntwk_plot)
        self.tab_measurements.get_calibration = self.tab_calStandards.get_calibration


app = qt.single_widget_application(TRLWidget)
Пример #4
0
        self.setWindowTitle("Multiline TRL Calibration")
        self.verticalLayout_main = QtWidgets.QVBoxLayout(self)

        self.vna_controller = widgets.VnaSelector()
        self.vna_controller.verticalLayout.setContentsMargins(3, 3, 3, 3)
        self.verticalLayout_main.addWidget(self.vna_controller)

        self.splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal, self)
        size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred)
        size_policy.setVerticalStretch(1)
        self.splitter.setSizePolicy(size_policy)

        self.tabWidget = QtWidgets.QTabWidget(self.splitter)
        self.tab_calStandards = calibration_widgets.TRLStandardsWidget()
        self.tab_measurements = calibration_widgets.CalibratedMeasurementsWidget()
        self.tabWidget.addTab(self.tab_calStandards, "Cal Standards")
        self.tabWidget.addTab(self.tab_measurements, "Measurements")

        self.ntwk_plot = skrf_qtwidgets.networkPlotWidget.NetworkPlotWidget(self.splitter)

        self.verticalLayout_main.addWidget(self.splitter)
        self.splitter.setStretchFactor(1, 100)
        # --- END SETUP UI --- #

        # necessary rigging of widgets
        self.tab_calStandards.connect_plot(self.ntwk_plot)
        self.tab_measurements.connect_plot(self.ntwk_plot)
        self.tab_measurements.get_calibration = self.tab_calStandards.get_calibration

app = qt.single_widget_application(TRLWidget)
Пример #5
0
        self.measurements_widget = QtWidgets.QWidget(self.splitter)
        self.measurements_widget_layout = QtWidgets.QVBoxLayout(
            self.measurements_widget)
        self.measurements_widget_layout.setContentsMargins(0, 0, 0, 0)

        self.listWidget_measurements = skrf_qtwidgets.networkListWidget.NetworkListWidget(
            self.measurements_widget)
        self.measurement_buttons = self.listWidget_measurements.get_input_buttons(
        )
        self.measurements_widget_layout.addWidget(self.measurement_buttons)
        self.measurements_widget_layout.addWidget(self.listWidget_measurements)

        self.save_buttons = self.listWidget_measurements.get_save_buttons()
        self.measurements_widget_layout.addWidget(self.save_buttons)

        self.ntwk_plot = skrf_qtwidgets.networkPlotWidget.NetworkPlotWidget(
            self.splitter)
        self.ntwk_plot.corrected_data_enabled = False

        self.verticalLayout_main.addWidget(self.splitter)
        self.splitter.setStretchFactor(
            1, 100)  # important that this goes at the end
        # --- END SETUP UI --- #

        self.listWidget_measurements.ntwk_plot = self.ntwk_plot
        self.listWidget_measurements.get_analyzer = self.vna_controller.get_analyzer


app = qt.single_widget_application(DataGrabber, appid="DataGrabber")
Пример #6
0
        self.tab_measurements.connect_plot(self.ntwk_plot)
        self.tab_measurements.get_calibration = self.tab_calStandards.get_calibration
        self.tab_measurements.get_analyzer = self.vna_selector.get_analyzer
        self.vna_selector.enableStateToggled.connect(self.process_vna_available)
        self.tab_calStandards.calibration_updated.connect(self.tab_measurements.set_calibration)

        self.process_vna_available(self.vna_selector.isEnabled())

    def process_vna_available(self, available):
        """
        Parameters
        ----------
        available : bool
            set the widgets based on whether or not analyzers are available for measuring / setting properties
        """
        self.tab_calStandards.process_vna_available(available)
        self.tab_measurements.btn_measureMeasurement.setEnabled(available)

    def closeEvent(self, event):
        quit_msg = "Are you sure you want to exit the program?"
        reply = QtWidgets.QMessageBox.question(
            self, 'Message', quit_msg, QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No)

        if reply == QtWidgets.QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()

if __name__ == "__main__":
    app = qt.single_widget_application(NISTTRLWidget, splash_screen=True)
Пример #7
0
            self.process_vna_available)
        self.tab_calStandards.calibration_updated.connect(
            self.tab_measurements.set_calibration)

        self.process_vna_available(self.vna_selector.isEnabled())

    def process_vna_available(self, available):
        """
        Parameters
        ----------
        available : bool
            set the widgets based on whether or not analyzers are available for measuring / setting properties
        """
        self.tab_calStandards.process_vna_available(available)
        self.tab_measurements.btn_measureMeasurement.setEnabled(available)

    def closeEvent(self, event):
        quit_msg = "Are you sure you want to exit the program?"
        reply = QtWidgets.QMessageBox.question(self, 'Message', quit_msg,
                                               QtWidgets.QMessageBox.Yes,
                                               QtWidgets.QMessageBox.No)

        if reply == QtWidgets.QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()


if __name__ == "__main__":
    app = qt.single_widget_application(NISTTRLWidget, splash_screen=True)