From 18d9af201d0d43eaea7df98ce8bacd2ed432ab02 Mon Sep 17 00:00:00 2001 From: jupfi Date: Mon, 17 Jul 2023 15:54:35 +0200 Subject: [PATCH] Improved layout. --- src/nqrduck_broadband/controller.py | 8 + .../resources/broadband_widget.ui | 678 +++++++++--------- src/nqrduck_broadband/view.py | 12 +- src/nqrduck_broadband/widget.py | 149 ++-- 4 files changed, 425 insertions(+), 422 deletions(-) diff --git a/src/nqrduck_broadband/controller.py b/src/nqrduck_broadband/controller.py index b853178..6ea0a07 100644 --- a/src/nqrduck_broadband/controller.py +++ b/src/nqrduck_broadband/controller.py @@ -1,5 +1,6 @@ import logging from PyQt6.QtCore import pyqtSlot, pyqtSignal +from nqrduck_spectrometer.measurement import Measurement from nqrduck.module.module_controller import ModuleController logger = logging.getLogger(__name__) @@ -13,6 +14,13 @@ class BroadbandController(ModuleController): def __init__(self, module): super().__init__(module) + @pyqtSlot(str, object) + def process_signals(self, key: str, value: Measurement): + if key == "measurement_data": + logger.debug("Received single measurement.") + self.module.model.single_measurement = value + + @pyqtSlot(str) def change_start_frequency(self, value): value = float(value) diff --git a/src/nqrduck_broadband/resources/broadband_widget.ui b/src/nqrduck_broadband/resources/broadband_widget.ui index dcc7e98..84db5a1 100644 --- a/src/nqrduck_broadband/resources/broadband_widget.ui +++ b/src/nqrduck_broadband/resources/broadband_widget.ui @@ -6,376 +6,338 @@ 0 0 - 1280 - 645 + 1920 + 1080 + + + 0 + 0 + + Form - - - - 310 - 0 - 831 - 651 - - - - - - - - - - - - - - - - - - - - - - 0 - 0 - 311 - 651 - - - - - - - - - - 12 - 50 - false - false - - - - Measurement Settings: - - - Qt::AlignCenter - - - - - - - - - Start Frequency: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::LeftToRight - - - 50.0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - MHz - - - - - - - - - - - Stop Frequency: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 70.0 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - MHz - - - - - - - - - - - Frequency Step: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0.1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - MHz - - - - - - - - - - - Averages: - - - - - - - Qt::Horizontal - - - - 80 - 20 - - - - - - - - 1000 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 75 - 20 - - - - - - - - - - Start Measurement - - - - - - - - - - - - 12 - 50 - false - false - - - - Sequence Settings: - - - Qt::AlignCenter - - - - - - - Load TNMR File - - - - - - - - - - - - - - - - - 12 - - - - Info Box: - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - true - - - - - 0 - 0 - 301 - 256 - + + + + + QLayout::SetDefaultConstraint + + + + + + + + 12 + 50 + false + false + + + + Measurement Settings: + + + Qt::AlignCenter + + + + + + + + + Start Frequency: - - - - - - - - + + + + + Qt::LeftToRight + + + 50.0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + MHz + + + + + + + + + + + Stop Frequency: + + + + + + + 70.0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + MHz + + + + + + + + + + + Frequency Step: + + + + + + + 0.1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + MHz + + + + + + + + + + + Averages: + + + + + + + Qt::Horizontal + + + + 32 + 20 + + + + + + + + 1000 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + + + Start Measurement + + + + + + + + + + + + 12 + 50 + false + false + + + + Sequence Settings: + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Load TNMR File + + + + + + + + + + + + + + + + + 12 + + + + Info Box: + + + Qt::AlignCenter + + + + + + + 0 + + + + + + + true + + + + + 0 + 0 + 281 + 673 + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + MplWidget QWidget -
contrib/mplwidget.h
+
nqrduck/contrib/mplwidget.h
1
diff --git a/src/nqrduck_broadband/view.py b/src/nqrduck_broadband/view.py index c05b54a..cb03334 100644 --- a/src/nqrduck_broadband/view.py +++ b/src/nqrduck_broadband/view.py @@ -1,5 +1,5 @@ import logging -from PyQt6.QtCore import QMetaMethod, pyqtSlot, pyqtSignal +from PyQt6.QtCore import pyqtSlot, pyqtSignal from PyQt6.QtWidgets import QWidget, QMessageBox from nqrduck.module.module_view import ModuleView @@ -20,9 +20,10 @@ class BroadbandView(ModuleView): self._ui_form.setupUi(self) self.widget = widget - self._connect_signals() - + logger.debug("Facecolor %s" % str(self._ui_form.broadbandPlot.canvas.ax.get_facecolor())) + self._connect_signals() + self.init_plots() def _connect_signals(self) -> None: @@ -60,24 +61,27 @@ class BroadbandView(ModuleView): self.start_measurement.emit() def init_plots(self): + # Initialization of broadband spectrum self._ui_form.broadbandPlot.canvas.ax.set_title("Broadband Spectrum") self._ui_form.broadbandPlot.canvas.ax.set_xlim([0, 250]) self._ui_form.broadbandPlot.canvas.ax.set_xlabel("Frequency in MHz") self._ui_form.broadbandPlot.canvas.ax.set_ylabel("Amplitude a.u.") - # Make height of the broadbandPlot a little bit larger + self._ui_form.broadbandPlot.canvas.ax.grid() # Initialization of last measurement time domain self._ui_form.time_domainPlot.canvas.ax.set_title("Last Time Domain") self._ui_form.time_domainPlot.canvas.ax.set_xlim([0, 250]) self._ui_form.time_domainPlot.canvas.ax.set_xlabel("time in us") self._ui_form.time_domainPlot.canvas.ax.set_ylabel("Amplitude a.u.") + self._ui_form.time_domainPlot.canvas.ax.grid() # Initialization of last measurement frequency domain self._ui_form.frequency_domainPlot.canvas.ax.set_title("Last Frequency Domain") self._ui_form.frequency_domainPlot.canvas.ax.set_xlim([0, 250]) self._ui_form.frequency_domainPlot.canvas.ax.set_xlabel("time in us") self._ui_form.frequency_domainPlot.canvas.ax.set_ylabel("Amplitude a.u.") + self._ui_form.frequency_domainPlot.canvas.ax.grid() @pyqtSlot(float) def on_start_frequency_change(self, start_frequency): diff --git a/src/nqrduck_broadband/widget.py b/src/nqrduck_broadband/widget.py index bd1fa4b..2921af1 100644 --- a/src/nqrduck_broadband/widget.py +++ b/src/nqrduck_broadband/widget.py @@ -12,34 +12,20 @@ from PyQt6 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") - Form.resize(1280, 645) - self.verticalLayoutWidget_5 = QtWidgets.QWidget(parent=Form) - self.verticalLayoutWidget_5.setGeometry(QtCore.QRect(310, 0, 831, 651)) - self.verticalLayoutWidget_5.setObjectName("verticalLayoutWidget_5") - self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_5) - self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.broadbandPlot = MplWidget(parent=self.verticalLayoutWidget_5) - self.broadbandPlot.setObjectName("broadbandPlot") - self.verticalLayout_5.addWidget(self.broadbandPlot) - self.horizontalLayout_5 = QtWidgets.QHBoxLayout() - self.horizontalLayout_5.setObjectName("horizontalLayout_5") - self.time_domainPlot = MplWidget(parent=self.verticalLayoutWidget_5) - self.time_domainPlot.setObjectName("time_domainPlot") - self.horizontalLayout_5.addWidget(self.time_domainPlot) - self.frequency_domainPlot = MplWidget(parent=self.verticalLayoutWidget_5) - self.frequency_domainPlot.setObjectName("frequency_domainPlot") - self.horizontalLayout_5.addWidget(self.frequency_domainPlot) - self.verticalLayout_5.addLayout(self.horizontalLayout_5) - self.verticalLayoutWidget_4 = QtWidgets.QWidget(parent=Form) - self.verticalLayoutWidget_4.setGeometry(QtCore.QRect(0, 0, 311, 651)) - self.verticalLayoutWidget_4.setObjectName("verticalLayoutWidget_4") - self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_4) - self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) + Form.resize(1920, 1080) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth()) + Form.setSizePolicy(sizePolicy) + self.horizontalLayout_6 = QtWidgets.QHBoxLayout(Form) + self.horizontalLayout_6.setObjectName("horizontalLayout_6") + self.verticalLayout_4 = QtWidgets.QVBoxLayout() + self.verticalLayout_4.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) self.verticalLayout_4.setObjectName("verticalLayout_4") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") - self.label_8 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_8 = QtWidgets.QLabel(parent=Form) font = QtGui.QFont() font.setPointSize(12) font.setBold(False) @@ -51,77 +37,74 @@ class Ui_Form(object): self.verticalLayout.addWidget(self.label_8) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") - self.label = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label = QtWidgets.QLabel(parent=Form) self.label.setObjectName("label") self.horizontalLayout.addWidget(self.label) - spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout.addItem(spacerItem) - self.start_frequencyField = QtWidgets.QLineEdit(parent=self.verticalLayoutWidget_4) + self.start_frequencyField = QtWidgets.QLineEdit(parent=Form) self.start_frequencyField.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight) self.start_frequencyField.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) self.start_frequencyField.setObjectName("start_frequencyField") self.horizontalLayout.addWidget(self.start_frequencyField) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout.addItem(spacerItem1) - self.label_2 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_2 = QtWidgets.QLabel(parent=Form) self.label_2.setObjectName("label_2") self.horizontalLayout.addWidget(self.label_2) + self.horizontalLayout.setStretch(2, 1) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.label_3 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_3 = QtWidgets.QLabel(parent=Form) self.label_3.setObjectName("label_3") self.horizontalLayout_2.addWidget(self.label_3) - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_2.addItem(spacerItem2) - self.stop_frequencyField = QtWidgets.QLineEdit(parent=self.verticalLayoutWidget_4) + self.stop_frequencyField = QtWidgets.QLineEdit(parent=Form) self.stop_frequencyField.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) self.stop_frequencyField.setObjectName("stop_frequencyField") self.horizontalLayout_2.addWidget(self.stop_frequencyField) - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_2.addItem(spacerItem3) - self.label_4 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_4 = QtWidgets.QLabel(parent=Form) self.label_4.setObjectName("label_4") self.horizontalLayout_2.addWidget(self.label_4) + self.horizontalLayout_2.setStretch(2, 1) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.label_5 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_5 = QtWidgets.QLabel(parent=Form) self.label_5.setObjectName("label_5") self.horizontalLayout_3.addWidget(self.label_5) - spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_3.addItem(spacerItem4) - self.frequency_stepField = QtWidgets.QLineEdit(parent=self.verticalLayoutWidget_4) + self.frequency_stepField = QtWidgets.QLineEdit(parent=Form) self.frequency_stepField.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) self.frequency_stepField.setObjectName("frequency_stepField") self.horizontalLayout_3.addWidget(self.frequency_stepField) - spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_3.addItem(spacerItem5) - self.label_6 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_6 = QtWidgets.QLabel(parent=Form) self.label_6.setObjectName("label_6") self.horizontalLayout_3.addWidget(self.label_6) + self.horizontalLayout_3.setStretch(2, 1) self.verticalLayout.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") - self.label_7 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_7 = QtWidgets.QLabel(parent=Form) self.label_7.setObjectName("label_7") self.horizontalLayout_4.addWidget(self.label_7) - spacerItem6 = QtWidgets.QSpacerItem(80, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_4.addItem(spacerItem6) - self.averagesField = QtWidgets.QLineEdit(parent=self.verticalLayoutWidget_4) + spacerItem = QtWidgets.QSpacerItem(32, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_4.addItem(spacerItem) + self.averagesField = QtWidgets.QLineEdit(parent=Form) self.averagesField.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) self.averagesField.setObjectName("averagesField") self.horizontalLayout_4.addWidget(self.averagesField) - spacerItem7 = QtWidgets.QSpacerItem(75, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) - self.horizontalLayout_4.addItem(spacerItem7) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) + self.horizontalLayout_4.addItem(spacerItem1) + self.horizontalLayout_4.setStretch(3, 1) self.verticalLayout.addLayout(self.horizontalLayout_4) - self.start_measurementButton = QtWidgets.QPushButton(parent=self.verticalLayoutWidget_4) + self.start_measurementButton = QtWidgets.QPushButton(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.start_measurementButton.sizePolicy().hasHeightForWidth()) + self.start_measurementButton.setSizePolicy(sizePolicy) self.start_measurementButton.setObjectName("start_measurementButton") self.verticalLayout.addWidget(self.start_measurementButton) self.verticalLayout_4.addLayout(self.verticalLayout) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") - self.label_10 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_10 = QtWidgets.QLabel(parent=Form) font = QtGui.QFont() font.setPointSize(12) font.setBold(False) @@ -131,36 +114,82 @@ class Ui_Form(object): self.label_10.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) self.label_10.setObjectName("label_10") self.verticalLayout_3.addWidget(self.label_10) - self.load_fileButton = QtWidgets.QPushButton(parent=self.verticalLayoutWidget_4) + self.load_fileButton = QtWidgets.QPushButton(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.load_fileButton.sizePolicy().hasHeightForWidth()) + self.load_fileButton.setSizePolicy(sizePolicy) self.load_fileButton.setObjectName("load_fileButton") self.verticalLayout_3.addWidget(self.load_fileButton) - self.file_pathLabel = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.file_pathLabel = QtWidgets.QLabel(parent=Form) self.file_pathLabel.setText("") self.file_pathLabel.setObjectName("file_pathLabel") self.verticalLayout_3.addWidget(self.file_pathLabel) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") - self.label_9 = QtWidgets.QLabel(parent=self.verticalLayoutWidget_4) + self.label_9 = QtWidgets.QLabel(parent=Form) font = QtGui.QFont() font.setPointSize(12) self.label_9.setFont(font) self.label_9.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) self.label_9.setObjectName("label_9") self.verticalLayout_2.addWidget(self.label_9) - self.measurementProgress = QtWidgets.QProgressBar(parent=self.verticalLayoutWidget_4) + self.measurementProgress = QtWidgets.QProgressBar(parent=Form) self.measurementProgress.setProperty("value", 0) self.measurementProgress.setObjectName("measurementProgress") self.verticalLayout_2.addWidget(self.measurementProgress) - self.infoBox = QtWidgets.QScrollArea(parent=self.verticalLayoutWidget_4) + self.infoBox = QtWidgets.QScrollArea(parent=Form) self.infoBox.setWidgetResizable(True) self.infoBox.setObjectName("infoBox") self.scrollAreaWidgetContents = QtWidgets.QWidget() - self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 301, 256)) + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 281, 673)) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.scrollAreaWidgetContents.sizePolicy().hasHeightForWidth()) + self.scrollAreaWidgetContents.setSizePolicy(sizePolicy) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.infoBox.setWidget(self.scrollAreaWidgetContents) self.verticalLayout_2.addWidget(self.infoBox) + self.verticalLayout_2.setStretch(2, 1) self.verticalLayout_3.addLayout(self.verticalLayout_2) + self.verticalLayout_3.setStretch(3, 1) self.verticalLayout_4.addLayout(self.verticalLayout_3) + self.verticalLayout_4.setStretch(1, 1) + self.horizontalLayout_6.addLayout(self.verticalLayout_4) + self.verticalLayout_5 = QtWidgets.QVBoxLayout() + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.broadbandPlot = MplWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.broadbandPlot.sizePolicy().hasHeightForWidth()) + self.broadbandPlot.setSizePolicy(sizePolicy) + self.broadbandPlot.setMinimumSize(QtCore.QSize(0, 0)) + self.broadbandPlot.setObjectName("broadbandPlot") + self.verticalLayout_5.addWidget(self.broadbandPlot) + self.horizontalLayout_5 = QtWidgets.QHBoxLayout() + self.horizontalLayout_5.setObjectName("horizontalLayout_5") + self.time_domainPlot = MplWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.time_domainPlot.sizePolicy().hasHeightForWidth()) + self.time_domainPlot.setSizePolicy(sizePolicy) + self.time_domainPlot.setObjectName("time_domainPlot") + self.horizontalLayout_5.addWidget(self.time_domainPlot) + self.frequency_domainPlot = MplWidget(parent=Form) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.frequency_domainPlot.sizePolicy().hasHeightForWidth()) + self.frequency_domainPlot.setSizePolicy(sizePolicy) + self.frequency_domainPlot.setObjectName("frequency_domainPlot") + self.horizontalLayout_5.addWidget(self.frequency_domainPlot) + self.verticalLayout_5.addLayout(self.horizontalLayout_5) + self.horizontalLayout_6.addLayout(self.verticalLayout_5) + self.horizontalLayout_6.setStretch(1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)