From b0ddbae9c54c1b8b2c33aab6d8bf1d7c8559ea9f Mon Sep 17 00:00:00 2001 From: jupfi Date: Mon, 21 Aug 2023 11:40:43 +0200 Subject: [PATCH] Updated widget. --- src/nqrduck_autotm/resources/autotm_widget.ui | 118 +++++++++++++++++- src/nqrduck_autotm/view.py | 2 +- src/nqrduck_autotm/widget.py | 62 ++++++++- 3 files changed, 172 insertions(+), 10 deletions(-) diff --git a/src/nqrduck_autotm/resources/autotm_widget.ui b/src/nqrduck_autotm/resources/autotm_widget.ui index 2869e08..2b2838b 100644 --- a/src/nqrduck_autotm/resources/autotm_widget.ui +++ b/src/nqrduck_autotm/resources/autotm_widget.ui @@ -97,14 +97,114 @@ Mechanical - + - + + + + + Home + + + + + + + Step Size: + + + + + + + -1000 + + + 1000 + + + 500 + + + + + + + Tuning Stepper: + + + + + + + - + + + + + + + + + + + + + + + Matching Stepper: + + + + + + + - + + + + + + + + + + + + + + + Home + + + + + + + Stepper Control: + + + + + + + - Homing + Start Position + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -257,7 +357,11 @@ - + + + 80 + + @@ -267,7 +371,11 @@ - + + + 100 + + diff --git a/src/nqrduck_autotm/view.py b/src/nqrduck_autotm/view.py index 06e0d5a..8aa6707 100644 --- a/src/nqrduck_autotm/view.py +++ b/src/nqrduck_autotm/view.py @@ -100,7 +100,7 @@ class AutoTMView(ModuleView): ) # On clicking of the homingButton call the homing method - self._ui_form.homingButton.clicked.connect(self.module.controller.homing) + self._ui_form.starpositionButton.clicked.connect(self.module.controller.homing) # Connect the measurement finished signal to the plot_measurement slot self.module.model.measurement_finished.connect(self.plot_measurement) diff --git a/src/nqrduck_autotm/widget.py b/src/nqrduck_autotm/widget.py index b8e3758..d0a4ac4 100644 --- a/src/nqrduck_autotm/widget.py +++ b/src/nqrduck_autotm/widget.py @@ -62,9 +62,51 @@ class Ui_Form(object): self.mechTab.setObjectName("mechTab") self.verticalLayout = QtWidgets.QVBoxLayout(self.mechTab) self.verticalLayout.setObjectName("verticalLayout") - self.homingButton = QtWidgets.QPushButton(parent=self.mechTab) - self.homingButton.setObjectName("homingButton") - self.verticalLayout.addWidget(self.homingButton) + self.gridLayout_4 = QtWidgets.QGridLayout() + self.gridLayout_4.setObjectName("gridLayout_4") + self.homematcherButton = QtWidgets.QPushButton(parent=self.mechTab) + self.homematcherButton.setObjectName("homematcherButton") + self.gridLayout_4.addWidget(self.homematcherButton, 5, 1, 1, 1) + self.label_17 = QtWidgets.QLabel(parent=self.mechTab) + self.label_17.setObjectName("label_17") + self.gridLayout_4.addWidget(self.label_17, 1, 0, 1, 1) + self.stepsizeBox = QtWidgets.QSpinBox(parent=self.mechTab) + self.stepsizeBox.setMinimum(-1000) + self.stepsizeBox.setMaximum(1000) + self.stepsizeBox.setProperty("value", 500) + self.stepsizeBox.setObjectName("stepsizeBox") + self.gridLayout_4.addWidget(self.stepsizeBox, 1, 1, 1, 1) + self.label_18 = QtWidgets.QLabel(parent=self.mechTab) + self.label_18.setObjectName("label_18") + self.gridLayout_4.addWidget(self.label_18, 2, 0, 1, 3) + self.decreasetunerButton = QtWidgets.QPushButton(parent=self.mechTab) + self.decreasetunerButton.setObjectName("decreasetunerButton") + self.gridLayout_4.addWidget(self.decreasetunerButton, 3, 0, 1, 1) + self.increasetunerButton = QtWidgets.QPushButton(parent=self.mechTab) + self.increasetunerButton.setObjectName("increasetunerButton") + self.gridLayout_4.addWidget(self.increasetunerButton, 3, 2, 1, 1) + self.label_19 = QtWidgets.QLabel(parent=self.mechTab) + self.label_19.setObjectName("label_19") + self.gridLayout_4.addWidget(self.label_19, 4, 0, 1, 3) + self.decreasematcherButton = QtWidgets.QPushButton(parent=self.mechTab) + self.decreasematcherButton.setObjectName("decreasematcherButton") + self.gridLayout_4.addWidget(self.decreasematcherButton, 5, 0, 1, 1) + self.increasematcherButton = QtWidgets.QPushButton(parent=self.mechTab) + self.increasematcherButton.setObjectName("increasematcherButton") + self.gridLayout_4.addWidget(self.increasematcherButton, 5, 2, 1, 1) + self.hometunerButton = QtWidgets.QPushButton(parent=self.mechTab) + self.hometunerButton.setObjectName("hometunerButton") + self.gridLayout_4.addWidget(self.hometunerButton, 3, 1, 1, 1) + self.label_16 = QtWidgets.QLabel(parent=self.mechTab) + self.label_16.setObjectName("label_16") + self.gridLayout_4.addWidget(self.label_16, 0, 0, 1, 3) + self.verticalLayout.addLayout(self.gridLayout_4) + self.starpositionButton = QtWidgets.QPushButton(parent=self.mechTab) + self.starpositionButton.setObjectName("starpositionButton") + self.verticalLayout.addWidget(self.starpositionButton) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout.addItem(spacerItem) + self.verticalLayout.setStretch(1, 1) self.typeTab.addTab(self.mechTab, "") self.elecTab = QtWidgets.QWidget() self.elecTab.setObjectName("elecTab") @@ -215,7 +257,17 @@ class Ui_Form(object): self.label_10.setText(_translate("Form", "Connected to:")) self.connectButton.setText(_translate("Form", "Connect")) self.titletypeLabel.setText(_translate("Form", "T&M Type:")) - self.homingButton.setText(_translate("Form", "Homing")) + self.homematcherButton.setText(_translate("Form", "Home")) + self.label_17.setText(_translate("Form", "Step Size:")) + self.label_18.setText(_translate("Form", "Tuning Stepper:")) + self.decreasetunerButton.setText(_translate("Form", "-")) + self.increasetunerButton.setText(_translate("Form", "+")) + self.label_19.setText(_translate("Form", "Matching Stepper:")) + self.decreasematcherButton.setText(_translate("Form", "-")) + self.increasematcherButton.setText(_translate("Form", "+")) + self.hometunerButton.setText(_translate("Form", "Home")) + self.label_16.setText(_translate("Form", "Stepper Control:")) + self.starpositionButton.setText(_translate("Form", "Start Position")) self.typeTab.setTabText(self.typeTab.indexOf(self.mechTab), _translate("Form", "Mechanical")) self.label_4.setText(_translate("Form", "Voltage Resolution")) self.label_2.setText(_translate("Form", "Voltage Tuning")) @@ -233,7 +285,9 @@ class Ui_Form(object): self.switchATMButton.setText(_translate("Form", "ATM")) self.typeTab.setTabText(self.typeTab.indexOf(self.elecTab), _translate("Form", "Electrical")) self.titlefrequencyLabel.setText(_translate("Form", "Frequency Sweep:")) + self.startEdit.setText(_translate("Form", "80")) self.label_8.setText(_translate("Form", "MHz")) + self.stopEdit.setText(_translate("Form", "100")) self.label_6.setText(_translate("Form", "MHz")) self.label_7.setText(_translate("Form", "Stop Frequency:")) self.label_5.setText(_translate("Form", "Start Frequency:"))