def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) # create models self._domain = Domain(parent=self) self._vcoCharWidget = VCOCharWidget(parent=self) self._ui.tabWidgetMain.addTab(self._vcoCharWidget, 'VCO characteristics') self._measureModel = MeasureModel(parent=self, domain=self._domain) self._markerModel = MarkerModel(parent=self) self._plotWidget = PhasePlotWidget(parent=self, domain=self._domain) self._ui.layoutPlot = QVBoxLayout() self._ui.layoutPlot.addWidget(self._ui.widgetStats) self._ui.layoutPlot.addWidget(self._plotWidget) self._ui.tabPlot.setLayout(self._ui.layoutPlot) # UI hack self._show_freq = False self._show_amp = False self._show_curr = False self._init()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) self._instrumentController = InstrumentController(parent=self) self._connectionWidget = ConnectionWidget( parent=self, controller=self._instrumentController) self._measureWidget = MeasureWidgetWithSecondaryParameters( parent=self, controller=self._instrumentController) self._measureModel = MeasureModel( parent=self, controller=self._instrumentController) self._plotWidget = PrimaryPlotWidget( parent=self, result=self._instrumentController.result) self._statWidget = StatWidget(parent=self, result=self._instrumentController.result) # init UI self._ui.layInstrs.insertWidget(0, self._connectionWidget) self._ui.layInstrs.insertWidget(1, self._measureWidget) self._ui.layInstrs.insertWidget(2, self._statWidget, 10) self._ui.tabWidget.insertTab(0, self._plotWidget, 'Автоматическое измерение') self._init()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) # create models self._instrumentManager = InstrumentManager() self._measureModel = MeasureModel( parent=self, instrumentManager=self._instrumentManager) self._chipModel = MapModel(parent=self, data={ 0: '1324ПМ1 (0,25 дБ)', 1: '1324ПМ2 (0,5 дБ)' }) # create plot widgets self._plotWidget = PlotWidget( parent=self, instrumentManager=self._instrumentManager) self._ui.grpPlot.setLayout(self._plotWidget) self.initDialog()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) # create models self.measureModels = { 1: MeasureModel(self), 2: MeasureModel(self), } self._instrumentManager = InstrumentManager(self, self.measureModels) self.machine = QStateMachine() self.stateInitial = QState() self.stateReadyToCheck = QState() self.stateReadyToMeasure = QState() self.stateAfterMeasure = QState() self.initDialog()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) self._instrumentController = InstrumentController(parent=self) self._connectionWidget = ConnectionWidget(parent=self, controller=self._instrumentController) self._measureWidget = MeasureWidgetWithSecondaryParameters(parent=self, controller=self._instrumentController) self._measureModel = MeasureModel(parent=self, controller=self._instrumentController) # init UI self._ui.layInstrs.insertWidget(0, self._connectionWidget) self._ui.layInstrs.insertWidget(1, self._measureWidget) self._init()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) self._instrumentController = InstrumentController(parent=self) self._connectionWidget = ConnectionWidget( parent=self, controller=self._instrumentController) self._measureWidget = MeasureWidgetWithSecondaryParameters( parent=self, controller=self._instrumentController) self._measureModel = MeasureModel( parent=self, controller=self._instrumentController) self._sParamPlotWidget = SParamPlotWidget( parent=self, result=self._instrumentController.result) self._psmPlotWidget = PsmPlotWidget( parent=self, result=self._instrumentController.result) self._attPlotWidget = AttPlotWidget( parent=self, result=self._instrumentController.result) self._rmsePlotWidget = ErrorPlotWidget( parent=self, result=self._instrumentController.result) self._statWidget = StatWidget(parent=self, result=self._instrumentController.result) # init UI self._ui.layInstrs.insertWidget(0, self._connectionWidget) self._ui.layInstrs.insertWidget(1, self._measureWidget) self._ui.layInstrs.insertWidget(2, self._statWidget, 10) self._ui.tabWidget.insertTab(0, self._sParamPlotWidget, 'S-параметры') self._ui.tabWidget.insertTab(1, self._psmPlotWidget, 'Отклик фазовращателя') self._ui.tabWidget.insertTab(2, self._attPlotWidget, 'Отклик аттенюатора') self._ui.tabWidget.insertTab(3, self._rmsePlotWidget, 'Амп. и фаз. ошибки') self._init()
def __init__(self, parent=None): super().__init__(parent) self.setAttribute(Qt.WA_QuitOnClose) self.setAttribute(Qt.WA_DeleteOnClose) # create instance variables self._ui = uic.loadUi('mainwindow.ui', self) self._instrumentController = InstrumentController(parent=self) self._connectionWidget = ConnectionWidget(parent=self, controller=self._instrumentController) self._measureWidget = MeasureWidgetWithSecondaryParameters(parent=self, controller=self._instrumentController) self._powSweepWidget = make_sweep_widget('pow', parent=self, controller=self._instrumentController) self._freqSweepWidget = make_sweep_widget('freq', parent=self, controller=self._instrumentController) self._measureModel = MeasureModel(parent=self, controller=self._instrumentController) # init UI self._ui.layInstrs.insertWidget(0, self._connectionWidget) self._ui.layInstrs.insertWidget(1, self._measureWidget) self._ui.tabWidget.insertTab(0, self._powSweepWidget, 'По мощности') self._ui.tabWidget.insertTab(1, self._freqSweepWidget, 'По частоте') self._ui.tabWidget.setCurrentIndex(0) self._init()