mirror of
https://github.com/nqrduck/nqrduck-broadband.git
synced 2024-12-22 15:47:49 +00:00
Improved layout.
This commit is contained in:
parent
2c6fa5836b
commit
18d9af201d
4 changed files with 425 additions and 422 deletions
|
@ -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)
|
||||
|
|
|
@ -6,376 +6,338 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>645</height>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>0</y>
|
||||
<width>831</width>
|
||||
<height>651</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="MplWidget" name="broadbandPlot" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="MplWidget" name="time_domainPlot" native="true"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MplWidget" name="frequency_domainPlot" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>311</width>
|
||||
<height>651</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Measurement Settings:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Start Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="start_frequencyField">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>50.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Stop Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="stop_frequencyField">
|
||||
<property name="text">
|
||||
<string>70.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Frequency Step:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="frequency_stepField">
|
||||
<property name="text">
|
||||
<string>0.1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Averages:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="averagesField">
|
||||
<property name="text">
|
||||
<string>1000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="start_measurementButton">
|
||||
<property name="text">
|
||||
<string>Start Measurement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sequence Settings:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="load_fileButton">
|
||||
<property name="text">
|
||||
<string>Load TNMR File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="file_pathLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Info Box:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="measurementProgress">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="infoBox">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>256</height>
|
||||
</rect>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6" stretch="0,1">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,1">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Measurement Settings:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Start Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="start_frequencyField">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>50.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Stop Frequency:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="stop_frequencyField">
|
||||
<property name="text">
|
||||
<string>70.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Frequency Step:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="frequency_stepField">
|
||||
<property name="text">
|
||||
<string>0.1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>MHz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Averages:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="averagesField">
|
||||
<property name="text">
|
||||
<string>1000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="start_measurementButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start Measurement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sequence Settings:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="load_fileButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Load TNMR File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="file_pathLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Info Box:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="measurementProgress">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="infoBox">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>281</width>
|
||||
<height>673</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="MplWidget" name="broadbandPlot" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="MplWidget" name="time_domainPlot" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MplWidget" name="frequency_domainPlot" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MplWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>contrib/mplwidget.h</header>
|
||||
<header>nqrduck/contrib/mplwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue