diff --git a/QtTSApreferences.py b/QtTSApreferences.py index 72f9480..2f0a4f1 100644 --- a/QtTSApreferences.py +++ b/QtTSApreferences.py @@ -14,117 +14,112 @@ class Ui_Preferences(object): def setupUi(self, Preferences): Preferences.setObjectName("Preferences") - Preferences.resize(412, 701) - self.gridLayout_2 = QtWidgets.QGridLayout(Preferences) - self.gridLayout_2.setObjectName("gridLayout_2") - self.gridLayout = QtWidgets.QGridLayout() + Preferences.resize(800, 600) + self.layoutWidget = QtWidgets.QWidget(Preferences) + self.layoutWidget.setGeometry(QtCore.QRect(10, 10, 411, 572)) + self.layoutWidget.setObjectName("layoutWidget") + self.gridLayout = QtWidgets.QGridLayout(self.layoutWidget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") - self.lowLO = QtWidgets.QRadioButton(Preferences) - self.lowLO.setChecked(True) - self.lowLO.setObjectName("lowLO") - self.buttonGroup = QtWidgets.QButtonGroup(Preferences) - self.buttonGroup.setObjectName("buttonGroup") - self.buttonGroup.addButton(self.lowLO) - self.gridLayout.addWidget(self.lowLO, 17, 3, 1, 1) - self.label_3 = QtWidgets.QLabel(Preferences) - self.label_3.setObjectName("label_3") - self.gridLayout.addWidget(self.label_3, 14, 0, 1, 2) - self.label_14 = QtWidgets.QLabel(Preferences) + self.label_5 = QtWidgets.QLabel(self.layoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) + self.label_5.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setBold(True) font.setWeight(75) - self.label_14.setFont(font) - self.label_14.setObjectName("label_14") - self.gridLayout.addWidget(self.label_14, 16, 0, 1, 2) - self.freqBands = QtWidgets.QTableView(Preferences) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.label_5.setFont(font) + self.label_5.setObjectName("label_5") + self.gridLayout.addWidget(self.label_5, 0, 0, 1, 3) + self.addRow = QtWidgets.QPushButton(self.layoutWidget) + self.addRow.setEnabled(True) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.addRow.sizePolicy().hasHeightForWidth()) + self.addRow.setSizePolicy(sizePolicy) + self.addRow.setObjectName("addRow") + self.gridLayout.addWidget(self.addRow, 4, 2, 1, 1) + self.freqBands = QtWidgets.QTableView(self.layoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.freqBands.sizePolicy().hasHeightForWidth()) self.freqBands.setSizePolicy(sizePolicy) + self.freqBands.setMinimumSize(QtCore.QSize(0, 450)) self.freqBands.setObjectName("freqBands") - self.gridLayout.addWidget(self.freqBands, 2, 0, 2, 4) - self.deleteRow = QtWidgets.QPushButton(Preferences) + self.gridLayout.addWidget(self.freqBands, 1, 0, 2, 4) + self.deleteRow = QtWidgets.QPushButton(self.layoutWidget) self.deleteRow.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.deleteRow.sizePolicy().hasHeightForWidth()) self.deleteRow.setSizePolicy(sizePolicy) self.deleteRow.setObjectName("deleteRow") - self.gridLayout.addWidget(self.deleteRow, 5, 3, 1, 1) - self.label = QtWidgets.QLabel(Preferences) - self.label.setObjectName("label") - self.gridLayout.addWidget(self.label, 13, 0, 1, 2) - self.label_2 = QtWidgets.QLabel(Preferences) - self.label_2.setObjectName("label_2") - self.gridLayout.addWidget(self.label_2, 11, 0, 1, 2) - self.label_10 = QtWidgets.QLabel(Preferences) - self.label_10.setObjectName("label_10") - self.gridLayout.addWidget(self.label_10, 8, 0, 1, 2) - self.addRow = QtWidgets.QPushButton(Preferences) - self.addRow.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) + self.gridLayout.addWidget(self.deleteRow, 4, 3, 1, 1) + self.deleteAll = QtWidgets.QPushButton(self.layoutWidget) + self.deleteAll.setObjectName("deleteAll") + self.gridLayout.addWidget(self.deleteAll, 5, 3, 1, 1) + self.label_12 = QtWidgets.QLabel(self.layoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.addRow.sizePolicy().hasHeightForWidth()) - self.addRow.setSizePolicy(sizePolicy) - self.addRow.setObjectName("addRow") - self.gridLayout.addWidget(self.addRow, 5, 2, 1, 1) - self.label_11 = QtWidgets.QLabel(Preferences) - self.label_11.setObjectName("label_11") - self.gridLayout.addWidget(self.label_11, 7, 0, 1, 2) - self.label_13 = QtWidgets.QLabel(Preferences) - self.label_13.setObjectName("label_13") - self.gridLayout.addWidget(self.label_13, 17, 0, 1, 2) - self.label_12 = QtWidgets.QLabel(Preferences) + sizePolicy.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth()) + self.label_12.setSizePolicy(sizePolicy) self.label_12.setObjectName("label_12") - self.gridLayout.addWidget(self.label_12, 1, 0, 1, 1) - self.zeroLine = QtWidgets.QCheckBox(Preferences) - self.zeroLine.setChecked(False) - self.zeroLine.setObjectName("zeroLine") - self.gridLayout.addWidget(self.zeroLine, 8, 3, 1, 1) - self.highLO = QtWidgets.QRadioButton(Preferences) - self.highLO.setObjectName("highLO") - self.buttonGroup.addButton(self.highLO) - self.gridLayout.addWidget(self.highLO, 17, 2, 1, 1) - self.neg25Line = QtWidgets.QCheckBox(Preferences) - self.neg25Line.setChecked(False) - self.neg25Line.setObjectName("neg25Line") - self.gridLayout.addWidget(self.neg25Line, 9, 3, 1, 1) - self.label_7 = QtWidgets.QLabel(Preferences) - font = QtGui.QFont() - font.setBold(True) - font.setWeight(75) - self.label_7.setFont(font) - self.label_7.setObjectName("label_7") - self.gridLayout.addWidget(self.label_7, 10, 0, 1, 2) - self.importButton = QtWidgets.QPushButton(Preferences) + self.gridLayout.addWidget(self.label_12, 3, 0, 1, 1) + self.filterBox = QtWidgets.QComboBox(self.layoutWidget) + self.filterBox.setObjectName("filterBox") + self.gridLayout.addWidget(self.filterBox, 3, 1, 1, 1) + self.exportButton = QtWidgets.QPushButton(self.layoutWidget) + self.exportButton.setEnabled(True) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.exportButton.sizePolicy().hasHeightForWidth()) + self.exportButton.setSizePolicy(sizePolicy) + self.exportButton.setObjectName("exportButton") + self.gridLayout.addWidget(self.exportButton, 4, 1, 1, 1) + self.importButton = QtWidgets.QPushButton(self.layoutWidget) self.importButton.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.importButton.sizePolicy().hasHeightForWidth()) self.importButton.setSizePolicy(sizePolicy) self.importButton.setObjectName("importButton") - self.gridLayout.addWidget(self.importButton, 5, 0, 1, 1) - self.filterBox = QtWidgets.QComboBox(Preferences) - self.filterBox.setObjectName("filterBox") - self.gridLayout.addWidget(self.filterBox, 1, 1, 1, 1) - self.label_4 = QtWidgets.QLabel(Preferences) - self.label_4.setObjectName("label_4") - self.gridLayout.addWidget(self.label_4, 15, 0, 1, 2) - self.label_9 = QtWidgets.QLabel(Preferences) - self.label_9.setObjectName("label_9") - self.gridLayout.addWidget(self.label_9, 9, 0, 1, 2) - self.label_5 = QtWidgets.QLabel(Preferences) + self.gridLayout.addWidget(self.importButton, 4, 0, 1, 1) + self.layoutWidget1 = QtWidgets.QWidget(Preferences) + self.layoutWidget1.setGeometry(QtCore.QRect(440, 10, 356, 571)) + self.layoutWidget1.setObjectName("layoutWidget1") + self.gridLayout_2 = QtWidgets.QGridLayout(self.layoutWidget1) + self.gridLayout_2.setContentsMargins(0, 0, 0, 0) + self.gridLayout_2.setObjectName("gridLayout_2") + self.zeroLine = QtWidgets.QCheckBox(self.layoutWidget1) + self.zeroLine.setChecked(False) + self.zeroLine.setObjectName("zeroLine") + self.gridLayout_2.addWidget(self.zeroLine, 2, 1, 1, 1) + self.label = QtWidgets.QLabel(self.layoutWidget1) + self.label.setObjectName("label") + self.gridLayout_2.addWidget(self.label, 7, 0, 1, 1) + self.minPoints = QtWidgets.QSpinBox(self.layoutWidget1) + self.minPoints.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons) + self.minPoints.setMinimum(25) + self.minPoints.setMaximum(450) + self.minPoints.setProperty("value", 450) + self.minPoints.setObjectName("minPoints") + self.gridLayout_2.addWidget(self.minPoints, 8, 1, 1, 1) + self.label_14 = QtWidgets.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setBold(True) font.setWeight(75) - self.label_5.setFont(font) - self.label_5.setObjectName("label_5") - self.gridLayout.addWidget(self.label_5, 0, 0, 1, 2) - self.peakThreshold = QtWidgets.QSpinBox(Preferences) + self.label_14.setFont(font) + self.label_14.setObjectName("label_14") + self.gridLayout_2.addWidget(self.label_14, 10, 0, 1, 2) + self.peakThreshold = QtWidgets.QSpinBox(self.layoutWidget1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -139,64 +134,89 @@ def setupUi(self, Preferences): self.peakThreshold.setMaximum(-20) self.peakThreshold.setProperty("value", -90) self.peakThreshold.setObjectName("peakThreshold") - self.gridLayout.addWidget(self.peakThreshold, 11, 3, 1, 1) - self.maxPoints = QtWidgets.QSpinBox(Preferences) - self.maxPoints.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons) - self.maxPoints.setMinimum(25) - self.maxPoints.setMaximum(100000) - self.maxPoints.setProperty("value", 30000) - self.maxPoints.setObjectName("maxPoints") - self.gridLayout.addWidget(self.maxPoints, 15, 3, 1, 1) - self.plus6Line = QtWidgets.QCheckBox(Preferences) - self.plus6Line.setChecked(False) - self.plus6Line.setObjectName("plus6Line") - self.gridLayout.addWidget(self.plus6Line, 7, 3, 1, 1) - self.minPoints = QtWidgets.QSpinBox(Preferences) - self.minPoints.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons) - self.minPoints.setMinimum(25) - self.minPoints.setMaximum(450) - self.minPoints.setProperty("value", 450) - self.minPoints.setObjectName("minPoints") - self.gridLayout.addWidget(self.minPoints, 14, 3, 1, 1) - self.rbw_x = QtWidgets.QSpinBox(Preferences) + self.gridLayout_2.addWidget(self.peakThreshold, 5, 1, 1, 1) + spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_2.addItem(spacerItem, 16, 0, 1, 1) + self.freqLO = QtWidgets.QDoubleSpinBox(self.layoutWidget1) + self.freqLO.setDecimals(6) + self.freqLO.setMinimum(0.0) + self.freqLO.setMaximum(100000.0) + self.freqLO.setProperty("value", 0.0) + self.freqLO.setObjectName("freqLO") + self.gridLayout_2.addWidget(self.freqLO, 12, 1, 1, 1) + self.rbw_x = QtWidgets.QSpinBox(self.layoutWidget1) self.rbw_x.setMinimum(2) self.rbw_x.setMaximum(10) self.rbw_x.setProperty("value", 3) self.rbw_x.setObjectName("rbw_x") - self.gridLayout.addWidget(self.rbw_x, 13, 3, 1, 1) - self.label_8 = QtWidgets.QLabel(Preferences) + self.gridLayout_2.addWidget(self.rbw_x, 7, 1, 1, 1) + self.label_4 = QtWidgets.QLabel(self.layoutWidget1) + self.label_4.setObjectName("label_4") + self.gridLayout_2.addWidget(self.label_4, 9, 0, 1, 1) + self.label_8 = QtWidgets.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName("label_8") - self.gridLayout.addWidget(self.label_8, 12, 0, 1, 2) - self.label_6 = QtWidgets.QLabel(Preferences) + self.gridLayout_2.addWidget(self.label_8, 6, 0, 1, 1) + self.label_6 = QtWidgets.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setObjectName("label_6") - self.gridLayout.addWidget(self.label_6, 6, 0, 1, 3) - self.exportButton = QtWidgets.QPushButton(Preferences) - self.exportButton.setEnabled(True) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.exportButton.sizePolicy().hasHeightForWidth()) - self.exportButton.setSizePolicy(sizePolicy) - self.exportButton.setObjectName("exportButton") - self.gridLayout.addWidget(self.exportButton, 5, 1, 1, 1) - self.label_15 = QtWidgets.QLabel(Preferences) + self.gridLayout_2.addWidget(self.label_6, 0, 0, 1, 2) + self.neg25Line = QtWidgets.QCheckBox(self.layoutWidget1) + self.neg25Line.setChecked(False) + self.neg25Line.setObjectName("neg25Line") + self.gridLayout_2.addWidget(self.neg25Line, 3, 1, 1, 1) + self.label_11 = QtWidgets.QLabel(self.layoutWidget1) + self.label_11.setObjectName("label_11") + self.gridLayout_2.addWidget(self.label_11, 1, 0, 1, 1) + self.label_9 = QtWidgets.QLabel(self.layoutWidget1) + self.label_9.setObjectName("label_9") + self.gridLayout_2.addWidget(self.label_9, 3, 0, 1, 1) + self.label_15 = QtWidgets.QLabel(self.layoutWidget1) self.label_15.setObjectName("label_15") - self.gridLayout.addWidget(self.label_15, 18, 0, 1, 2) - self.freqLO = QtWidgets.QDoubleSpinBox(Preferences) - self.freqLO.setDecimals(6) - self.freqLO.setMaximum(100000.0) - self.freqLO.setProperty("value", 0.0) - self.freqLO.setObjectName("freqLO") - self.gridLayout.addWidget(self.freqLO, 18, 2, 1, 2) - self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) + self.gridLayout_2.addWidget(self.label_15, 11, 0, 1, 1) + self.plus6Line = QtWidgets.QCheckBox(self.layoutWidget1) + self.plus6Line.setChecked(False) + self.plus6Line.setObjectName("plus6Line") + self.gridLayout_2.addWidget(self.plus6Line, 1, 1, 1, 1) + self.label_13 = QtWidgets.QLabel(self.layoutWidget1) + self.label_13.setText("") + self.label_13.setObjectName("label_13") + self.gridLayout_2.addWidget(self.label_13, 13, 0, 1, 1) + self.label_2 = QtWidgets.QLabel(self.layoutWidget1) + self.label_2.setObjectName("label_2") + self.gridLayout_2.addWidget(self.label_2, 5, 0, 1, 1) + self.label_10 = QtWidgets.QLabel(self.layoutWidget1) + self.label_10.setObjectName("label_10") + self.gridLayout_2.addWidget(self.label_10, 2, 0, 1, 1) + self.maxPoints = QtWidgets.QSpinBox(self.layoutWidget1) + self.maxPoints.setButtonSymbols(QtWidgets.QAbstractSpinBox.NoButtons) + self.maxPoints.setMinimum(25) + self.maxPoints.setMaximum(100000) + self.maxPoints.setProperty("value", 30000) + self.maxPoints.setObjectName("maxPoints") + self.gridLayout_2.addWidget(self.maxPoints, 9, 1, 1, 1) + self.label_7 = QtWidgets.QLabel(self.layoutWidget1) + font = QtGui.QFont() + font.setBold(True) + font.setWeight(75) + self.label_7.setFont(font) + self.label_7.setObjectName("label_7") + self.gridLayout_2.addWidget(self.label_7, 4, 0, 1, 1) + self.label_3 = QtWidgets.QLabel(self.layoutWidget1) + self.label_3.setObjectName("label_3") + self.gridLayout_2.addWidget(self.label_3, 8, 0, 1, 1) + self.label_16 = QtWidgets.QLabel(self.layoutWidget1) + self.label_16.setObjectName("label_16") + self.gridLayout_2.addWidget(self.label_16, 12, 0, 1, 1) + self.highLO = QtWidgets.QCheckBox(self.layoutWidget1) + self.highLO.setObjectName("highLO") + self.gridLayout_2.addWidget(self.highLO, 11, 1, 1, 1) self.retranslateUi(Preferences) QtCore.QMetaObject.connectSlotsByName(Preferences) @@ -204,29 +224,29 @@ def setupUi(self, Preferences): def retranslateUi(self, Preferences): _translate = QtCore.QCoreApplication.translate Preferences.setWindowTitle(_translate("Preferences", "Preferences")) - self.lowLO.setText(_translate("Preferences", "Low")) - self.label_3.setText(_translate("Preferences", "Auto minimum points")) - self.label_14.setText(_translate("Preferences", "Frequency Settings")) - self.deleteRow.setText(_translate("Preferences", "Delete Row")) - self.label.setText(_translate("Preferences", "Points / Resolution Bandwidth")) - self.label_2.setText(_translate("Preferences", "Detection Threshold")) - self.label_10.setText(_translate("Preferences", "Max with auto attenuator")) + self.label_5.setText(_translate("Preferences", "Preset Bands and Markers")) self.addRow.setText(_translate("Preferences", "Add Row")) - self.label_11.setText(_translate("Preferences", "Absolute maximum")) - self.label_13.setText(_translate("Preferences", "LO Offset")) - self.label_12.setText(_translate("Preferences", "Filter table on")) - self.zeroLine.setText(_translate("Preferences", " 0dBm")) - self.highLO.setText(_translate("Preferences", "High")) - self.neg25Line.setText(_translate("Preferences", "-25dBm")) - self.label_7.setText(_translate("Preferences", "Peak Marker Settings")) + self.deleteRow.setText(_translate("Preferences", "Delete Row")) + self.deleteAll.setText(_translate("Preferences", "Delete All")) + self.label_12.setText(_translate("Preferences", "Filter on:")) + self.exportButton.setText(_translate("Preferences", "Export")) self.importButton.setText(_translate("Preferences", "Import")) - self.label_4.setText(_translate("Preferences", "Auto maximum points")) - self.label_9.setText(_translate("Preferences", "Max for best accuracy")) - self.label_5.setText(_translate("Preferences", "Preset Bands and Markers")) + self.zeroLine.setText(_translate("Preferences", " 0dBm")) + self.label.setText(_translate("Preferences", "Points / Resolution Bandwidth")) + self.label_14.setText(_translate("Preferences", "External Mixer / LNB")) self.peakThreshold.setSuffix(_translate("Preferences", "dBm")) - self.plus6Line.setText(_translate("Preferences", "+6dBm")) + self.freqLO.setSuffix(_translate("Preferences", "MHz")) + self.label_4.setText(_translate("Preferences", "Auto maximum points")) self.label_8.setText(_translate("Preferences", "Scan Points Settings")) self.label_6.setText(_translate("Preferences", "Signal Level Reminder lines")) - self.exportButton.setText(_translate("Preferences", "Export")) - self.label_15.setText(_translate("Preferences", "Offset frequency")) - self.freqLO.setSuffix(_translate("Preferences", "MHz")) + self.neg25Line.setText(_translate("Preferences", "-25dBm")) + self.label_11.setText(_translate("Preferences", "Absolute maximum")) + self.label_9.setText(_translate("Preferences", "Max for best accuracy")) + self.label_15.setText(_translate("Preferences", "LO above displayed Freq")) + self.plus6Line.setText(_translate("Preferences", "+6dBm")) + self.label_2.setText(_translate("Preferences", "Detection Threshold")) + self.label_10.setText(_translate("Preferences", "Max with auto attenuator")) + self.label_7.setText(_translate("Preferences", "Peak Marker Settings")) + self.label_3.setText(_translate("Preferences", "Auto minimum points")) + self.label_16.setText(_translate("Preferences", "LO Frequency")) + self.highLO.setText(_translate("Preferences", "True")) diff --git a/QtTSAprefs.db b/QtTSAprefs.db index 19de683..9b36de7 100644 Binary files a/QtTSAprefs.db and b/QtTSAprefs.db differ diff --git a/QtTinySA-folder.spec b/QtTinySA-folder.spec new file mode 100644 index 0000000..bf513fa --- /dev/null +++ b/QtTinySA-folder.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['QtTinySA.py'], + pathex=[], + binaries=[], + datas=[('QtTSAprefs.db', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=['pandas','setuptools', 'tk', 'wheel', 'zipp', 'pyyaml', 'packaging', 'altgraph', 'mkl', 'fortran', 'matlab'], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='QtTinySA', + icon=['tinySA.ico'], + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='QtTinySA', +) diff --git a/QtTinySA.py b/QtTinySA.py index abdac37..08bf079 100755 --- a/QtTinySA.py +++ b/QtTinySA.py @@ -24,7 +24,7 @@ import platformdirs import csv from platform import system -from PyQt5 import QtWidgets, QtCore, QtGui +from PyQt5 import QtWidgets, QtCore from PyQt5.QtWidgets import QMessageBox, QDataWidgetMapper, QFileDialog from PyQt5.QtSql import QSqlDatabase, QSqlRelation, QSqlRelationalTableModel, QSqlRelationalDelegate import pyqtgraph @@ -37,7 +37,7 @@ # For 3D import pyqtgraph.opengl as pyqtgl -os.environ['PYOPENGL_PLATFORM'] = 'egl' +# os.environ['PYOPENGL_PLATFORM'] = 'egl' # Defaults to non local configuration/data dirs - needed for packaging if system() == "Linux": @@ -72,7 +72,7 @@ def __init__(self): self.runTimer = QtCore.QElapsedTimer() # debug self.scale = 174 self.scanMemory = 50 - self.scan3D = False + # self.scan3D = False self.surface = None self.vGrid = None self.usbCheck = QtCore.QTimer() @@ -81,7 +81,7 @@ def __init__(self): self.fifoTimer = QtCore.QTimer() self.fifoTimer.timeout.connect(self.usbSend) self.tinySA4 = None - self.resBW = ['0.2', '1', '3', '10', '30', '100', '300', '600', '850'] + self.maxF = 6000 def openPort(self): self.dev = None @@ -131,34 +131,31 @@ def initialise(self): # hardware = 'tinySA' # used for testing if hardware[:7] == 'tinySA4': # It's an Ultra self.tinySA4 = True + self.maxF = 6000 + self.scale = 174 ui.spur_box.setTristate(True) # TinySA Ultra has 'auto', 'on' and 'off' setting for Spur - ui.spur_box.setCheckState(QtCore.Qt.PartiallyChecked) # auto + ui.spur_box.setCheckState(checkboxes.tm.record(0).value("spur")) else: self.tinySA4 = False + self.maxF = 960 self.scale = 128 - self.resBW = self.resBW[2:8] # TinySA Basic has fewer resolution bandwidth filters + rbwtext.tm.setFilter('type = "rbw" and value != "0.2" and value != "1" and value != "850"') # fewer RBWs ui.spur_box.setTristate(False) # TinySA Basic has only 'on' and 'off' setting for Spur' ui.spur_box.setChecked(True) # on self.spur() # Basic has no lna - ui.lna_label.setVisible(self.tinySA4) ui.lna_box.setVisible(self.tinySA4) ui.lna_box.setEnabled(self.tinySA4) self.lna() - # set the frequency band & rbw comboboxes to suit detected hardware - setPreferences() - self.resBW.insert(0, 'auto') - ui.rbw_box.addItems(self.resBW) - ui.rbw_box.setCurrentIndex(len(self.resBW)-4) - # show hardware information in GUI ui.battery.setText(self.battery()) - ui.version.setText(hardware[:16]) + ui.version.setText(hardware[8:16]) # connect the rbw & frequency boxes here or it causes startup index errors when they are populated ui.rbw_box.currentIndexChanged.connect(rbwChanged) + ui.rbw_auto.clicked.connect(rbwChanged) ui.start_freq.editingFinished.connect(self.freq_changed) ui.stop_freq.editingFinished.connect(self.freq_changed) ui.centre_freq.valueChanged.connect(lambda: self.freq_changed(True)) # centre/span mode @@ -172,17 +169,20 @@ def restoreSettings(self): self.freq_changed(False) # start/stop mode pointsChanged() ui.graphWidget.setXRange(ui.start_freq.value(), ui.stop_freq.value()) + logging.info(f'restoreSettings(): band = {numbers.tm.record(0).value("band")}') # update trace and marker settings from the database. 1 = last saved (default) settings S1.dLoad(1) S2.dLoad(1) S3.dLoad(1) S4.dLoad(1) - + S1.vline.setValue(numbers.tm.record(0).value('m1f')) + S2.vline.setValue(numbers.tm.record(0).value('m2f')) + S3.vline.setValue(numbers.tm.record(0).value('m3f')) + S4.vline.setValue(numbers.tm.record(0).value('m4f')) # set each marker to a different colour S1.vline.label.setColor('y') S2.vline.setPen(color='m', width=0.75, style=QtCore.Qt.DashLine) - # S2.vline.setPen(color=QtGui.QColor('darkgreen'), width=0.75, style=QtCore.Qt.DashLine) S2.vline.label.setColor('m') S3.vline.setPen(color='c', width=0.75, style=QtCore.Qt.DashLine) S3.vline.label.setColor('c') @@ -190,9 +190,10 @@ def restoreSettings(self): S4.vline.label.setColor('w') setPreferences() + ui.band_box.setCurrentText(numbers.tm.record(0).value("band")) # this shouldn't be needed but it is + band_changed() def scan(self): # called by 'run' button - self.scan3D = ui.Enabled3D.isChecked() if self.usb is not None: if self.sweeping: # if it's running, stop it self.sweeping = False # tells the measurement thread to stop once current scan complete @@ -271,6 +272,21 @@ def freq_changed(self, centre=False): ui.graphWidget.setXRange(startF, stopF) self.resume() + def freqOffset(self, frequencies): # for mixers or LNBs external to TinySA + startF = frequencies[0] + spanF = frequencies[-1] - startF + loF = preferences.freqLO.value() * 1e6 + if preferences.highLO.isChecked() and preferences.freqLO != 0: + scanF = (loF - startF - spanF, loF - startF) + else: + scanF = (startF - loF, startF - loF + spanF) + if min(scanF) <= 0: + self.sweeping = False + scanF = (88 * 1e6, 108 * 1e6) + logging.info('frequency offset error, check preferences') + logging.debug(f'freqOffset(): scanF = {scanF}') + return scanF + def setRBW(self): # may be called by measurement thread as well as normally rbw = ui.rbw_box.currentText() # ui values are discrete ones in kHz logging.debug(f'rbw = {rbw}') @@ -297,12 +313,12 @@ def sweepTimeout(self, frequencies): # freqs are in Hz startF = frequencies[0] stopF = frequencies[-1] points = np.size(frequencies) - if ui.rbw_box.currentIndex() == 0: # rbw is auto + if ui.rbw_auto.isChecked(): # rbw auto setting from tinySA: ~7 kHz per 1 MHz scan frequency span rbw = (stopF - startF) * 7e-6 else: rbw = float(ui.rbw_box.currentText()) - rbw = np.clip(rbw, float(self.resBW[1]), float(self.resBW[-1])) # apply limits + rbw = np.clip(rbw, 0.2, 850) # apply limits # timeout can be very long - use a heuristic approach # 1st summand is the scanning time, 2nd summand is the USB transfer overhead timeout = ((stopF - startF) / 20e3) / (rbw ** 2) + points / 500 @@ -321,7 +337,12 @@ def measurement(self, frequencies, readings): # runs in a separate thread while self.sweeping: try: self.usb.timeout = self.sweepTimeout(frequencies) - command = f'scanraw {int(frequencies[0])} {int(frequencies[-1])} {int(points)}\r'.encode() + if preferences.freqLO != 0: + startF, stopF = self.freqOffset(frequencies) + command = f'scanraw {int(startF)} {int(stopF)} {int(points)}\r'.encode() + else: + command = f'scanraw {int(frequencies[0])} {int(frequencies[-1])} {int(points)}\r'.encode() + logging.debug(f'measurement: command = {command}') self.usb.write(command) index = 0 # self.runTimer.start() # debug @@ -330,10 +351,18 @@ def measurement(self, frequencies, readings): # runs in a separate thread while dataBlock != b'}ch' and index < points: # if '}ch' it's reached the end of the scan points dataBlock = (self.usb.read(3)) # read a block of 3 bytes of data logging.debug(f'dataBlock: {dataBlock}\n') + if dataBlock == b'}ch': + logging.info('jog button pressed') + self.sweeping = False + break if dataBlock != b'}ch': # logging.debug(f'measurement: index {index} elapsed time = {self.runTimer.nsecsElapsed()/1e6}') - c, data = struct.unpack('<' + 'cH', dataBlock) - logging.debug(f'measurement: dataBlock: {dataBlock} data: {data}\n') + try: + c, data = struct.unpack('<' + 'cH', dataBlock) + except struct.error: + logging.info('data error') + self.sweeping = False + break readings[0, index] = (data / 32) - self.scale # scale 0..4095 -> -128..-0.03 dBm if index // 20 == index / 20 or index == (points - 1): # update traces every 20 readings self.signals.result.emit(frequencies, readings) # send readings to sigProcess() @@ -368,6 +397,10 @@ def threadEnds(self): self.fifoTimer.start(500) def sigProcess(self, frequencies, readings): # readings from the worker thread result signal every 20 measurements + if preferences.highLO.isChecked() and preferences.freqLO != 0: + # for LNB/Mixer when LO is above measured freq, the scan is reversed, i.e. low TinySA f = high meas f + frequencies = frequencies[::-1] + np.fliplr(readings) if ui.avgSlider.value() > self.scanCount: # slice using use scanCount to stop default values swamping average readingsAvg = np.average(readings[:self.scanCount, ::], axis=0) else: @@ -418,9 +451,13 @@ def createTimeSpectrum(self, frequencies, readings): self.vGrid.hide() def updateGUI(self, frequencies, readings): # called once per scan by fullSweep signal from measurement() thread + if preferences.highLO.isChecked() and preferences.freqLO != 0: + # for LNB/Mixer when LO is above measured freq, the scan is reversed, i.e. low TinySA f = high meas f + frequencies = frequencies[::-1] + np.fliplr(readings) if ui.points_auto.isChecked(): ui.points_box.setValue(np.size(frequencies)) - if ui.Enabled3D.isChecked(): + if ui.stackedWidget.currentWidget() == ui.View3D: z = readings + 120 # Surface plot height shader needs positive numbers so convert from dBm to dBf logging.debug(f'z = {z}') self.surface.setData(z=z) # update 3D graph @@ -436,8 +473,8 @@ def peakDetect(self, frequencies, readings): # find the signal peak values for setting peak markers Avg = np.average(readings[:ui.avgSlider.value(), ::], axis=0) # calculate a frequency width factor to use to mask readings above and below each peak frequency - if ui.rbw_box.currentText() == 'auto': - fWidth = preferences.rbw_x.value() * float(self.resBW[-1]) * 1e3 + if ui.rbw_auto.isChecked(): + fWidth = preferences.rbw_x.value() * 850 * 1e3 else: fWidth = preferences.rbw_x.value() * float(ui.rbw_box.currentText()) * 1e3 peaks = [np.argmax(Avg)] # the index of the highest peak in the averaged readings array @@ -515,10 +552,8 @@ def version(self): def spur(self): sType = ui.spur_box.checkState() - if sType == 1: - ui.spur_box.setText('Auto') - else: - ui.spur_box.setText('') + options = {0: 'Spur Off', 1: 'Spur Auto', 2: 'Spur On'} + ui.spur_box.setText(options.get(sType)) options = {0: 'spur off\r'.encode(), 1: 'spur auto\r'.encode(), 2: 'spur on\r'.encode()} command = options.get(sType) self.fifo.put(command) @@ -578,47 +613,15 @@ def mDelta(self): # delta marker locking to reference marker S1 self.vline.setValue(S1.vline.value() + self.deltaF) S1.vline.setPen(color='y', width=1.0) - # The set of 4 functions below are needed until I understand how to make dataWidgetMapper work with comboboxes - def mData(self, setting, saving=True): - markers.tm.setFilter('display = ' + str(self.name) + ' AND setting = ' + str(setting)) - markers.tm.select() - record = markers.tm.record(0) - if saving: - record.setValue('frequency', float(self.vline.value())) - record.setValue('type', self.markerType) - markers.tm.setRecord(0, record) - else: - self.vline.setValue(record.value('frequency')) - self.markerType = record.value('type') - self.guiRef(1).setCurrentText(self.markerType) - logging.debug(f'marker f = {record.value("frequency")}') - self.vline.label.setMovable(True) - self.mEnable() - self.mType() - - def tData(self, setting, saving=True): - traces.tm.setFilter('display = ' + str(self.name) + ' AND setting = ' + str(setting)) - traces.tm.select() - record = traces.tm.record(0) - if saving: - record.setValue('type', self.traceType) - traces.tm.setRecord(0, record) - else: - self.traceType = record.value('type') - self.guiRef(3).setCurrentText(self.traceType) - S1.hEnable(preferences.neg25Line) - S2.hEnable(preferences.zeroLine) - S3.hEnable(preferences.plus6Line) - - def dSave(self, setting): - self.tData(setting, True) - self.mData(setting, True) # true = saving - def dLoad(self, setting): - self.mData(setting, False) # false = not saving but loading - self.tData(setting, False) + self.vline.label.setMovable(True) + self.mEnable() + self.mType() + self.tType() self.tEnable() - # The set of 4 functions above are needed until understand how to make dataWidgetMapper work with comboboxes + S1.hEnable(preferences.neg25Line) + S2.hEnable(preferences.zeroLine) + S3.hEnable(preferences.plus6Line) def guiRef(self, opt): guiFields = ({'1': ui.marker1, '2': ui.marker2, '3': ui.marker3, '4': ui.marker4}, @@ -688,20 +691,12 @@ def addFreqMarker(self, freq, colour, name): # adds simple frequency marker wit marker.label.setMovable(True) else: marker = ui.graphWidget.addLine(freq, 90, pen=pyqtgraph.mkPen(colour, width=0.5, style=QtCore.Qt.DashLine)) - self.fifo.put(marker) # store the marker object in a queue def delFreqMarkers(self): for i in range(0, self.fifo.qsize()): ui.graphWidget.removeItem(self.fifo.get()) # remove the marker and its corresponding object in the queue - def freqOffset(self, frequencies): # for mixers external to TinySA # future feature - if preferences.highLO.isChecked() and preferences.freqLO != 0: - f = preferences.freqLO.value() - frequencies - else: - f = preferences.freqLO.value() + frequencies - return f - class WorkerSignals(QtCore.QObject): error = QtCore.pyqtSignal(str) @@ -735,7 +730,7 @@ def __init__(self): self.dbName = "QtTSAprefs.db" self.personalDir = platformdirs.user_config_dir(appname=app.applicationName(), ensure_exists=True) self.globalDir = platformdirs.site_config_dir(appname=app.applicationName()) - self.workingDir = os.getcwd() + self.workingDirs = [os.path.dirname(__file__), os.path.dirname(os.path.realpath(__file__)), os.getcwd()] self.dbpath = self._getPersonalisedPath() def _getPersonalisedPath(self): @@ -754,10 +749,12 @@ def _getPersonalisedPath(self): if returnpath is None: # no config database file found in personal or global directories logging.info(f'No configuration database file exists in {self.personalDir} or {self.globalDir}') - # Look for one in the current working folder - if os.path.exists(os.path.join(self.workingDir, self.dbName)): - logging.info(f'Copying configuration database from {self.workingDir}') - c = shutil.copy(os.path.join(self.workingDir, self.dbName), self.personalDir) + # Look for one in the current working folder and in the folder where the python file is stored (or linked to): + # In case QtTinySA is called from outside the stored folder. + for workingDir in self.workingDirs: + if os.path.exists(os.path.join(workingDir, self.dbName)): + logging.info(f'Copying configuration database from {workingDir}') + c = shutil.copy(os.path.join(workingDir, self.dbName), self.personalDir) if os.path.exists(os.path.join(self.personalDir, self.dbName)): returnpath = self.personalDir logging.info(f'Personal configuration database created at {c}') @@ -772,7 +769,7 @@ def connect(self): self.db.setDatabaseName(os.path.join(self.dbpath, self.dbName)) self.db.open() logging.info(f'Database open: {self.db.isOpen()}') - self.db.exec('PRAGMA foreign_keys = ON') # exec() is deprecated # + self.db.exec('PRAGMA foreign_keys = ON;') else: logging.info('Database file is missing') popUp('Database file is missing', QMessageBox.Ok, QMessageBox.Critical) @@ -793,7 +790,6 @@ def __init__(self, tableName): self.currentRow = 0 def createTableModel(self): - # add exception handling? self.tm.setTable(self.tableName) self.dwm.setModel(self.tm) self.dwm.setSubmitPolicy(QDataWidgetMapper.AutoSubmit) @@ -806,8 +802,12 @@ def addRow(self): # adds a blank row to the frequency bands table widget def saveChanges(self): self.dwm.submit() - def deleteRow(self): # deletes row selected by the up/down arrows on the frequency bands table widget - self.tm.removeRow(self.currentRow) + def deleteRow(self, single=True): # deletes rows in the frequency bands table widget + if single: + self.tm.removeRow(self.currentRow) + else: + for i in range(0, self.tm.rowCount()): + self.tm.removeRow(i) self.tm.select() self.tm.layoutChanged.emit() self.dwm.submit() @@ -816,8 +816,9 @@ def tableClicked(self): self.currentRow = preferences.freqBands.currentIndex().row() # the row index from the QModelIndexObject logging.debug(f'row {self.currentRow} clicked') - def insertData(self, name, typeF, startF, stopF, colour): + def insertData(self, name, typeF, startF, stopF, visible, colour): record = self.tm.record() + record.setValue('value', int(eval(visible))) # converts string(visible) 'True' 'False' to 1 or 0 record.setValue('name', name) record.setValue('startF', f'{startF:.6f}') record.setValue('stopF', f'{stopF:.6f}') @@ -828,24 +829,23 @@ def insertData(self, name, typeF, startF, stopF, colour): colours.tm.select() record.setValue('colour', colours.tm.record(0).value('ID')) self.tm.insertRecord(-1, record) + bandstype.tm.setFilter('') self.tm.select() self.tm.layoutChanged.emit() self.dwm.submit() - def filterType(self, prefsDialog): + def filterType(self, prefsDialog, boxText): + sql = 'preset = "' + boxText + '"' if prefsDialog: - if preferences.filterBox.currentText() == 'show all': - bands.tm.setFilter('') - else: - bands.tm.setFilter('preset = "' + preferences.filterBox.currentText() + '"') # SQL syntax + if boxText == 'show all': + sql = '' else: - if preferences.filterBox.currentText() == 'show all': - bands.tm.setFilter('visible = "1"') - else: - bands.tm.setFilter('visible = "1" AND preset = "' + preferences.filterBox.currentText() + '"') - - if tinySA.tinySA4 is False: # It's a tinySA basic with limited frequency range - bands.tm.setFilter('preset = "' + preferences.filterBox.currentText() + '" AND startF <= "960"') + sql = 'visible = "1" AND preset = "' + boxText + '"' + if boxText == 'show all': + sql = 'visible = "1"' + if tinySA.tinySA4 is False: # It's a tinySA basic with limited frequency range + sql = sql + ' AND startF <= "960"' + bands.tm.setFilter(sql) def readCSV(self, fileName): with open(fileName, "r") as fileInput: @@ -853,11 +853,12 @@ def readCSV(self, fileName): for row in csv.reader(fileInput): if not header: header = row - logging.debug(f'header = {header}') + logging.info(f'header = {header}') indx = self.findCols(header) continue - if len(indx) == 6: # (name, preset(=type), startF, stopF, value(=visible), colour) - bands.insertData(row[indx[0]], row[indx[1]], float(row[indx[2]]), float(row[indx[3]]), row[indx[5]]) + if len(indx) == 6: # (name, preset(=type), startF, stopF, visible, colour) + logging.info(f'row = {row}') + bands.insertData(row[indx[0]], row[indx[1]], float(row[indx[2]]), float(row[indx[3]]), row[indx[4]], row[indx[5]]) elif len(indx) == 3: bands.insertData(row[indx[0]], 'RF mic', float(row[indx[1]]) / 1e3, 0, row[indx[2]].lower()) logging.debug(f'colour = {row[indx[2]].lower()}') @@ -871,7 +872,7 @@ def writeCSV(self, fileName): output.writerow(header) for rowNumber in range(self.tm.rowCount()): fields = [self.tm.data(self.tm.index(rowNumber, columnNumber)) - for columnNumber in range(1, 7)] + for columnNumber in range(1, 8)] output.writerow(fields) def findCols(self, header): @@ -879,7 +880,7 @@ def findCols(self, header): try: for i in range(1, self.tm.columnCount()): # start at 1 - don't include ID column indx.append(header.index(self.tm.record().fieldName(i))) # Match to QtTinySA CSV export format - logging.debug(f'i = {i} indx = {indx}') + logging.info(f'i = {i} indx = {indx}') except ValueError: indx = [] try: @@ -891,13 +892,20 @@ def findCols(self, header): return return indx + def mapWidget(self, modelName): # maps the widget combo-box fields to the database tables, using the mapping table + maps.tm.setFilter('model = "' + modelName + '"') + for index in range(0, maps.tm.rowCount()): + gui = maps.tm.record(index).value('gui') + column = maps.tm.record(index).value('column') + self.dwm.addMapping(eval(gui), int(column)) + ############################################################################### # respond to GUI signals def band_changed(): index = ui.band_box.currentIndex() - if bands.tm.record(index).value('preset') == 'band': + if bandstype.tm.record(ui.filterBox.currentIndex()).value('type') == 'band': startF = bands.tm.record(index).value('StartF') stopF = bands.tm.record(index).value('StopF') ui.start_freq.setValue(startF) @@ -908,6 +916,7 @@ def band_changed(): ui.centre_freq.setValue(centreF) ui.span_freq.setValue(1) tinySA.freq_changed(True) # centre mode + freqMarkers() def addBandPressed(): @@ -917,7 +926,7 @@ def addBandPressed(): popUp(message, QMessageBox.Ok, QMessageBox.Information) return name = 'M' + str(round(S1.vline.value(), 6)) - bands.insertData(name, S1.vline.value(), S2.vline.value(), '') + bands.insertData(name, ui.filterBox.currentText(), S1.vline.value(), S2.vline.value(), 'True', 'aliceblue') else: message = 'M1 and M2 must both be enabled to add a new Band' popUp(message, QMessageBox.Ok, QMessageBox.Information) @@ -936,17 +945,17 @@ def attenuate_changed(): def rbwChanged(): - if ui.rbw_box.currentIndex() == 0: # can't calculate Points because we don't know what the RBW will be - ui.points_auto.setChecked(False) - ui.points_auto.setEnabled(False) + if ui.rbw_auto.isChecked(): # can't calculate Points because we don't know what the RBW will be + ui.rbw_box.setEnabled(False) else: - ui.points_auto.setEnabled(True) + ui.rbw_box.setEnabled(True) tinySA.setRBW() # if measurement thread is running, calling setRBW() will force it to update scan parameters def pointsChanged(): if ui.points_auto.isChecked(): ui.points_box.setEnabled(False) + ui.rbw_box.setEnabled(True) else: ui.points_box.setEnabled(True) tinySA.resume() @@ -984,18 +993,16 @@ def mkr1_moved(): def setPreferences(): checkboxes.dwm.submit() - numbers.dwm.submit() bands.tm.submitAll() S4.hline.setValue(preferences.peakThreshold.value()) - bands.filterType(False) + bands.filterType(False, ui.filterBox.currentText()) if ui.presetMarker.isChecked(): - S1.delFreqMarkers() - S2.delFreqMarkers() freqMarkers() + isMixerMode() def dialogPrefs(): - bands.filterType(True) + bands.filterType(True, preferences.filterBox.currentText()) bands.tm.select() bands.currentRow = 0 preferences.freqBands.selectRow(bands.currentRow) @@ -1013,14 +1020,16 @@ def about(): def exit_handler(): if tinySA.dev is not None: - # save the current displayed marker and trace settings as the default - S1.dSave(1) - S2.dSave(1) - S3.dSave(1) - S4.dSave(1) + # save the marker frequencies + record = numbers.tm.record(0) + record.setValue('m1f', float(S1.vline.value())) + record.setValue('m2f', float(S2.vline.value())) + record.setValue('m3f', float(S3.vline.value())) + record.setValue('m4f', float(S4.vline.value())) + numbers.tm.setRecord(0, record) + # save the gui field values and checkbox states numbers.dwm.submit() checkboxes.dwm.submit() - # stop sweeping if tinySA.sweeping: tinySA.sweeping = False # tell the measurement thread to stop while tinySA.threadRunning: @@ -1041,6 +1050,8 @@ def popUp(message, button, icon): def freqMarkers(): + S1.delFreqMarkers() + S2.delFreqMarkers() if ui.presetMarker.isChecked(): for i in range(0, bands.tm.rowCount()): startF = bands.tm.record(i).value('StartF') @@ -1048,16 +1059,11 @@ def freqMarkers(): name = bands.tm.record(i).value('name') S1.addFreqMarker(startF, colour, name) stopF = bands.tm.record(i).value('StopF') - if bands.tm.record(i).value('preset') == 'band': + if bandstype.tm.record(ui.filterBox.currentIndex()).value('type') == 'band': S2.addFreqMarker(stopF, colour, '') - else: - S1.delFreqMarkers() - S2.delFreqMarkers() def freqMarkerLabel(): - S1.delFreqMarkers() - S2.delFreqMarkers() freqMarkers() @@ -1075,14 +1081,33 @@ def importData(): bands.readCSV(filename[0]) +def isMixerMode(): + if preferences.freqLO.value() == 0: + ui.mixerMode.setVisible(False) + ui.start_freq.setStyleSheet('background-color:None') + ui.stop_freq.setStyleSheet('background-color:None') + ui.centre_freq.setStyleSheet('background-color:None') + ui.start_freq.setMaximum(tinySA.maxF) + ui.centre_freq.setMaximum(tinySA.maxF) + ui.stop_freq.setMaximum(tinySA.maxF) + else: + ui.mixerMode.setVisible(True) + ui.start_freq.setStyleSheet('background-color:lightGreen') + ui.stop_freq.setStyleSheet('background-color:lightGreen') + ui.centre_freq.setStyleSheet('background-color:lightGreen') + ui.start_freq.setMaximum(100000) + ui.centre_freq.setMaximum(100000) + ui.stop_freq.setMaximum(100000) + ############################################################################### # Instantiate classes + tinySA = analyser() app = QtWidgets.QApplication([]) # create QApplication for the GUI app.setApplicationName('QtTinySA') -app.setApplicationVersion(' v0.10.1') +app.setApplicationVersion(' v0.10.2') window = QtWidgets.QMainWindow() ui = QtTinySpectrum.Ui_MainWindow() ui.setupUi(window) @@ -1107,8 +1132,10 @@ def importData(): traces = modelView('trace') tracetext = modelView('combo') markertext = modelView('combo') +rbwtext = modelView('combo') bandstype = modelView('freqtype') colours = modelView('SVGColour') +maps = modelView('mapping') ############################################################################### @@ -1142,6 +1169,7 @@ def importData(): S4.hline.setMovable(True) S4.hline.label.setFormat("{value:.1f}") + ############################################################################### # Connect signals from buttons and sliders. Connections for freq and rbw boxes are in 'initialise' Fn @@ -1209,15 +1237,19 @@ def importData(): ui.gridR.clicked.connect(lambda: tinySA.grid(-1)) ui.zoom.sliderMoved.connect(tinySA.zoom3D) ui.reset3D.clicked.connect(tinySA.reset3D) +ui.timeSpectrum.clicked.connect(lambda: ui.stackedWidget.setCurrentWidget(ui.View3D)) +ui.analyser.clicked.connect(lambda: ui.stackedWidget.setCurrentWidget(ui.ViewNormal)) # preferences preferences.neg25Line.stateChanged.connect(lambda: S1.hEnable(preferences.neg25Line)) preferences.zeroLine.stateChanged.connect(lambda: S2.hEnable(preferences.zeroLine)) preferences.plus6Line.stateChanged.connect(lambda: S3.hEnable(preferences.plus6Line)) preferences.addRow.clicked.connect(bands.addRow) -preferences.deleteRow.clicked.connect(bands.deleteRow) +preferences.deleteRow.clicked.connect(lambda: bands.deleteRow(True)) +preferences.deleteAll.clicked.connect(lambda: bands.deleteRow(False)) preferences.freqBands.clicked.connect(bands.tableClicked) -preferences.filterBox.currentTextChanged.connect(lambda: bands.filterType(True)) +preferences.filterBox.currentTextChanged.connect(lambda: bands.filterType(True, preferences.filterBox.currentText())) +ui.filterBox.currentTextChanged.connect(lambda: bands.filterType(False, ui.filterBox.currentText())) ui.actionPreferences.triggered.connect(dialogPrefs) # open preferences dialogue when its menu is clicked ui.actionAbout_QtTinySA.triggered.connect(about) pwindow.finished.connect(setPreferences) # update database checkboxes table on dialogue window close @@ -1230,9 +1262,12 @@ def importData(): logging.info(f'{app.applicationName()}{app.applicationVersion()}') # table models - read/write views of the configuration data +maps.createTableModel() +maps.tm.select() bands.createTableModel() # relational bands.tm.setSort(3, QtCore.Qt.AscendingOrder) bands.tm.setHeaderData(5, QtCore.Qt.Horizontal, 'visible') +bands.tm.setHeaderData(7, QtCore.Qt.Horizontal, 'LO') bands.tm.setRelation(5, QSqlRelation('boolean', 'ID', 'value')) # set 'view' column to a True/False choice combo box boolean = QSqlRelationalDelegate(preferences.freqBands) @@ -1246,63 +1281,42 @@ def importData(): fType = QSqlRelationalDelegate(preferences.freqBands) preferences.freqBands.setItemDelegate(fType) + colHeader = preferences.freqBands.horizontalHeader() colHeader.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents) -# bandstype.createTableModel() colours.createTableModel() colours.tm.select() -# -# populate the presets combobox +# populate the band presets combo box ui.band_box.setModel(bands.tm) ui.band_box.setModelColumn(1) bands.tm.select() # initially select the data in the model -# populate the preferences filter combo box +# populate the preferences and main GUI filter combo boxes preferences.filterBox.setModel(bandstype.tm) preferences.filterBox.setModelColumn(1) -bandstype.dwm.addMapping(preferences.filterBox, 1) +ui.filterBox.setModel(bandstype.tm) +ui.filterBox.setModelColumn(1) bandstype.tm.select() -# connect the preferences dialogue box freq band widget to the data model +# connect the preferences dialogue box freq band table widget to the data model preferences.freqBands.setModel(bands.tm) preferences.freqBands.hideColumn(0) # ID -rowHeader = preferences.freqBands.verticalHeader() +preferences.freqBands.verticalHeader().setVisible(False) -# Map database tables to preferences dialogue box fields and to main GUI -# ** lines need to be in this order and here or the mapping doesn't work ** +# Map database tables to preferences/GUI fields * lines need to be in this order and here or the mapping doesn't work * checkboxes.createTableModel() -checkboxes.dwm.addMapping(preferences.rbw_x, 3) -checkboxes.dwm.addMapping(preferences.neg25Line, 4) -checkboxes.dwm.addMapping(preferences.zeroLine, 5) -checkboxes.dwm.addMapping(preferences.plus6Line, 6) -checkboxes.dwm.addMapping(ui.trace1, 7) -checkboxes.dwm.addMapping(ui.trace2, 8) -checkboxes.dwm.addMapping(ui.trace3, 9) -checkboxes.dwm.addMapping(ui.trace4, 10) -checkboxes.dwm.addMapping(ui.marker1, 11) -checkboxes.dwm.addMapping(ui.marker2, 12) -checkboxes.dwm.addMapping(ui.marker3, 13) -checkboxes.dwm.addMapping(ui.marker4, 14) -checkboxes.dwm.addMapping(ui.lna_box, 15) -checkboxes.dwm.addMapping(ui.points_auto, 16) +checkboxes.mapWidget('checkboxes') # uses mapping table from database checkboxes.tm.select() checkboxes.dwm.setCurrentIndex(0) # 0 = (last used) default settings -# The models for saving number, marker and trace settings -numbers.createTableModel() -numbers.dwm.addMapping(preferences.minPoints, 3) -numbers.dwm.addMapping(preferences.maxPoints, 4) -numbers.dwm.addMapping(ui.start_freq, 5) -numbers.dwm.addMapping(ui.stop_freq, 6) -numbers.dwm.addMapping(preferences.peakThreshold, 7) -numbers.tm.select() -numbers.dwm.setCurrentIndex(0) -markers.createTableModel() -traces.createTableModel() -traces.tm.select() +# populate the rbw combobox +rbwtext.createTableModel() +rbwtext.tm.setFilter('type = "rbw"') +ui.rbw_box.setModel(rbwtext.tm) +rbwtext.tm.select() # populate the trace comboboxes tracetext.createTableModel() @@ -1322,6 +1336,15 @@ def importData(): ui.m4_type.setModel(markertext.tm) markertext.tm.select() +# The models for saving number, marker and trace settings +markers.createTableModel() +traces.createTableModel() +traces.tm.select() +numbers.createTableModel() +numbers.mapWidget('numbers') # uses mapping table from database +numbers.tm.select() +numbers.dwm.setCurrentIndex(0) + # set GUI fields using values from the configuration database tinySA.restoreSettings() @@ -1332,7 +1355,7 @@ def importData(): window.show() window.setWindowTitle(app.applicationName() + app.applicationVersion()) -window.setWindowIcon(QtGui.QIcon(os.path.join(basedir, 'tinySAsmall.png'))) +# window.setWindowIcon(QtGui.QIcon(os.path.join(basedir, 'tinySAsmall.png'))) ############################################################################### # run the application until the user closes it diff --git a/QtTinySA.spec b/QtTinySA.spec index bf513fa..10a7182 100644 --- a/QtTinySA.spec +++ b/QtTinySA.spec @@ -1,31 +1,40 @@ # -*- mode: python ; coding: utf-8 -*- +block_cipher = None + + a = Analysis( ['QtTinySA.py'], pathex=[], binaries=[], - datas=[('QtTSAprefs.db', '.')], + datas=[], hiddenimports=[], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=['pandas','setuptools', 'tk', 'wheel', 'zipp', 'pyyaml', 'packaging', 'altgraph', 'mkl', 'fortran', 'matlab'], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, noarchive=False, ) -pyz = PYZ(a.pure) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, + a.binaries, + a.zipfiles, + a.datas, [], - exclude_binaries=True, name='QtTinySA', - icon=['tinySA.ico'], debug=False, bootloader_ignore_signals=False, strip=False, upx=True, + upx_exclude=[], + runtime_tmpdir=None, console=True, disable_windowed_traceback=False, argv_emulation=False, @@ -33,12 +42,3 @@ exe = EXE( codesign_identity=None, entitlements_file=None, ) -coll = COLLECT( - exe, - a.binaries, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='QtTinySA', -) diff --git a/QtTinySpectrum.py b/QtTinySpectrum.py index 5c6316d..68b4b46 100644 --- a/QtTinySpectrum.py +++ b/QtTinySpectrum.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'QtTinySpectrum.ui' +# Form implementation generated from reading ui file 'QtTinySpectrum_small.ui' # # Created by: PyQt5 UI code generator 5.15.10 # @@ -14,411 +14,429 @@ class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") - MainWindow.resize(1024, 600) + MainWindow.resize(1000, 603) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) + MainWindow.setIconSize(QtCore.QSize(25, 25)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_5 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_5.setObjectName("gridLayout_5") - self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) + self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) - self.tabWidget.setSizePolicy(sizePolicy) - self.tabWidget.setAutoFillBackground(False) - self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North) - self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded) - self.tabWidget.setObjectName("tabWidget") - self.analyserTab = QtWidgets.QWidget() - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.analyserTab.sizePolicy().hasHeightForWidth()) - self.analyserTab.setSizePolicy(sizePolicy) - self.analyserTab.setObjectName("analyserTab") - self.gridLayout = QtWidgets.QGridLayout(self.analyserTab) + sizePolicy.setHeightForWidth(self.stackedWidget.sizePolicy().hasHeightForWidth()) + self.stackedWidget.setSizePolicy(sizePolicy) + self.stackedWidget.setAutoFillBackground(False) + self.stackedWidget.setObjectName("stackedWidget") + self.ViewNormal = QtWidgets.QWidget() + self.ViewNormal.setObjectName("ViewNormal") + self.gridLayout = QtWidgets.QGridLayout(self.ViewNormal) self.gridLayout.setObjectName("gridLayout") self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") - self.version = QtWidgets.QLabel(self.analyserTab) - font = QtGui.QFont() - font.setPointSize(7) - self.version.setFont(font) - self.version.setObjectName("version") - self.gridLayout_3.addWidget(self.version, 17, 0, 1, 2) - self.label = QtWidgets.QLabel(self.analyserTab) + spacerItem = QtWidgets.QSpacerItem(17, 13, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_3.addItem(spacerItem, 22, 0, 1, 1) + self.atten_auto = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) font.setBold(True) - font.setUnderline(False) font.setWeight(75) - self.label.setFont(font) - self.label.setObjectName("label") - self.gridLayout_3.addWidget(self.label, 14, 0, 1, 2) - self.t1_type = QtWidgets.QComboBox(self.analyserTab) + self.atten_auto.setFont(font) + self.atten_auto.setChecked(True) + self.atten_auto.setObjectName("atten_auto") + self.gridLayout_3.addWidget(self.atten_auto, 3, 0, 1, 1) + self.t2_type = QtWidgets.QComboBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.t1_type.sizePolicy().hasHeightForWidth()) - self.t1_type.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setPointSize(7) - self.t1_type.setFont(font) - self.t1_type.setModelColumn(0) - self.t1_type.setObjectName("t1_type") - self.gridLayout_3.addWidget(self.t1_type, 8, 1, 1, 1) - self.label_3 = QtWidgets.QLabel(self.analyserTab) + sizePolicy.setHeightForWidth(self.t2_type.sizePolicy().hasHeightForWidth()) + self.t2_type.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.label_3.setFont(font) - self.label_3.setObjectName("label_3") - self.gridLayout_3.addWidget(self.label_3, 5, 0, 1, 1) - self.lna_box = QtWidgets.QCheckBox(self.analyserTab) + self.t2_type.setFont(font) + self.t2_type.setObjectName("t2_type") + self.gridLayout_3.addWidget(self.t2_type, 15, 0, 1, 1) + self.version = QtWidgets.QLabel(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.version.sizePolicy().hasHeightForWidth()) + self.version.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.lna_box.setFont(font) - self.lna_box.setText("") - self.lna_box.setObjectName("lna_box") - self.gridLayout_3.addWidget(self.lna_box, 2, 1, 1, 1) - self.spur_box = QtWidgets.QCheckBox(self.analyserTab) + self.version.setFont(font) + self.version.setObjectName("version") + self.gridLayout_3.addWidget(self.version, 24, 0, 1, 1) + self.spur_box = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) self.spur_box.setFont(font) - self.spur_box.setText("") self.spur_box.setChecked(True) self.spur_box.setTristate(True) self.spur_box.setObjectName("spur_box") - self.gridLayout_3.addWidget(self.spur_box, 3, 1, 1, 1) - self.t2_type = QtWidgets.QComboBox(self.analyserTab) + self.gridLayout_3.addWidget(self.spur_box, 1, 0, 1, 1) + self.trace4 = QtWidgets.QCheckBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(7) + font.setBold(True) + font.setWeight(75) + self.trace4.setFont(font) + self.trace4.setObjectName("trace4") + self.gridLayout_3.addWidget(self.trace4, 18, 0, 1, 1) + self.t4_type = QtWidgets.QComboBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.t2_type.sizePolicy().hasHeightForWidth()) - self.t2_type.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.t4_type.sizePolicy().hasHeightForWidth()) + self.t4_type.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.t2_type.setFont(font) - self.t2_type.setObjectName("t2_type") - self.gridLayout_3.addWidget(self.t2_type, 9, 1, 1, 1) - self.rbw_box = QtWidgets.QComboBox(self.analyserTab) - self.rbw_box.setEnabled(True) + self.t4_type.setFont(font) + self.t4_type.setObjectName("t4_type") + self.gridLayout_3.addWidget(self.t4_type, 19, 0, 1, 1) + self.atten_box = QtWidgets.QSpinBox(self.ViewNormal) + self.atten_box.setEnabled(False) + font = QtGui.QFont() + font.setPointSize(7) + self.atten_box.setFont(font) + self.atten_box.setReadOnly(False) + self.atten_box.setMinimum(0) + self.atten_box.setMaximum(31) + self.atten_box.setProperty("value", 0) + self.atten_box.setObjectName("atten_box") + self.gridLayout_3.addWidget(self.atten_box, 4, 0, 1, 1) + self.mixerMode = QtWidgets.QLabel(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.rbw_box.sizePolicy().hasHeightForWidth()) - self.rbw_box.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.mixerMode.sizePolicy().hasHeightForWidth()) + self.mixerMode.setSizePolicy(sizePolicy) + self.mixerMode.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(7) - self.rbw_box.setFont(font) - self.rbw_box.setEditable(True) - self.rbw_box.setObjectName("rbw_box") - self.gridLayout_3.addWidget(self.rbw_box, 5, 1, 1, 1) - self.label_10 = QtWidgets.QLabel(self.analyserTab) + self.mixerMode.setFont(font) + self.mixerMode.setAutoFillBackground(False) + self.mixerMode.setStyleSheet("background-color:lightGreen") + self.mixerMode.setFrameShape(QtWidgets.QFrame.NoFrame) + self.mixerMode.setFrameShadow(QtWidgets.QFrame.Plain) + self.mixerMode.setMidLineWidth(0) + self.mixerMode.setScaledContents(False) + self.mixerMode.setAlignment(QtCore.Qt.AlignCenter) + self.mixerMode.setObjectName("mixerMode") + self.gridLayout_3.addWidget(self.mixerMode, 23, 0, 1, 1) + self.lna_box = QtWidgets.QCheckBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(7) + font.setBold(False) + font.setWeight(50) + self.lna_box.setFont(font) + self.lna_box.setObjectName("lna_box") + self.gridLayout_3.addWidget(self.lna_box, 0, 0, 1, 1) + self.trace1 = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) font.setBold(True) - font.setUnderline(False) font.setWeight(75) - self.label_10.setFont(font) - self.label_10.setObjectName("label_10") - self.gridLayout_3.addWidget(self.label_10, 7, 0, 1, 2) - self.trace3 = QtWidgets.QCheckBox(self.analyserTab) + self.trace1.setFont(font) + self.trace1.setChecked(True) + self.trace1.setTristate(False) + self.trace1.setObjectName("trace1") + self.gridLayout_3.addWidget(self.trace1, 11, 0, 1, 1) + self.trace3 = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) font.setBold(True) font.setWeight(75) self.trace3.setFont(font) self.trace3.setObjectName("trace3") - self.gridLayout_3.addWidget(self.trace3, 10, 0, 1, 1) - self.atten_auto = QtWidgets.QCheckBox(self.analyserTab) - font = QtGui.QFont() - font.setPointSize(7) - self.atten_auto.setFont(font) - self.atten_auto.setChecked(True) - self.atten_auto.setObjectName("atten_auto") - self.gridLayout_3.addWidget(self.atten_auto, 1, 0, 1, 1) - self.label_8 = QtWidgets.QLabel(self.analyserTab) + self.gridLayout_3.addWidget(self.trace3, 16, 0, 1, 1) + self.battery = QtWidgets.QLabel(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth()) - self.label_8.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setUnderline(False) - font.setWeight(75) - self.label_8.setFont(font) - self.label_8.setObjectName("label_8") - self.gridLayout_3.addWidget(self.label_8, 12, 0, 1, 2) - self.trace2 = QtWidgets.QCheckBox(self.analyserTab) + sizePolicy.setHeightForWidth(self.battery.sizePolicy().hasHeightForWidth()) + self.battery.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.trace2.setFont(font) - self.trace2.setTristate(False) - self.trace2.setObjectName("trace2") - self.gridLayout_3.addWidget(self.trace2, 9, 0, 1, 1) - self.label_2 = QtWidgets.QLabel(self.analyserTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) + self.battery.setFont(font) + self.battery.setObjectName("battery") + self.gridLayout_3.addWidget(self.battery, 25, 0, 1, 1) + self.t3_type = QtWidgets.QComboBox(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth()) - self.label_2.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setUnderline(False) - font.setWeight(75) - self.label_2.setFont(font) - self.label_2.setObjectName("label_2") - self.gridLayout_3.addWidget(self.label_2, 4, 0, 1, 2) - self.atten_box = QtWidgets.QSpinBox(self.analyserTab) - self.atten_box.setEnabled(False) + sizePolicy.setHeightForWidth(self.t3_type.sizePolicy().hasHeightForWidth()) + self.t3_type.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.atten_box.setFont(font) - self.atten_box.setReadOnly(False) - self.atten_box.setMinimum(0) - self.atten_box.setMaximum(31) - self.atten_box.setProperty("value", 0) - self.atten_box.setObjectName("atten_box") - self.gridLayout_3.addWidget(self.atten_box, 1, 1, 1, 1) - self.battery = QtWidgets.QLabel(self.analyserTab) + self.t3_type.setFont(font) + self.t3_type.setObjectName("t3_type") + self.gridLayout_3.addWidget(self.t3_type, 17, 0, 1, 1) + self.t1_type = QtWidgets.QComboBox(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.t1_type.sizePolicy().hasHeightForWidth()) + self.t1_type.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.battery.setFont(font) - self.battery.setObjectName("battery") - self.gridLayout_3.addWidget(self.battery, 18, 1, 1, 1) - self.points_auto = QtWidgets.QCheckBox(self.analyserTab) + self.t1_type.setFont(font) + self.t1_type.setModelColumn(0) + self.t1_type.setObjectName("t1_type") + self.gridLayout_3.addWidget(self.t1_type, 12, 0, 1, 1) + self.points_auto = QtWidgets.QCheckBox(self.ViewNormal) self.points_auto.setEnabled(True) font = QtGui.QFont() font.setPointSize(7) + font.setBold(True) + font.setWeight(75) self.points_auto.setFont(font) self.points_auto.setChecked(True) self.points_auto.setObjectName("points_auto") - self.gridLayout_3.addWidget(self.points_auto, 6, 0, 1, 1) - spacerItem = QtWidgets.QSpacerItem(17, 13, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_3.addItem(spacerItem, 16, 0, 1, 1) - self.label_5 = QtWidgets.QLabel(self.analyserTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) - self.label_5.setSizePolicy(sizePolicy) - font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setUnderline(False) - font.setWeight(75) - self.label_5.setFont(font) - self.label_5.setObjectName("label_5") - self.gridLayout_3.addWidget(self.label_5, 0, 0, 1, 2) - self.trace4 = QtWidgets.QCheckBox(self.analyserTab) + self.rbwpointsgroup = QtWidgets.QButtonGroup(MainWindow) + self.rbwpointsgroup.setObjectName("rbwpointsgroup") + self.rbwpointsgroup.addButton(self.points_auto) + self.gridLayout_3.addWidget(self.points_auto, 9, 0, 1, 1) + self.trace2 = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) font.setBold(True) font.setWeight(75) - self.trace4.setFont(font) - self.trace4.setObjectName("trace4") - self.gridLayout_3.addWidget(self.trace4, 11, 0, 1, 1) - self.label_6 = QtWidgets.QLabel(self.analyserTab) + self.trace2.setFont(font) + self.trace2.setTristate(False) + self.trace2.setObjectName("trace2") + self.gridLayout_3.addWidget(self.trace2, 14, 0, 1, 1) + self.points_box = QtWidgets.QSpinBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) - self.label_6.setFont(font) - self.label_6.setObjectName("label_6") - self.gridLayout_3.addWidget(self.label_6, 18, 0, 1, 1) - self.t4_type = QtWidgets.QComboBox(self.analyserTab) + self.points_box.setFont(font) + self.points_box.setSuffix("") + self.points_box.setMinimum(1) + self.points_box.setMaximum(30000) + self.points_box.setSingleStep(100) + self.points_box.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) + self.points_box.setProperty("value", 400) + self.points_box.setObjectName("points_box") + self.gridLayout_3.addWidget(self.points_box, 10, 0, 1, 1) + self.rbw_box = QtWidgets.QComboBox(self.ViewNormal) + self.rbw_box.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.t4_type.sizePolicy().hasHeightForWidth()) - self.t4_type.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.rbw_box.sizePolicy().hasHeightForWidth()) + self.rbw_box.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.t4_type.setFont(font) - self.t4_type.setObjectName("t4_type") - self.gridLayout_3.addWidget(self.t4_type, 11, 1, 1, 1) - self.lna_label = QtWidgets.QLabel(self.analyserTab) + self.rbw_box.setFont(font) + self.rbw_box.setEditable(True) + self.rbw_box.setObjectName("rbw_box") + self.gridLayout_3.addWidget(self.rbw_box, 8, 0, 1, 1) + self.rbw_auto = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) font.setBold(True) font.setWeight(75) - self.lna_label.setFont(font) - self.lna_label.setObjectName("lna_label") - self.gridLayout_3.addWidget(self.lna_label, 2, 0, 1, 1) - self.avgSlider = QtWidgets.QSlider(self.analyserTab) + self.rbw_auto.setFont(font) + self.rbw_auto.setObjectName("rbw_auto") + self.rbwpointsgroup.addButton(self.rbw_auto) + self.gridLayout_3.addWidget(self.rbw_auto, 7, 0, 1, 1) + self.line_2 = QtWidgets.QFrame(self.ViewNormal) + self.line_2.setFrameShape(QtWidgets.QFrame.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_2.setObjectName("line_2") + self.gridLayout_3.addWidget(self.line_2, 2, 0, 1, 1) + self.gridLayout.addLayout(self.gridLayout_3, 0, 0, 1, 1) + self.gridLayout_2 = QtWidgets.QGridLayout() + self.gridLayout_2.setObjectName("gridLayout_2") + self.mkr_start = QtWidgets.QToolButton(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.mkr_start.setFont(font) + self.mkr_start.setArrowType(QtCore.Qt.LeftArrow) + self.mkr_start.setObjectName("mkr_start") + self.gridLayout_2.addWidget(self.mkr_start, 1, 4, 1, 1) + self.stop_freq = QtWidgets.QDoubleSpinBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.avgSlider.sizePolicy().hasHeightForWidth()) - self.avgSlider.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.stop_freq.sizePolicy().hasHeightForWidth()) + self.stop_freq.setSizePolicy(sizePolicy) font = QtGui.QFont() - font.setPointSize(7) - self.avgSlider.setFont(font) - self.avgSlider.setToolTip("") - self.avgSlider.setMinimum(1) - self.avgSlider.setMaximum(100) - self.avgSlider.setProperty("value", 10) - self.avgSlider.setOrientation(QtCore.Qt.Horizontal) - self.avgSlider.setInvertedAppearance(False) - self.avgSlider.setInvertedControls(False) - self.avgSlider.setTickPosition(QtWidgets.QSlider.TicksAbove) - self.avgSlider.setObjectName("avgSlider") - self.gridLayout_3.addWidget(self.avgSlider, 13, 0, 1, 3) - self.points_box = QtWidgets.QSpinBox(self.analyserTab) + font.setPointSize(8) + self.stop_freq.setFont(font) + self.stop_freq.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.stop_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) + self.stop_freq.setPrefix("") + self.stop_freq.setSuffix("") + self.stop_freq.setDecimals(6) + self.stop_freq.setMinimum(0.1) + self.stop_freq.setMaximum(6000.0) + self.stop_freq.setSingleStep(1.0) + self.stop_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) + self.stop_freq.setProperty("value", 108.0) + self.stop_freq.setObjectName("stop_freq") + self.gridLayout_2.addWidget(self.stop_freq, 1, 12, 1, 1) + self.m1_type = QtWidgets.QComboBox(self.ViewNormal) + self.m1_type.setMaximumSize(QtCore.QSize(55, 16777215)) font = QtGui.QFont() - font.setPointSize(7) - self.points_box.setFont(font) - self.points_box.setSuffix("") - self.points_box.setMinimum(1) - self.points_box.setMaximum(30000) - self.points_box.setSingleStep(100) - self.points_box.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) - self.points_box.setProperty("value", 400) - self.points_box.setObjectName("points_box") - self.gridLayout_3.addWidget(self.points_box, 6, 1, 1, 1) - self.t3_type = QtWidgets.QComboBox(self.analyserTab) + font.setFamily("Sans Serif") + font.setPointSize(8) + self.m1_type.setFont(font) + self.m1_type.setObjectName("m1_type") + self.gridLayout_2.addWidget(self.m1_type, 2, 6, 1, 1) + self.memSlider = QtWidgets.QSlider(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.t3_type.sizePolicy().hasHeightForWidth()) - self.t3_type.setSizePolicy(sizePolicy) + sizePolicy.setHeightForWidth(self.memSlider.sizePolicy().hasHeightForWidth()) + self.memSlider.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(7) - self.t3_type.setFont(font) - self.t3_type.setObjectName("t3_type") - self.gridLayout_3.addWidget(self.t3_type, 10, 1, 1, 1) - self.memSlider = QtWidgets.QSlider(self.analyserTab) + self.memSlider.setFont(font) self.memSlider.setMinimum(1) self.memSlider.setMaximum(200) self.memSlider.setProperty("value", 50) self.memSlider.setOrientation(QtCore.Qt.Horizontal) self.memSlider.setTickPosition(QtWidgets.QSlider.TicksAbove) self.memSlider.setObjectName("memSlider") - self.gridLayout_3.addWidget(self.memSlider, 15, 0, 1, 2) - self.label_7 = QtWidgets.QLabel(self.analyserTab) - font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_7.setFont(font) - self.label_7.setObjectName("label_7") - self.gridLayout_3.addWidget(self.label_7, 3, 0, 1, 1) - self.trace1 = QtWidgets.QCheckBox(self.analyserTab) + self.gridLayout_2.addWidget(self.memSlider, 2, 3, 1, 1) + self.span_freq = QtWidgets.QDoubleSpinBox(self.ViewNormal) font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.trace1.setFont(font) - self.trace1.setChecked(True) - self.trace1.setTristate(False) - self.trace1.setObjectName("trace1") - self.gridLayout_3.addWidget(self.trace1, 8, 0, 1, 1) - self.gridLayout.addLayout(self.gridLayout_3, 0, 0, 1, 1) - self.gridLayout_2 = QtWidgets.QGridLayout() - self.gridLayout_2.setObjectName("gridLayout_2") - self.span_freq = QtWidgets.QDoubleSpinBox(self.analyserTab) + font.setPointSize(8) + self.span_freq.setFont(font) self.span_freq.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) self.span_freq.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus) self.span_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) self.span_freq.setPrefix("") self.span_freq.setSuffix("") self.span_freq.setDecimals(3) - self.span_freq.setMaximum(6000.0) + self.span_freq.setMaximum(100000.0) self.span_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) self.span_freq.setProperty("value", 20.0) self.span_freq.setObjectName("span_freq") - self.gridLayout_2.addWidget(self.span_freq, 3, 13, 1, 1) - spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem1, 2, 5, 1, 1) - self.marker4 = QtWidgets.QCheckBox(self.analyserTab) - self.marker4.setObjectName("marker4") - self.gridLayout_2.addWidget(self.marker4, 2, 10, 1, 1) - self.marker3 = QtWidgets.QCheckBox(self.analyserTab) - self.marker3.setObjectName("marker3") - self.gridLayout_2.addWidget(self.marker3, 2, 9, 1, 1) - self.graphWidget = PlotWidget(self.analyserTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_2.addWidget(self.span_freq, 2, 12, 1, 1) + self.marker2 = QtWidgets.QCheckBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.marker2.setFont(font) + self.marker2.setAutoFillBackground(False) + self.marker2.setObjectName("marker2") + self.gridLayout_2.addWidget(self.marker2, 1, 7, 1, 1) + self.mkr_centre = QtWidgets.QToolButton(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.mkr_centre.setFont(font) + self.mkr_centre.setToolTipDuration(1) + self.mkr_centre.setArrowType(QtCore.Qt.UpArrow) + self.mkr_centre.setObjectName("mkr_centre") + self.gridLayout_2.addWidget(self.mkr_centre, 2, 4, 1, 1) + self.avgSlider = QtWidgets.QSlider(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.graphWidget.sizePolicy().hasHeightForWidth()) - self.graphWidget.setSizePolicy(sizePolicy) - self.graphWidget.setAutoFillBackground(False) - self.graphWidget.setStyleSheet("") - self.graphWidget.setObjectName("graphWidget") - self.gridLayout_2.addWidget(self.graphWidget, 0, 1, 1, 14) - self.scan_button = QtWidgets.QPushButton(self.analyserTab) + sizePolicy.setHeightForWidth(self.avgSlider.sizePolicy().hasHeightForWidth()) + self.avgSlider.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(7) + self.avgSlider.setFont(font) + self.avgSlider.setMinimum(1) + self.avgSlider.setMaximum(101) + self.avgSlider.setProperty("value", 10) + self.avgSlider.setOrientation(QtCore.Qt.Horizontal) + self.avgSlider.setInvertedAppearance(False) + self.avgSlider.setInvertedControls(False) + self.avgSlider.setTickPosition(QtWidgets.QSlider.TicksAbove) + self.avgSlider.setTickInterval(10) + self.avgSlider.setObjectName("avgSlider") + self.gridLayout_2.addWidget(self.avgSlider, 1, 3, 1, 1) + self.mToBand = QtWidgets.QToolButton(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.mToBand.setFont(font) + self.mToBand.setObjectName("mToBand") + self.gridLayout_2.addWidget(self.mToBand, 1, 0, 1, 1) + self.filterBox = QtWidgets.QComboBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.filterBox.setFont(font) + self.filterBox.setObjectName("filterBox") + self.gridLayout_2.addWidget(self.filterBox, 2, 1, 1, 1) + spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_2.addItem(spacerItem1, 1, 11, 1, 1) + self.centre_freq = QtWidgets.QDoubleSpinBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.centre_freq.setFont(font) + self.centre_freq.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.centre_freq.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus) + self.centre_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) + self.centre_freq.setPrefix("") + self.centre_freq.setSuffix("") + self.centre_freq.setDecimals(3) + self.centre_freq.setMinimum(0.1) + self.centre_freq.setMaximum(6000.0) + self.centre_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) + self.centre_freq.setProperty("value", 98.0) + self.centre_freq.setObjectName("centre_freq") + self.gridLayout_2.addWidget(self.centre_freq, 2, 2, 1, 1) + self.scan_button = QtWidgets.QPushButton(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.scan_button.sizePolicy().hasHeightForWidth()) self.scan_button.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(8) + self.scan_button.setFont(font) self.scan_button.setToolTip("") self.scan_button.setCheckable(False) self.scan_button.setObjectName("scan_button") - self.gridLayout_2.addWidget(self.scan_button, 2, 14, 1, 1) - self.start_freq = QtWidgets.QDoubleSpinBox(self.analyserTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + self.gridLayout_2.addWidget(self.scan_button, 1, 14, 1, 1) + self.presetMarker = QtWidgets.QCheckBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.presetMarker.setFont(font) + self.presetMarker.setObjectName("presetMarker") + self.gridLayout_2.addWidget(self.presetMarker, 1, 10, 1, 1) + self.band_box = QtWidgets.QComboBox(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.start_freq.sizePolicy().hasHeightForWidth()) - self.start_freq.setSizePolicy(sizePolicy) - self.start_freq.setFrame(True) - self.start_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) - self.start_freq.setPrefix("") - self.start_freq.setSuffix("") - self.start_freq.setDecimals(6) - self.start_freq.setMinimum(0.1) - self.start_freq.setMaximum(6000.0) - self.start_freq.setSingleStep(1.0) - self.start_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) - self.start_freq.setProperty("value", 87.5) - self.start_freq.setObjectName("start_freq") - self.gridLayout_2.addWidget(self.start_freq, 2, 3, 1, 1) - self.m3_type = QtWidgets.QComboBox(self.analyserTab) - self.m3_type.setMaximumSize(QtCore.QSize(55, 16777215)) + sizePolicy.setHeightForWidth(self.band_box.sizePolicy().hasHeightForWidth()) + self.band_box.setSizePolicy(sizePolicy) + self.band_box.setMaximumSize(QtCore.QSize(90, 16777215)) font = QtGui.QFont() - font.setPointSize(7) - self.m3_type.setFont(font) - self.m3_type.setObjectName("m3_type") - self.gridLayout_2.addWidget(self.m3_type, 3, 9, 1, 1) - self.m1_type = QtWidgets.QComboBox(self.analyserTab) - self.m1_type.setMaximumSize(QtCore.QSize(55, 16777215)) + font.setPointSize(8) + self.band_box.setFont(font) + self.band_box.setEditable(False) + self.band_box.setCurrentText("") + self.band_box.setInsertPolicy(QtWidgets.QComboBox.InsertAtBottom) + self.band_box.setObjectName("band_box") + self.gridLayout_2.addWidget(self.band_box, 1, 1, 1, 1) + self.m4_type = QtWidgets.QComboBox(self.ViewNormal) + self.m4_type.setMaximumSize(QtCore.QSize(55, 16777215)) font = QtGui.QFont() - font.setFamily("Sans Serif") - font.setPointSize(7) - self.m1_type.setFont(font) - self.m1_type.setObjectName("m1_type") - self.gridLayout_2.addWidget(self.m1_type, 3, 7, 1, 1) - self.presetLabel = QtWidgets.QCheckBox(self.analyserTab) - self.presetLabel.setObjectName("presetLabel") - self.gridLayout_2.addWidget(self.presetLabel, 3, 11, 1, 1) - self.stop_freq = QtWidgets.QDoubleSpinBox(self.analyserTab) + font.setPointSize(8) + self.m4_type.setFont(font) + self.m4_type.setObjectName("m4_type") + self.gridLayout_2.addWidget(self.m4_type, 2, 9, 1, 1) + self.marker1 = QtWidgets.QCheckBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.stop_freq.sizePolicy().hasHeightForWidth()) - self.stop_freq.setSizePolicy(sizePolicy) - self.stop_freq.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.stop_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) - self.stop_freq.setPrefix("") - self.stop_freq.setSuffix("") - self.stop_freq.setDecimals(6) - self.stop_freq.setMinimum(0.1) - self.stop_freq.setMaximum(6000.0) - self.stop_freq.setSingleStep(1.0) - self.stop_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) - self.stop_freq.setProperty("value", 108.0) - self.stop_freq.setObjectName("stop_freq") - self.gridLayout_2.addWidget(self.stop_freq, 2, 13, 1, 1) - self.m2_type = QtWidgets.QComboBox(self.analyserTab) + sizePolicy.setHeightForWidth(self.marker1.sizePolicy().hasHeightForWidth()) + self.marker1.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(8) + self.marker1.setFont(font) + self.marker1.setObjectName("marker1") + self.gridLayout_2.addWidget(self.marker1, 1, 6, 1, 1) + self.m2_type = QtWidgets.QComboBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -426,180 +444,111 @@ def setupUi(self, MainWindow): self.m2_type.setSizePolicy(sizePolicy) self.m2_type.setMaximumSize(QtCore.QSize(55, 16777215)) font = QtGui.QFont() - font.setPointSize(7) + font.setPointSize(8) self.m2_type.setFont(font) self.m2_type.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContentsOnFirstShow) self.m2_type.setMinimumContentsLength(0) self.m2_type.setIconSize(QtCore.QSize(16, 16)) self.m2_type.setPlaceholderText("") self.m2_type.setObjectName("m2_type") - self.gridLayout_2.addWidget(self.m2_type, 3, 8, 1, 1) - self.label_19 = QtWidgets.QLabel(self.analyserTab) + self.gridLayout_2.addWidget(self.m2_type, 2, 7, 1, 1) + self.m3_type = QtWidgets.QComboBox(self.ViewNormal) + self.m3_type.setMaximumSize(QtCore.QSize(55, 16777215)) font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_19.setFont(font) - self.label_19.setObjectName("label_19") - self.gridLayout_2.addWidget(self.label_19, 1, 6, 1, 2) - self.mkr_start = QtWidgets.QToolButton(self.analyserTab) - self.mkr_start.setArrowType(QtCore.Qt.LeftArrow) - self.mkr_start.setObjectName("mkr_start") - self.gridLayout_2.addWidget(self.mkr_start, 2, 6, 1, 1) - self.marker2 = QtWidgets.QCheckBox(self.analyserTab) - self.marker2.setAutoFillBackground(False) - self.marker2.setObjectName("marker2") - self.gridLayout_2.addWidget(self.marker2, 2, 8, 1, 1) - self.m4_type = QtWidgets.QComboBox(self.analyserTab) - self.m4_type.setMaximumSize(QtCore.QSize(55, 16777215)) + font.setPointSize(8) + self.m3_type.setFont(font) + self.m3_type.setObjectName("m3_type") + self.gridLayout_2.addWidget(self.m3_type, 2, 8, 1, 1) + self.graphWidget = PlotWidget(self.ViewNormal) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.graphWidget.sizePolicy().hasHeightForWidth()) + self.graphWidget.setSizePolicy(sizePolicy) + self.graphWidget.setAutoFillBackground(False) + self.graphWidget.setStyleSheet("") + self.graphWidget.setObjectName("graphWidget") + self.gridLayout_2.addWidget(self.graphWidget, 0, 0, 1, 15) + self.marker4 = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() - font.setPointSize(7) - self.m4_type.setFont(font) - self.m4_type.setObjectName("m4_type") - self.gridLayout_2.addWidget(self.m4_type, 3, 10, 1, 1) - self.marker1 = QtWidgets.QCheckBox(self.analyserTab) + font.setPointSize(8) + self.marker4.setFont(font) + self.marker4.setObjectName("marker4") + self.gridLayout_2.addWidget(self.marker4, 1, 9, 1, 1) + self.start_freq = QtWidgets.QDoubleSpinBox(self.ViewNormal) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.marker1.sizePolicy().hasHeightForWidth()) - self.marker1.setSizePolicy(sizePolicy) - self.marker1.setObjectName("marker1") - self.gridLayout_2.addWidget(self.marker1, 2, 7, 1, 1) - self.mkr_centre = QtWidgets.QToolButton(self.analyserTab) - self.mkr_centre.setToolTipDuration(1) - self.mkr_centre.setArrowType(QtCore.Qt.UpArrow) - self.mkr_centre.setObjectName("mkr_centre") - self.gridLayout_2.addWidget(self.mkr_centre, 3, 6, 1, 1) - self.presetMarker = QtWidgets.QCheckBox(self.analyserTab) - self.presetMarker.setObjectName("presetMarker") - self.gridLayout_2.addWidget(self.presetMarker, 2, 11, 1, 1) - self.centre_freq = QtWidgets.QDoubleSpinBox(self.analyserTab) - self.centre_freq.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) - self.centre_freq.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus) - self.centre_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) - self.centre_freq.setPrefix("") - self.centre_freq.setSuffix("") - self.centre_freq.setDecimals(3) - self.centre_freq.setMinimum(0.1) - self.centre_freq.setMaximum(6000.0) - self.centre_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) - self.centre_freq.setProperty("value", 98.0) - self.centre_freq.setObjectName("centre_freq") - self.gridLayout_2.addWidget(self.centre_freq, 3, 3, 1, 1) - self.label_15 = QtWidgets.QLabel(self.analyserTab) + sizePolicy.setHeightForWidth(self.start_freq.sizePolicy().hasHeightForWidth()) + self.start_freq.setSizePolicy(sizePolicy) font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_15.setFont(font) - self.label_15.setObjectName("label_15") - self.gridLayout_2.addWidget(self.label_15, 1, 13, 1, 1) - self.label_9 = QtWidgets.QLabel(self.analyserTab) + font.setPointSize(8) + self.start_freq.setFont(font) + self.start_freq.setFrame(True) + self.start_freq.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue) + self.start_freq.setPrefix("") + self.start_freq.setSuffix("") + self.start_freq.setDecimals(6) + self.start_freq.setMinimum(0.1) + self.start_freq.setMaximum(6000.0) + self.start_freq.setSingleStep(1.0) + self.start_freq.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType) + self.start_freq.setProperty("value", 87.5) + self.start_freq.setObjectName("start_freq") + self.gridLayout_2.addWidget(self.start_freq, 1, 2, 1, 1) + self.presetLabel = QtWidgets.QCheckBox(self.ViewNormal) font = QtGui.QFont() - font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_9.setFont(font) - self.label_9.setObjectName("label_9") - self.gridLayout_2.addWidget(self.label_9, 1, 3, 1, 1) - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_2.addItem(spacerItem2, 2, 12, 1, 1) - self.band_box = QtWidgets.QComboBox(self.analyserTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.band_box.sizePolicy().hasHeightForWidth()) - self.band_box.setSizePolicy(sizePolicy) - self.band_box.setMaximumSize(QtCore.QSize(90, 16777215)) - self.band_box.setEditable(False) - self.band_box.setCurrentText("") - self.band_box.setInsertPolicy(QtWidgets.QComboBox.InsertAtBottom) - self.band_box.setModelColumn(1) - self.band_box.setObjectName("band_box") - self.gridLayout_2.addWidget(self.band_box, 2, 2, 1, 1) - self.mToBand = QtWidgets.QToolButton(self.analyserTab) - self.mToBand.setObjectName("mToBand") - self.gridLayout_2.addWidget(self.mToBand, 2, 1, 1, 1) - self.label_16 = QtWidgets.QLabel(self.analyserTab) + font.setPointSize(8) + self.presetLabel.setFont(font) + self.presetLabel.setObjectName("presetLabel") + self.gridLayout_2.addWidget(self.presetLabel, 2, 10, 1, 1) + self.marker3 = QtWidgets.QCheckBox(self.ViewNormal) + font = QtGui.QFont() + font.setPointSize(8) + self.marker3.setFont(font) + self.marker3.setObjectName("marker3") + self.gridLayout_2.addWidget(self.marker3, 1, 8, 1, 1) + self.timeSpectrum = QtWidgets.QToolButton(self.ViewNormal) font = QtGui.QFont() font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_16.setFont(font) - self.label_16.setObjectName("label_16") - self.gridLayout_2.addWidget(self.label_16, 1, 1, 1, 2) + self.timeSpectrum.setFont(font) + self.timeSpectrum.setLayoutDirection(QtCore.Qt.LeftToRight) + self.timeSpectrum.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) + self.timeSpectrum.setArrowType(QtCore.Qt.RightArrow) + self.timeSpectrum.setObjectName("timeSpectrum") + self.gridLayout_2.addWidget(self.timeSpectrum, 1, 13, 1, 1) self.gridLayout.addLayout(self.gridLayout_2, 0, 1, 1, 1) - self.tabWidget.addTab(self.analyserTab, "") - self.TimeTab = QtWidgets.QWidget() - self.TimeTab.setEnabled(True) - self.TimeTab.setObjectName("TimeTab") - self.gridLayout_6 = QtWidgets.QGridLayout(self.TimeTab) + self.stackedWidget.addWidget(self.ViewNormal) + self.View3D = QtWidgets.QWidget() + self.View3D.setObjectName("View3D") + self.gridLayout_6 = QtWidgets.QGridLayout(self.View3D) self.gridLayout_6.setObjectName("gridLayout_6") self.gridLayout_4 = QtWidgets.QGridLayout() self.gridLayout_4.setObjectName("gridLayout_4") - self.bConst = QtWidgets.QDoubleSpinBox(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.bConst.sizePolicy().hasHeightForWidth()) - self.bConst.setSizePolicy(sizePolicy) - self.bConst.setMinimumSize(QtCore.QSize(16, 0)) - font = QtGui.QFont() - font.setPointSize(7) - self.bConst.setFont(font) - self.bConst.setDecimals(3) - self.bConst.setSingleStep(0.01) - self.bConst.setObjectName("bConst") - self.gridLayout_4.addWidget(self.bConst, 5, 1, 1, 1) - self.label_14 = QtWidgets.QLabel(self.TimeTab) - font = QtGui.QFont() - font.setFamily("Sans Serif") - font.setPointSize(7) - self.label_14.setFont(font) - self.label_14.setObjectName("label_14") - self.gridLayout_4.addWidget(self.label_14, 6, 0, 1, 3) - self.glSmooth = QtWidgets.QCheckBox(self.TimeTab) + self.timeR = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() font.setPointSize(7) - self.glSmooth.setFont(font) - self.glSmooth.setLayoutDirection(QtCore.Qt.LeftToRight) - self.glSmooth.setObjectName("glSmooth") - self.gridLayout_4.addWidget(self.glSmooth, 8, 0, 1, 1) - self.bMulti = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.timeR.setFont(font) + self.timeR.setArrowType(QtCore.Qt.NoArrow) + self.timeR.setObjectName("timeR") + self.gridLayout_4.addWidget(self.timeR, 16, 6, 1, 1) + self.gMulti = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.bMulti.sizePolicy().hasHeightForWidth()) - self.bMulti.setSizePolicy(sizePolicy) - self.bMulti.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.gMulti.sizePolicy().hasHeightForWidth()) + self.gMulti.setSizePolicy(sizePolicy) + self.gMulti.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.bMulti.setFont(font) - self.bMulti.setDecimals(3) - self.bMulti.setMinimum(0.4) - self.bMulti.setSingleStep(0.001) - self.bMulti.setProperty("value", 0.4) - self.bMulti.setObjectName("bMulti") - self.gridLayout_4.addWidget(self.bMulti, 5, 0, 1, 1) - self.grid = QtWidgets.QCheckBox(self.TimeTab) - self.grid.setLayoutDirection(QtCore.Qt.LeftToRight) - self.grid.setChecked(True) - self.grid.setObjectName("grid") - self.gridLayout_4.addWidget(self.grid, 11, 16, 1, 1) - self.reset3D = QtWidgets.QPushButton(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(2) - sizePolicy.setHeightForWidth(self.reset3D.sizePolicy().hasHeightForWidth()) - self.reset3D.setSizePolicy(sizePolicy) - self.reset3D.setMinimumSize(QtCore.QSize(5, 0)) - font = QtGui.QFont() - font.setPointSize(9) - self.reset3D.setFont(font) - self.reset3D.setIconSize(QtCore.QSize(10, 16)) - self.reset3D.setObjectName("reset3D") - self.gridLayout_4.addWidget(self.reset3D, 11, 17, 1, 1) - self.rExponent = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.gMulti.setFont(font) + self.gMulti.setDecimals(3) + self.gMulti.setMinimum(0.001) + self.gMulti.setSingleStep(0.001) + self.gMulti.setProperty("value", 0.01) + self.gMulti.setObjectName("gMulti") + self.gridLayout_4.addWidget(self.gMulti, 4, 0, 1, 1) + self.rExponent = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -614,47 +563,46 @@ def setupUi(self, MainWindow): self.rExponent.setSingleStep(0.1) self.rExponent.setProperty("value", 0.6) self.rExponent.setObjectName("rExponent") - self.gridLayout_4.addWidget(self.rExponent, 3, 2, 1, 1) - self.orbitU = QtWidgets.QToolButton(self.TimeTab) + self.gridLayout_4.addWidget(self.rExponent, 11, 0, 1, 1) + self.orbitU = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() - font.setPointSize(9) + font.setPointSize(7) self.orbitU.setFont(font) self.orbitU.setArrowType(QtCore.Qt.UpArrow) self.orbitU.setObjectName("orbitU") - self.gridLayout_4.addWidget(self.orbitU, 10, 8, 1, 1) - self.glNormals = QtWidgets.QCheckBox(self.TimeTab) + self.gridLayout_4.addWidget(self.orbitU, 15, 7, 1, 1) + self.glSmooth = QtWidgets.QCheckBox(self.View3D) font = QtGui.QFont() font.setPointSize(7) - self.glNormals.setFont(font) - self.glNormals.setLayoutDirection(QtCore.Qt.LeftToRight) - self.glNormals.setObjectName("glNormals") - self.gridLayout_4.addWidget(self.glNormals, 7, 0, 1, 1) - self.signalUp = QtWidgets.QToolButton(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.signalUp.setFont(font) - self.signalUp.setArrowType(QtCore.Qt.NoArrow) - self.signalUp.setObjectName("signalUp") - self.gridLayout_4.addWidget(self.signalUp, 11, 8, 1, 1) - self.bExponent = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.glSmooth.setFont(font) + self.glSmooth.setLayoutDirection(QtCore.Qt.LeftToRight) + self.glSmooth.setObjectName("glSmooth") + self.gridLayout_4.addWidget(self.glSmooth, 16, 0, 1, 1) + self.rMulti = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.bExponent.sizePolicy().hasHeightForWidth()) - self.bExponent.setSizePolicy(sizePolicy) - self.bExponent.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.rMulti.sizePolicy().hasHeightForWidth()) + self.rMulti.setSizePolicy(sizePolicy) + self.rMulti.setMinimumSize(QtCore.QSize(0, 0)) + self.rMulti.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setPointSize(7) - self.bExponent.setFont(font) - self.bExponent.setMinimum(-10.0) - self.bExponent.setMaximum(10.0) - self.bExponent.setSingleStep(0.1) - self.bExponent.setProperty("value", -0.3) - self.bExponent.setObjectName("bExponent") - self.gridLayout_4.addWidget(self.bExponent, 5, 2, 1, 1) - spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.gridLayout_4.addItem(spacerItem3, 10, 13, 1, 1) - self.openGLWidget = GLViewWidget(self.TimeTab) + self.rMulti.setFont(font) + self.rMulti.setDecimals(3) + self.rMulti.setMinimum(0.001) + self.rMulti.setSingleStep(0.001) + self.rMulti.setProperty("value", 0.01) + self.rMulti.setObjectName("rMulti") + self.gridLayout_4.addWidget(self.rMulti, 3, 0, 1, 1) + self.glNormals = QtWidgets.QCheckBox(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.glNormals.setFont(font) + self.glNormals.setLayoutDirection(QtCore.Qt.LeftToRight) + self.glNormals.setObjectName("glNormals") + self.gridLayout_4.addWidget(self.glNormals, 15, 0, 1, 1) + self.openGLWidget = GLViewWidget(self.View3D) self.openGLWidget.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) @@ -662,179 +610,139 @@ def setupUi(self, MainWindow): sizePolicy.setHeightForWidth(self.openGLWidget.sizePolicy().hasHeightForWidth()) self.openGLWidget.setSizePolicy(sizePolicy) self.openGLWidget.setObjectName("openGLWidget") - self.gridLayout_4.addWidget(self.openGLWidget, 0, 3, 10, 15) - self.timeF = QtWidgets.QToolButton(self.TimeTab) + self.gridLayout_4.addWidget(self.openGLWidget, 0, 2, 15, 16) + self.gConst = QtWidgets.QDoubleSpinBox(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.gConst.sizePolicy().hasHeightForWidth()) + self.gConst.setSizePolicy(sizePolicy) + self.gConst.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() - font.setPointSize(9) - self.timeF.setFont(font) - self.timeF.setArrowType(QtCore.Qt.NoArrow) - self.timeF.setObjectName("timeF") - self.gridLayout_4.addWidget(self.timeF, 11, 6, 1, 1) - spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.gridLayout_4.addItem(spacerItem4, 9, 0, 1, 1) - self.label_13 = QtWidgets.QLabel(self.TimeTab) + font.setPointSize(7) + self.gConst.setFont(font) + self.gConst.setDecimals(3) + self.gConst.setSingleStep(0.01) + self.gConst.setObjectName("gConst") + self.gridLayout_4.addWidget(self.gConst, 8, 0, 1, 1) + self.label_11 = QtWidgets.QLabel(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_13.sizePolicy().hasHeightForWidth()) - self.label_13.setSizePolicy(sizePolicy) - self.label_13.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.label_11.sizePolicy().hasHeightForWidth()) + self.label_11.setSizePolicy(sizePolicy) + self.label_11.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.label_13.setFont(font) - self.label_13.setObjectName("label_13") - self.gridLayout_4.addWidget(self.label_13, 2, 2, 1, 1) - self.label_4 = QtWidgets.QLabel(self.TimeTab) + self.label_11.setFont(font) + self.label_11.setObjectName("label_11") + self.gridLayout_4.addWidget(self.label_11, 2, 0, 1, 1) + self.gridF = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() font.setPointSize(7) - font.setBold(True) - font.setWeight(75) - self.label_4.setFont(font) - self.label_4.setObjectName("label_4") - self.gridLayout_4.addWidget(self.label_4, 1, 0, 1, 2) - self.timeR = QtWidgets.QToolButton(self.TimeTab) + self.gridF.setFont(font) + self.gridF.setArrowType(QtCore.Qt.DownArrow) + self.gridF.setObjectName("gridF") + self.gridLayout_4.addWidget(self.gridF, 16, 13, 1, 1) + self.gridR = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() - font.setPointSize(9) - self.timeR.setFont(font) - self.timeR.setArrowType(QtCore.Qt.NoArrow) - self.timeR.setObjectName("timeR") - self.gridLayout_4.addWidget(self.timeR, 11, 7, 1, 1) - self.orbitD = QtWidgets.QToolButton(self.TimeTab) + font.setPointSize(7) + self.gridR.setFont(font) + self.gridR.setArrowType(QtCore.Qt.UpArrow) + self.gridR.setObjectName("gridR") + self.gridLayout_4.addWidget(self.gridR, 16, 14, 1, 1) + self.label_12 = QtWidgets.QLabel(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth()) + self.label_12.setSizePolicy(sizePolicy) + self.label_12.setMinimumSize(QtCore.QSize(16, 0)) + font = QtGui.QFont() + font.setPointSize(7) + self.label_12.setFont(font) + self.label_12.setObjectName("label_12") + self.gridLayout_4.addWidget(self.label_12, 6, 0, 1, 1) + self.orbitD = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() - font.setPointSize(9) + font.setPointSize(7) self.orbitD.setFont(font) self.orbitD.setArrowType(QtCore.Qt.DownArrow) self.orbitD.setObjectName("orbitD") - self.gridLayout_4.addWidget(self.orbitD, 10, 9, 1, 1) - self.freqR = QtWidgets.QToolButton(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.freqR.setFont(font) - self.freqR.setArrowType(QtCore.Qt.NoArrow) - self.freqR.setObjectName("freqR") - self.gridLayout_4.addWidget(self.freqR, 11, 10, 1, 1) - self.rotateBy = QtWidgets.QSpinBox(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.rotateBy.setFont(font) - self.rotateBy.setMaximum(90) - self.rotateBy.setSingleStep(5) - self.rotateBy.setProperty("value", 5) - self.rotateBy.setObjectName("rotateBy") - self.gridLayout_4.addWidget(self.rotateBy, 10, 5, 1, 1) - self.gConst = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.gridLayout_4.addWidget(self.orbitD, 15, 8, 1, 1) + self.rConst = QtWidgets.QDoubleSpinBox(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.rConst.sizePolicy().hasHeightForWidth()) + self.rConst.setSizePolicy(sizePolicy) + self.rConst.setMinimumSize(QtCore.QSize(16, 0)) + font = QtGui.QFont() + font.setPointSize(7) + self.rConst.setFont(font) + self.rConst.setDecimals(3) + self.rConst.setSingleStep(0.01) + self.rConst.setObjectName("rConst") + self.gridLayout_4.addWidget(self.rConst, 9, 0, 1, 1) + self.bMulti = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.gConst.sizePolicy().hasHeightForWidth()) - self.gConst.setSizePolicy(sizePolicy) - self.gConst.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.bMulti.sizePolicy().hasHeightForWidth()) + self.bMulti.setSizePolicy(sizePolicy) + self.bMulti.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.gConst.setFont(font) - self.gConst.setDecimals(3) - self.gConst.setSingleStep(0.01) - self.gConst.setObjectName("gConst") - self.gridLayout_4.addWidget(self.gConst, 4, 1, 1, 1) - self.signalDown = QtWidgets.QToolButton(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.signalDown.setFont(font) - self.signalDown.setArrowType(QtCore.Qt.NoArrow) - self.signalDown.setObjectName("signalDown") - self.gridLayout_4.addWidget(self.signalDown, 11, 9, 1, 1) - self.orbitR = QtWidgets.QToolButton(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.orbitR.setFont(font) - self.orbitR.setArrowType(QtCore.Qt.RightArrow) - self.orbitR.setObjectName("orbitR") - self.gridLayout_4.addWidget(self.orbitR, 10, 7, 1, 1) - self.gMulti = QtWidgets.QDoubleSpinBox(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + self.bMulti.setFont(font) + self.bMulti.setDecimals(3) + self.bMulti.setMinimum(0.4) + self.bMulti.setSingleStep(0.001) + self.bMulti.setProperty("value", 0.4) + self.bMulti.setObjectName("bMulti") + self.gridLayout_4.addWidget(self.bMulti, 5, 0, 1, 1) + self.label_13 = QtWidgets.QLabel(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.gMulti.sizePolicy().hasHeightForWidth()) - self.gMulti.setSizePolicy(sizePolicy) - self.gMulti.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.label_13.sizePolicy().hasHeightForWidth()) + self.label_13.setSizePolicy(sizePolicy) + self.label_13.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.gMulti.setFont(font) - self.gMulti.setDecimals(3) - self.gMulti.setMinimum(0.001) - self.gMulti.setSingleStep(0.001) - self.gMulti.setProperty("value", 0.01) - self.gMulti.setObjectName("gMulti") - self.gridLayout_4.addWidget(self.gMulti, 4, 0, 1, 1) - self.orbitL = QtWidgets.QToolButton(self.TimeTab) + self.label_13.setFont(font) + self.label_13.setObjectName("label_13") + self.gridLayout_4.addWidget(self.label_13, 10, 0, 1, 1) + spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.gridLayout_4.addItem(spacerItem2, 14, 0, 1, 1) + self.orbitL = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() - font.setPointSize(9) + font.setPointSize(7) self.orbitL.setFont(font) self.orbitL.setArrowType(QtCore.Qt.LeftArrow) self.orbitL.setObjectName("orbitL") - self.gridLayout_4.addWidget(self.orbitL, 10, 6, 1, 1) - self.freqL = QtWidgets.QToolButton(self.TimeTab) + self.gridLayout_4.addWidget(self.orbitL, 15, 5, 1, 1) + self.timeF = QtWidgets.QToolButton(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.timeF.setFont(font) + self.timeF.setArrowType(QtCore.Qt.NoArrow) + self.timeF.setObjectName("timeF") + self.gridLayout_4.addWidget(self.timeF, 16, 5, 1, 1) + self.freqL = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() - font.setPointSize(9) + font.setPointSize(7) self.freqL.setFont(font) self.freqL.setArrowType(QtCore.Qt.NoArrow) self.freqL.setObjectName("freqL") - self.gridLayout_4.addWidget(self.freqL, 11, 11, 1, 1) - self.label_17 = QtWidgets.QLabel(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.label_17.setFont(font) - self.label_17.setObjectName("label_17") - self.gridLayout_4.addWidget(self.label_17, 10, 4, 1, 1) - self.gridR = QtWidgets.QToolButton(self.TimeTab) - self.gridR.setArrowType(QtCore.Qt.UpArrow) - self.gridR.setObjectName("gridR") - self.gridLayout_4.addWidget(self.gridR, 11, 15, 1, 1) - self.Enabled3D = QtWidgets.QCheckBox(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.Enabled3D.setFont(font) - self.Enabled3D.setObjectName("Enabled3D") - self.gridLayout_4.addWidget(self.Enabled3D, 10, 16, 1, 1) - self.panBy = QtWidgets.QSpinBox(self.TimeTab) - font = QtGui.QFont() - font.setPointSize(9) - self.panBy.setFont(font) - self.panBy.setMaximum(10) - self.panBy.setSingleStep(1) - self.panBy.setProperty("value", 1) - self.panBy.setObjectName("panBy") - self.gridLayout_4.addWidget(self.panBy, 11, 5, 1, 1) - self.label_11 = QtWidgets.QLabel(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_11.sizePolicy().hasHeightForWidth()) - self.label_11.setSizePolicy(sizePolicy) - self.label_11.setMinimumSize(QtCore.QSize(16, 0)) - font = QtGui.QFont() - font.setPointSize(7) - self.label_11.setFont(font) - self.label_11.setObjectName("label_11") - self.gridLayout_4.addWidget(self.label_11, 2, 0, 1, 1) - self.rMulti = QtWidgets.QDoubleSpinBox(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.rMulti.sizePolicy().hasHeightForWidth()) - self.rMulti.setSizePolicy(sizePolicy) - self.rMulti.setMinimumSize(QtCore.QSize(0, 0)) - self.rMulti.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.gridLayout_4.addWidget(self.freqL, 16, 10, 1, 1) + self.signalUp = QtWidgets.QToolButton(self.View3D) font = QtGui.QFont() font.setPointSize(7) - self.rMulti.setFont(font) - self.rMulti.setDecimals(3) - self.rMulti.setMinimum(0.001) - self.rMulti.setSingleStep(0.001) - self.rMulti.setProperty("value", 0.01) - self.rMulti.setObjectName("rMulti") - self.gridLayout_4.addWidget(self.rMulti, 3, 0, 1, 1) - self.gExponent = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.signalUp.setFont(font) + self.signalUp.setArrowType(QtCore.Qt.NoArrow) + self.signalUp.setObjectName("signalUp") + self.gridLayout_4.addWidget(self.signalUp, 16, 7, 1, 1) + self.gExponent = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -849,8 +757,11 @@ def setupUi(self, MainWindow): self.gExponent.setSingleStep(0.1) self.gExponent.setProperty("value", 2.0) self.gExponent.setObjectName("gExponent") - self.gridLayout_4.addWidget(self.gExponent, 4, 2, 1, 1) - self.zoom = QtWidgets.QSlider(self.TimeTab) + self.gridLayout_4.addWidget(self.gExponent, 12, 0, 1, 1) + self.zoom = QtWidgets.QSlider(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.zoom.setFont(font) self.zoom.setMaximum(200) self.zoom.setProperty("value", 40) self.zoom.setSliderPosition(40) @@ -858,58 +769,138 @@ def setupUi(self, MainWindow): self.zoom.setInvertedAppearance(True) self.zoom.setInvertedControls(False) self.zoom.setObjectName("zoom") - self.gridLayout_4.addWidget(self.zoom, 10, 10, 1, 3) - self.rConst = QtWidgets.QDoubleSpinBox(self.TimeTab) + self.gridLayout_4.addWidget(self.zoom, 15, 9, 1, 3) + self.bConst = QtWidgets.QDoubleSpinBox(self.View3D) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.rConst.sizePolicy().hasHeightForWidth()) - self.rConst.setSizePolicy(sizePolicy) - self.rConst.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.bConst.sizePolicy().hasHeightForWidth()) + self.bConst.setSizePolicy(sizePolicy) + self.bConst.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.rConst.setFont(font) - self.rConst.setDecimals(3) - self.rConst.setSingleStep(0.01) - self.rConst.setObjectName("rConst") - self.gridLayout_4.addWidget(self.rConst, 3, 1, 1, 1) - self.label_12 = QtWidgets.QLabel(self.TimeTab) - sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) + self.bConst.setFont(font) + self.bConst.setDecimals(3) + self.bConst.setSingleStep(0.01) + self.bConst.setObjectName("bConst") + self.gridLayout_4.addWidget(self.bConst, 7, 0, 1, 1) + self.label_17 = QtWidgets.QLabel(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.label_17.setFont(font) + self.label_17.setObjectName("label_17") + self.gridLayout_4.addWidget(self.label_17, 15, 3, 1, 1) + self.signalDown = QtWidgets.QToolButton(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.signalDown.setFont(font) + self.signalDown.setArrowType(QtCore.Qt.NoArrow) + self.signalDown.setObjectName("signalDown") + self.gridLayout_4.addWidget(self.signalDown, 16, 8, 1, 1) + self.freqR = QtWidgets.QToolButton(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.freqR.setFont(font) + self.freqR.setArrowType(QtCore.Qt.NoArrow) + self.freqR.setObjectName("freqR") + self.gridLayout_4.addWidget(self.freqR, 16, 9, 1, 1) + self.panBy = QtWidgets.QSpinBox(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.panBy.setFont(font) + self.panBy.setMaximum(10) + self.panBy.setSingleStep(1) + self.panBy.setProperty("value", 1) + self.panBy.setObjectName("panBy") + self.gridLayout_4.addWidget(self.panBy, 16, 4, 1, 1) + self.rotateBy = QtWidgets.QSpinBox(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.rotateBy.setFont(font) + self.rotateBy.setMaximum(90) + self.rotateBy.setSingleStep(5) + self.rotateBy.setProperty("value", 5) + self.rotateBy.setObjectName("rotateBy") + self.gridLayout_4.addWidget(self.rotateBy, 15, 4, 1, 1) + self.label_4 = QtWidgets.QLabel(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + font.setBold(True) + font.setWeight(75) + self.label_4.setFont(font) + self.label_4.setObjectName("label_4") + self.gridLayout_4.addWidget(self.label_4, 1, 0, 1, 2) + self.orbitR = QtWidgets.QToolButton(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.orbitR.setFont(font) + self.orbitR.setArrowType(QtCore.Qt.RightArrow) + self.orbitR.setObjectName("orbitR") + self.gridLayout_4.addWidget(self.orbitR, 15, 6, 1, 1) + self.bExponent = QtWidgets.QDoubleSpinBox(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth()) - self.label_12.setSizePolicy(sizePolicy) - self.label_12.setMinimumSize(QtCore.QSize(16, 0)) + sizePolicy.setHeightForWidth(self.bExponent.sizePolicy().hasHeightForWidth()) + self.bExponent.setSizePolicy(sizePolicy) + self.bExponent.setMinimumSize(QtCore.QSize(16, 0)) font = QtGui.QFont() font.setPointSize(7) - self.label_12.setFont(font) - self.label_12.setObjectName("label_12") - self.gridLayout_4.addWidget(self.label_12, 2, 1, 1, 1) - self.label_18 = QtWidgets.QLabel(self.TimeTab) + self.bExponent.setFont(font) + self.bExponent.setMinimum(-10.0) + self.bExponent.setMaximum(10.0) + self.bExponent.setSingleStep(0.1) + self.bExponent.setProperty("value", -0.3) + self.bExponent.setObjectName("bExponent") + self.gridLayout_4.addWidget(self.bExponent, 13, 0, 1, 1) + self.run3D = QtWidgets.QPushButton(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.run3D.setFont(font) + self.run3D.setObjectName("run3D") + self.gridLayout_4.addWidget(self.run3D, 15, 17, 1, 1) + self.label_18 = QtWidgets.QLabel(self.View3D) font = QtGui.QFont() - font.setPointSize(9) + font.setPointSize(7) self.label_18.setFont(font) self.label_18.setObjectName("label_18") - self.gridLayout_4.addWidget(self.label_18, 11, 4, 1, 1) - self.run3D = QtWidgets.QPushButton(self.TimeTab) + self.gridLayout_4.addWidget(self.label_18, 16, 3, 1, 1) + self.reset3D = QtWidgets.QPushButton(self.View3D) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(2) + sizePolicy.setHeightForWidth(self.reset3D.sizePolicy().hasHeightForWidth()) + self.reset3D.setSizePolicy(sizePolicy) + self.reset3D.setMinimumSize(QtCore.QSize(5, 0)) font = QtGui.QFont() - font.setPointSize(9) - self.run3D.setFont(font) - self.run3D.setObjectName("run3D") - self.gridLayout_4.addWidget(self.run3D, 10, 17, 1, 1) - self.gridF = QtWidgets.QToolButton(self.TimeTab) - self.gridF.setArrowType(QtCore.Qt.DownArrow) - self.gridF.setObjectName("gridF") - self.gridLayout_4.addWidget(self.gridF, 11, 14, 1, 1) + font.setPointSize(7) + self.reset3D.setFont(font) + self.reset3D.setIconSize(QtCore.QSize(10, 16)) + self.reset3D.setObjectName("reset3D") + self.gridLayout_4.addWidget(self.reset3D, 16, 17, 1, 1) + self.analyser = QtWidgets.QToolButton(self.View3D) + self.analyser.setArrowType(QtCore.Qt.LeftArrow) + self.analyser.setObjectName("analyser") + self.gridLayout_4.addWidget(self.analyser, 15, 16, 1, 1) + self.grid = QtWidgets.QCheckBox(self.View3D) + font = QtGui.QFont() + font.setPointSize(7) + self.grid.setFont(font) + self.grid.setLayoutDirection(QtCore.Qt.LeftToRight) + self.grid.setChecked(True) + self.grid.setObjectName("grid") + self.gridLayout_4.addWidget(self.grid, 15, 13, 1, 2) + spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) + self.gridLayout_4.addItem(spacerItem3, 15, 2, 1, 1) self.gridLayout_6.addLayout(self.gridLayout_4, 0, 0, 1, 1) - self.tabWidget.addTab(self.TimeTab, "") - self.gridLayout_5.addWidget(self.tabWidget, 0, 0, 1, 1) + self.stackedWidget.addWidget(self.View3D) + self.gridLayout_5.addWidget(self.stackedWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.menuBar = QtWidgets.QMenuBar(MainWindow) - self.menuBar.setGeometry(QtCore.QRect(0, 0, 1024, 23)) + self.menuBar.setGeometry(QtCore.QRect(0, 0, 1000, 23)) self.menuBar.setObjectName("menuBar") self.menu_Help = QtWidgets.QMenu(self.menuBar) self.menu_Help.setObjectName("menu_Help") @@ -934,87 +925,100 @@ def setupUi(self, MainWindow): self.menuBar.addAction(self.menu_Help.menuAction()) self.retranslateUi(MainWindow) - self.tabWidget.setCurrentIndex(0) + self.stackedWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate - self.version.setText(_translate("MainWindow", "Not Connected")) - self.label.setText(_translate("MainWindow", "Scan Memory Size")) - self.label_3.setText(_translate("MainWindow", "RBW kHz")) - self.lna_box.setToolTip(_translate("MainWindow", "Enable Low Noise Amplifier")) - self.spur_box.setToolTip(_translate("MainWindow", "Spur removal")) - self.rbw_box.setToolTip(_translate("MainWindow", "Resolution bandwidth")) - self.label_10.setText(_translate("MainWindow", "Trace Settings")) - self.trace3.setText(_translate("MainWindow", "T3")) - self.atten_auto.setText(_translate("MainWindow", "Auto")) - self.label_8.setText(_translate("MainWindow", "Trace Averaging")) - self.trace2.setText(_translate("MainWindow", "T2")) - self.label_2.setText(_translate("MainWindow", "Resolution BW & Scan Points")) + self.atten_auto.setToolTip(_translate("MainWindow", "Enable auto attenuator")) + self.atten_auto.setText(_translate("MainWindow", "Auto Att")) + self.t2_type.setToolTip(_translate("MainWindow", "Trace Type")) + self.version.setToolTip(_translate("MainWindow", "Firmware Version")) + self.version.setText(_translate("MainWindow", "Cnx")) + self.spur_box.setToolTip(_translate("MainWindow", "Spur reduction - impacts scanning speed")) + self.spur_box.setText(_translate("MainWindow", "Spurs")) + self.trace4.setToolTip(_translate("MainWindow", "Enable Trace")) + self.trace4.setText(_translate("MainWindow", "Trace 4")) + self.t4_type.setToolTip(_translate("MainWindow", "Trace Type")) + self.atten_box.setToolTip(_translate("MainWindow", "Set Attenuation")) self.atten_box.setSuffix(_translate("MainWindow", "dB")) + self.mixerMode.setText(_translate("MainWindow", "LNB")) + self.lna_box.setToolTip(_translate("MainWindow", "Enable Low Noise Amplifier")) + self.lna_box.setText(_translate("MainWindow", "LNA")) + self.trace1.setToolTip(_translate("MainWindow", "Enable Trace")) + self.trace1.setText(_translate("MainWindow", "Trace 1")) + self.trace3.setToolTip(_translate("MainWindow", "Enable Trace")) + self.trace3.setText(_translate("MainWindow", "Trace 3")) + self.battery.setToolTip(_translate("MainWindow", "Battery Voltage")) self.battery.setText(_translate("MainWindow", "Battery")) - self.points_auto.setToolTip(_translate("MainWindow", "Set points to suit RBW")) - self.points_auto.setText(_translate("MainWindow", "Auto Points")) - self.label_5.setText(_translate("MainWindow", " Attenuator")) - self.trace4.setText(_translate("MainWindow", "T4")) - self.label_6.setText(_translate("MainWindow", "Battery:")) - self.lna_label.setText(_translate("MainWindow", "LNA")) - self.memSlider.setToolTip(_translate("MainWindow", "Sweep scan store size")) - self.label_7.setText(_translate("MainWindow", "Spur")) - self.trace1.setText(_translate("MainWindow", "T1")) - self.marker4.setText(_translate("MainWindow", "M4")) - self.marker3.setText(_translate("MainWindow", "M3")) - self.scan_button.setText(_translate("MainWindow", "Run")) - self.m3_type.setToolTip(_translate("MainWindow", "Marker type")) - self.m1_type.setToolTip(_translate("MainWindow", "Marker type")) - self.presetLabel.setToolTip(_translate("MainWindow", "Label preset freqs")) - self.presetLabel.setText(_translate("MainWindow", "Labels")) - self.m2_type.setToolTip(_translate("MainWindow", "Marker type")) - self.label_19.setText(_translate("MainWindow", "Markers")) + self.t3_type.setToolTip(_translate("MainWindow", "Trace Type")) + self.t1_type.setToolTip(_translate("MainWindow", "Trace Type")) + self.points_auto.setToolTip(_translate("MainWindow", "Auto set points to suit RBW")) + self.points_auto.setText(_translate("MainWindow", "Auto Pts")) + self.trace2.setToolTip(_translate("MainWindow", "Enable Trace")) + self.trace2.setText(_translate("MainWindow", "Trace 2")) + self.points_box.setToolTip(_translate("MainWindow", "Set Points")) + self.rbw_box.setToolTip(_translate("MainWindow", "Set Resolution Bandwidth")) + self.rbw_auto.setToolTip(_translate("MainWindow", "Enable Auto Resolution Bandwidth")) + self.rbw_auto.setText(_translate("MainWindow", "Auto RBW")) self.mkr_start.setToolTip(_translate("MainWindow", "Set markers to start frequency")) self.mkr_start.setText(_translate("MainWindow", "...")) + self.stop_freq.setToolTip(_translate("MainWindow", "Sweep Stop")) + self.m1_type.setToolTip(_translate("MainWindow", "Marker type")) + self.memSlider.setToolTip(_translate("MainWindow", "Sweep scan store size")) + self.span_freq.setToolTip(_translate("MainWindow", "Sweep Span")) self.marker2.setText(_translate("MainWindow", "M2")) - self.marker1.setText(_translate("MainWindow", "M1")) self.mkr_centre.setToolTip(_translate("MainWindow", "Set markers in range")) self.mkr_centre.setText(_translate("MainWindow", "...")) - self.presetMarker.setToolTip(_translate("MainWindow", "Mark preset freqs")) - self.presetMarker.setText(_translate("MainWindow", "Presets")) - self.label_15.setText(_translate("MainWindow", "Stop / Span MHz")) - self.label_9.setText(_translate("MainWindow", "Start / Centre MHz")) - self.band_box.setToolTip(_translate("MainWindow", "Set Frequency Band")) + self.avgSlider.setToolTip(_translate("MainWindow", "Averaging")) self.mToBand.setToolTip(_translate("MainWindow", "Add Band preset from M1 and M2")) self.mToBand.setText(_translate("MainWindow", "+")) - self.label_16.setText(_translate("MainWindow", "Preset freq")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.analyserTab), _translate("MainWindow", "Analyser")) - self.label_14.setText(_translate("MainWindow", "Shade = (Colour * dBm + const) ^ exponent")) - self.glSmooth.setText(_translate("MainWindow", "Smooth")) - self.bMulti.setPrefix(_translate("MainWindow", "B ")) - self.grid.setText(_translate("MainWindow", "Show Grid")) - self.reset3D.setText(_translate("MainWindow", "Reset")) + self.filterBox.setToolTip(_translate("MainWindow", "Filter preset list")) + self.centre_freq.setToolTip(_translate("MainWindow", "Sweep Centre")) + self.scan_button.setText(_translate("MainWindow", "Run")) + self.presetMarker.setToolTip(_translate("MainWindow", "Mark preset freqs")) + self.presetMarker.setText(_translate("MainWindow", "Presets")) + self.band_box.setToolTip(_translate("MainWindow", "

Preset Frequency list

")) + self.m4_type.setToolTip(_translate("MainWindow", "Marker Type")) + self.marker1.setText(_translate("MainWindow", "M1")) + self.m2_type.setToolTip(_translate("MainWindow", "Marker type")) + self.m3_type.setToolTip(_translate("MainWindow", "Marker type")) + self.marker4.setText(_translate("MainWindow", "M4")) + self.start_freq.setToolTip(_translate("MainWindow", "Sweep Start")) + self.presetLabel.setToolTip(_translate("MainWindow", "Label preset freqs")) + self.presetLabel.setText(_translate("MainWindow", "Labels")) + self.marker3.setText(_translate("MainWindow", "M3")) + self.timeSpectrum.setToolTip(_translate("MainWindow", "3D spectrum")) + self.timeSpectrum.setText(_translate("MainWindow", "3D")) + self.timeR.setText(_translate("MainWindow", "B")) + self.gMulti.setPrefix(_translate("MainWindow", "G ")) self.orbitU.setText(_translate("MainWindow", "...")) + self.glSmooth.setText(_translate("MainWindow", "Smooth")) + self.rMulti.setPrefix(_translate("MainWindow", "R ")) self.glNormals.setText(_translate("MainWindow", "Normals")) - self.signalUp.setText(_translate("MainWindow", "Up")) - self.timeF.setText(_translate("MainWindow", "F")) - self.label_13.setText(_translate("MainWindow", "^ exponent")) - self.label_4.setText(_translate("MainWindow", "RGB Height Shader Settings")) - self.timeR.setText(_translate("MainWindow", "B")) + self.label_11.setText(_translate("MainWindow", "x sig dBm")) + self.gridF.setText(_translate("MainWindow", "...")) + self.gridR.setText(_translate("MainWindow", "...")) + self.label_12.setText(_translate("MainWindow", "+ constant")) self.orbitD.setText(_translate("MainWindow", "...")) - self.freqR.setText(_translate("MainWindow", "R")) - self.signalDown.setText(_translate("MainWindow", "Dn")) - self.orbitR.setText(_translate("MainWindow", "...")) - self.gMulti.setPrefix(_translate("MainWindow", "G ")) + self.bMulti.setPrefix(_translate("MainWindow", "B ")) + self.label_13.setText(_translate("MainWindow", "^ exponent")) self.orbitL.setText(_translate("MainWindow", "...")) + self.timeF.setText(_translate("MainWindow", "F")) self.freqL.setText(_translate("MainWindow", "L")) + self.signalUp.setText(_translate("MainWindow", "Up")) self.label_17.setText(_translate("MainWindow", "Orbit")) - self.gridR.setText(_translate("MainWindow", "...")) - self.Enabled3D.setText(_translate("MainWindow", "Enable 3D")) - self.label_11.setText(_translate("MainWindow", "x sig dBm")) - self.rMulti.setPrefix(_translate("MainWindow", "R ")) - self.label_12.setText(_translate("MainWindow", "+ constant")) - self.label_18.setText(_translate("MainWindow", "Axes")) + self.signalDown.setText(_translate("MainWindow", "Dn")) + self.freqR.setText(_translate("MainWindow", "R")) + self.label_4.setToolTip(_translate("MainWindow", "Shade = (Colour * dBm + const) ^ exponent")) + self.label_4.setText(_translate("MainWindow", "Shader")) + self.orbitR.setText(_translate("MainWindow", "...")) self.run3D.setText(_translate("MainWindow", "Run")) - self.gridF.setText(_translate("MainWindow", "...")) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.TimeTab), _translate("MainWindow", "3D Spectrum")) + self.label_18.setText(_translate("MainWindow", "Axes")) + self.reset3D.setText(_translate("MainWindow", "Reset")) + self.analyser.setToolTip(_translate("MainWindow", "Analyser")) + self.analyser.setText(_translate("MainWindow", "...")) + self.grid.setText(_translate("MainWindow", "Show Grid")) self.menu_Help.setTitle(_translate("MainWindow", "&Help")) self.menuSettings.setTitle(_translate("MainWindow", "&Settings")) self.actionsetting.setText(_translate("MainWindow", "setting")) diff --git a/QtTinySpectrum.ui b/QtTinySpectrum.ui index 8567e81..cad2e7f 100644 --- a/QtTinySpectrum.ui +++ b/QtTinySpectrum.ui @@ -7,8 +7,8 @@ 0 0 - 1024 - 600 + 1000 + 603 @@ -17,10 +17,16 @@ 0 + + + 25 + 25 + + - + 0 @@ -30,57 +36,53 @@ false - - QTabWidget::North - - - QTabWidget::Rounded - 0 - - - - 0 - 0 - - - - Analyser - + - - + + 7 - - Not Connected + + Qt::Vertical - + + + 17 + 13 + + + - - + + 7 75 true - false + + Enable auto attenuator + - Scan Memory Size + Auto Att + + + true - - + + 0 @@ -92,39 +94,33 @@ 7 - - 0 + + Trace Type - - - - - 7 - - - - RBW kHz + + + + + 0 + 0 + - - - - 7 - Enable Low Noise Amplifier + Firmware Version - + Cnx - + @@ -132,10 +128,10 @@ - Spur removal + Spur reduction - impacts scanning speed - + Spurs true @@ -145,26 +141,25 @@ - - - - - 0 - 0 - - + + 7 + 75 + true + + Enable Trace + + + Trace 4 + - - - - true - + + 0 @@ -177,80 +172,127 @@ - Resolution bandwidth - - - true + Trace Type - - + + + + false + 7 - 75 - true - false - - Trace Settings + + Set Attenuation + + + false + + + dB + + + 0 + + + 31 + + + 0 - - + + + + + 0 + 0 + + + + + 0 + 0 + + 7 - 75 - true + + false + + + background-color:lightGreen + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + - T3 + LNB + + + false + + + Qt::AlignCenter - - + + 7 + 50 + false - - Auto + + Enable Low Noise Amplifier - - true + + LNA - - - - - 0 - 0 - - + + 7 75 true - false + + Enable Trace + - Trace Averaging + Trace 1 + + + true + + + false - - + + 7 @@ -258,16 +300,16 @@ true - - T2 + + Enable Trace - - false + + Trace 3 - - + + 0 @@ -277,56 +319,56 @@ 7 - 75 - true - false + + Battery Voltage + - Resolution BW & Scan Points + Battery - - - - false + + + + + 0 + 0 + 7 - - false - - - dB - - - 0 - - - 31 - - - 0 + + Trace Type - - + + + + + 0 + 0 + + 7 - - Battery + + Trace Type + + + 0 - + true @@ -334,81 +376,79 @@ 7 + 75 + true - Set points to suit RBW + Auto set points to suit RBW - Auto Points + Auto Pts true + + rbwpointsgroup + - - - - Qt::Vertical - - - - 17 - 13 - - - - - - - - - 0 - 0 - - + + 7 75 true - false + + Enable Trace + - Attenuator + Trace 2 + + + false - - + + 7 - 75 - true - - T4 + + Set Points - - - - - - - 7 - + + - - Battery: + + 1 + + + 30000 + + + 100 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 400 + + + + + + + true - - - - 0 @@ -420,10 +460,16 @@ 7 + + Set Resolution Bandwidth + + + true + - - + + 7 @@ -431,79 +477,115 @@ true + + Enable Auto Resolution Bandwidth + - LNA + Auto RBW + + rbwpointsgroup + - - - - - 0 - 0 - + + + + Qt::Horizontal + + + + + + + + - 7 + 8 - - - - 1 - - - 100 - - - 10 - - - Qt::Horizontal - - - false + Set markers to start frequency - - false + + ... - - QSlider::TicksAbove + + Qt::LeftArrow - - + + + + + 0 + 0 + + - 7 + 8 + + Sweep Stop + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + QAbstractSpinBox::CorrectToNearestValue + + + + + + 6 + - 1 + 0.100000000000000 - 30000 + 6000.000000000000000 - 100 + 1.000000000000000 QAbstractSpinBox::AdaptiveDecimalStepType - 400 + 108.000000000000000 - - + + + + + 55 + 16777215 + + + + + Sans Serif + 8 + + + + Marker type + + + + + 0 @@ -515,10 +597,6 @@ 7 - - - - Sweep scan store size @@ -539,46 +617,16 @@ - - - - - 7 - 75 - true - - - - Spur - - - - - + + - 7 - 75 - true + 8 - - T1 - - - true - - - false + + Sweep Span - - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -598,7 +646,7 @@ 3 - 6000.000000000000000 + 100000.000000000000000 QAbstractSpinBox::AdaptiveDecimalStepType @@ -608,78 +656,139 @@ - - - - Qt::Horizontal + + + + + 8 + - - - 40 - 20 - + + false - - - - - M4 + M2 - - + + + + + 8 + + + + Set markers in range + + + 1 + - M3 + ... + + + Qt::UpArrow - - + + - + 0 0 - + + + 7 + + + + Averaging + + + 1 + + + 101 + + + 10 + + + Qt::Horizontal + + false - - + + false + + + QSlider::TicksAbove + + + 10 - - - - - 0 - 0 - + + + + + 8 + - + Add Band preset from M1 and M2 - Run + + - - false + + + + + + + 8 + + + + Filter preset list - - - - - 0 - 0 - + + + + Qt::Horizontal - - true + + + 40 + 20 + + + + + + + + + 8 + + + + Sweep Centre + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + QAbstractSpinBox::PlusMinus QAbstractSpinBox::CorrectToNearestValue @@ -691,7 +800,7 @@ - 6 + 3 0.100000000000000 @@ -699,105 +808,123 @@ 6000.000000000000000 - - 1.000000000000000 - QAbstractSpinBox::AdaptiveDecimalStepType - 87.500000000000000 + 98.000000000000000 - - - - - 55 - 16777215 - + + + + + 0 + 0 + - 7 + 8 - Marker type + + + + Run + + + false - - - - - 55 - 16777215 - - + + - Sans Serif - 7 + 8 - Marker type - - - - - - - Label preset freqs + Mark preset freqs - Labels + Presets - - + + - + 0 0 - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + 90 + 16777215 + - - QAbstractSpinBox::CorrectToNearestValue + + + 8 + - - + + <html><head/><body><p>Preset Frequency list</p></body></html> - + + false + + - - 6 + + QComboBox::InsertAtBottom - - 0.100000000000000 + + + + + + + 55 + 16777215 + - - 6000.000000000000000 + + + 8 + - - 1.000000000000000 + + Marker Type - - QAbstractSpinBox::AdaptiveDecimalStepType + + + + + + + 0 + 0 + + + + + 8 + - - 108.000000000000000 + + M1 - + @@ -813,7 +940,7 @@ - 7 + 8 @@ -836,45 +963,8 @@ - - - - - 7 - 75 - true - - - - Markers - - - - - - - Set markers to start frequency - - - ... - - - Qt::LeftArrow - - - - - - false - - - M2 - - - - - + 55 @@ -883,57 +973,60 @@ - 7 + 8 + + Marker type + - - + + - + 0 0 - - M1 + + false + + + - - - - Set markers in range - - - 1 + + + + + 8 + - ... - - - Qt::UpArrow + M4 - - - - Mark preset freqs + + + + + 0 + 0 + - - Presets + + + 8 + - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + Sweep Start - - QAbstractSpinBox::PlusMinus + + true QAbstractSpinBox::CorrectToNearestValue @@ -945,7 +1038,7 @@ - 3 + 6 0.100000000000000 @@ -953,126 +1046,129 @@ 6000.000000000000000 + + 1.000000000000000 + QAbstractSpinBox::AdaptiveDecimalStepType - 98.000000000000000 + 87.500000000000000 - - + + - 7 - 75 - true + 8 + + Label preset freqs + - Stop / Span MHz + Labels - - + + - 7 - 75 - true + 8 - Start / Centre MHz + M3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 90 - 16777215 - + + + + + 7 + - Set Frequency Band + 3D spectrum - - false + + Qt::LeftToRight - - + + 3D - - QComboBox::InsertAtBottom + + Qt::ToolButtonIconOnly - - 1 + + Qt::RightArrow - - - - Add Band preset from M1 and M2 + + + + + + + + + + + + + 7 + - + + B + + + Qt::NoArrow - - + + + + + 0 + 0 + + + + + 16 + 0 + + 7 - 75 - true - - Preset freq + + G + + + 3 + + + 0.001000000000000 + + + 0.001000000000000 + + + 0.010000000000000 - - - - - - - true - - - 3D Spectrum - - - - - - + + 0 @@ -1090,28 +1186,36 @@ 7 - - 3 + + -10.000000000000000 + + + 10.000000000000000 - 0.010000000000000 + 0.100000000000000 + + + 0.600000000000000 - - + + - Sans Serif 7 - Shade = (Colour * dBm + const) ^ exponent + ... + + + Qt::UpArrow - + @@ -1126,18 +1230,24 @@ - - + + 0 0 - + + + 0 + 0 + + + - 16 - 0 + 16777215 + 16777215 @@ -1146,69 +1256,81 @@ - B + R 3 - 0.400000000000000 + 0.001000000000000 0.001000000000000 - 0.400000000000000 + 0.010000000000000 - - + + + + + 7 + + Qt::LeftToRight - Show Grid + Normals - + + + + + true + + + 0 + 0 + + - - + + - + 0 - 2 + 0 - 5 + 16 0 - 9 + 7 - - Reset + + 3 - - - 10 - 16 - + + 0.010000000000000 - - + + - + 0 0 @@ -1224,25 +1346,31 @@ 7 - - -10.000000000000000 + + x sig dBm - - 10.000000000000000 + + + + + + + 7 + - - 0.100000000000000 + + ... - - 0.600000000000000 + + Qt::DownArrow - - + + - 9 + 7 @@ -1253,38 +1381,47 @@ - - + + + + + 0 + 0 + + + + + 16 + 0 + + 7 - - Qt::LeftToRight - - Normals + + constant - - + + - 9 + 7 - Up + ... - Qt::NoArrow + Qt::DownArrow - - + + 0 @@ -1302,80 +1439,51 @@ 7 - - -10.000000000000000 - - - 10.000000000000000 + + 3 - 0.100000000000000 - - - -0.300000000000000 + 0.010000000000000 - - - - - 9 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - + + - + 0 0 - - - - + + + 16 + 0 + + - 9 + 7 - - F + + B - - Qt::NoArrow + + 3 - - - - - - Qt::Vertical + + 0.400000000000000 - - - 20 - 40 - + + 0.001000000000000 - + + 0.400000000000000 + + - + @@ -1399,85 +1507,81 @@ - - - - - 7 - 75 - true - + + + + Qt::Vertical - - RGB Height Shader Settings + + + 20 + 40 + - + - - + + - 9 + 7 - B + ... - Qt::NoArrow + Qt::LeftArrow - - + + - 9 + 7 - ... + F - Qt::DownArrow + Qt::NoArrow - - + + - 9 + 7 - R + L Qt::NoArrow - - + + - 9 + 7 - - 90 - - - 5 + + Up - - 5 + + Qt::NoArrow - - + + 0 @@ -1495,46 +1599,49 @@ 7 - - 3 + + -10.000000000000000 + + + 10.000000000000000 - 0.010000000000000 + 0.100000000000000 + + + 2.000000000000000 - - + + - 9 + 7 - - Dn + + 200 - - Qt::NoArrow + + 40 - - - - - - - 9 - + + 40 - - ... + + Qt::Horizontal - - Qt::RightArrow + + true + + + false - - + + 0 @@ -1552,173 +1659,126 @@ 7 - - G - 3 - - 0.001000000000000 - - 0.001000000000000 - - 0.010000000000000 - - + + - 9 + 7 - ... - - - Qt::LeftArrow + Orbit - - + + - 9 + 7 - L + Dn Qt::NoArrow - - + + - 9 + 7 - Orbit - - - - - - - ... + R - Qt::UpArrow + Qt::NoArrow - - + + - 9 + 7 - - Enable 3D + + 10 + + + 1 + + + 1 - - + + - 9 + 7 - 10 + 90 - 1 + 5 - 1 + 5 - - - - - 0 - 0 - - - - - 16 - 0 - - + + 7 + 75 + true + + Shade = (Colour * dBm + const) ^ exponent + - x sig dBm + Shader - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - + + 7 - - R - - - 3 - - - 0.001000000000000 - - - 0.001000000000000 + + ... - - 0.010000000000000 + + Qt::RightArrow - - + + 0 @@ -1746,70 +1806,45 @@ 0.100000000000000 - 2.000000000000000 + -0.300000000000000 - - - - 200 - - - 40 - - - 40 - - - Qt::Horizontal - - - true + + + + + 7 + - - false + + Run - - - - - 0 - 0 - - - - - 16 - 0 - - + + 7 - - 3 - - - 0.010000000000000 + + Axes - - + + - + 0 - 0 + 2 - 16 + 5 0 @@ -1819,43 +1854,64 @@ - + constant + Reset + + + + 10 + 16 + - - - - - 9 - + + + + Analyser - Axes + ... + + + Qt::LeftArrow - - + + - 9 + 7 + + Qt::LeftToRight + - Run + Show Grid + + + true - - - - ... + + + + + 7 + - - Qt::DownArrow + + Qt::Horizontal - + + + 40 + 20 + + + @@ -1871,7 +1927,7 @@ 0 0 - 1024 + 1000 23 @@ -1953,4 +2009,7 @@ true + + + diff --git a/QtTinySpectrum_old.ui b/QtTinySpectrum_old.ui new file mode 100644 index 0000000..8577e7d --- /dev/null +++ b/QtTinySpectrum_old.ui @@ -0,0 +1,1948 @@ + + + Ian Jefferson + MainWindow + + + + 0 + 0 + 1000 + 600 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + false + + + QTabWidget::North + + + QTabWidget::Rounded + + + 0 + + + + + 0 + 0 + + + + Analyser + + + + + + + + + 7 + 75 + true + + + + T4 + + + + + + + + 7 + + + + Battery: + + + + + + + + 0 + 0 + + + + + 7 + 75 + true + false + + + + Trace Averaging 1 - 101 + + + + + + + + 7 + 75 + true + false + + + + Trace Settings + + + + + + + + 7 + + + + Spur reduction - impacts scanning speed + + + Spur reduction + + + true + + + true + + + + + + + + 7 + 75 + true + + + + T2 + + + false + + + + + + + + 7 + + + + + + + 1 + + + 30000 + + + 100 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 400 + + + + + + + true + + + + 0 + 0 + + + + + 7 + + + + Resolution bandwidth + + + true + + + + + + + + 7 + + + + Not Connected + + + + + + + + 0 + 0 + + + + + 7 + + + + + + + + + 0 + 0 + + + + + 7 + 75 + true + false + + + + Spur reduction techniques. Impacts scanning speed + + + Resolution BW & Scan Points + + + + + + + + 0 + 0 + + + + + 7 + + + + + + + + true + + + + 7 + + + + Set points to suit RBW + + + Auto Points + + + true + + + rbwpointsgroup + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 7 + + + + false + + + background-color:lightGreen + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + Mixer/LNB mode + + + false + + + Qt::AlignCenter + + + + + + + + 7 + + + + Enable auto attenuator + + + Auto attenuator + + + true + + + + + + + + 7 + + + + Battery + + + + + + + + 0 + 0 + + + + + 7 + + + + 0 + + + + + + + false + + + + 7 + + + + false + + + dB + + + 0 + + + 31 + + + 0 + + + + + + + + 7 + + + + Enable Low Noise Amplifier + + + LNA on + + + + + + + + 7 + 75 + true + + + + T1 + + + true + + + false + + + + + + + + 0 + 0 + + + + + 7 + + + + + + + 1 + + + 101 + + + 10 + + + Qt::Horizontal + + + false + + + false + + + QSlider::TicksAbove + + + 10 + + + + + + + + 7 + + + + Auto RBW + + + rbwpointsgroup + + + + + + + + 0 + 0 + + + + + 7 + + + + + + + + Qt::Vertical + + + + 17 + 13 + + + + + + + + Sweep scan store size + + + 1 + + + 200 + + + 50 + + + Qt::Horizontal + + + QSlider::TicksAbove + + + + + + + + 7 + 75 + true + + + + T3 + + + + + + + + 7 + 75 + true + false + + + + Scan Memory Size + + + + + + + + + + + M3 + + + + + + + Label preset freqs + + + Labels + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + QAbstractSpinBox::PlusMinus + + + QAbstractSpinBox::CorrectToNearestValue + + + + + + + + + 3 + + + 0.100000000000000 + + + 6000.000000000000000 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 98.000000000000000 + + + + + + + + 0 + 0 + + + + M1 + + + + + + + + 0 + 0 + + + + + 55 + 16777215 + + + + + 7 + + + + Marker type + + + QComboBox::AdjustToContentsOnFirstShow + + + 0 + + + + 16 + 16 + + + + + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + QAbstractSpinBox::PlusMinus + + + QAbstractSpinBox::CorrectToNearestValue + + + + + + + + + 3 + + + 100000.000000000000000 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 20.000000000000000 + + + + + + + false + + + M2 + + + + + + + Mark preset freqs + + + Presets + + + + + + + + 0 + 0 + + + + + + + Run + + + false + + + + + + + + 55 + 16777215 + + + + + 7 + + + + Marker type + + + + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + QAbstractSpinBox::CorrectToNearestValue + + + + + + + + + 6 + + + 0.100000000000000 + + + 6000.000000000000000 + + + 1.000000000000000 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 108.000000000000000 + + + + + + + Add Band preset from M1 and M2 + + + + + + + + + + + + 55 + 16777215 + + + + + 7 + + + + + + + + + 0 + 0 + + + + true + + + QAbstractSpinBox::CorrectToNearestValue + + + + + + + + + 6 + + + 0.100000000000000 + + + 6000.000000000000000 + + + 1.000000000000000 + + + QAbstractSpinBox::AdaptiveDecimalStepType + + + 87.500000000000000 + + + + + + + M4 + + + + + + + + 7 + 75 + true + + + + Presets / Filter + + + + + + + Set markers in range + + + 1 + + + ... + + + Qt::UpArrow + + + + + + + + 7 + 75 + true + + + + Markers + + + + + + + + 0 + 0 + + + + + 90 + 16777215 + + + + <html><head/><body><p>Preset Frequency list</p></body></html> + + + false + + + + + + QComboBox::InsertAtBottom + + + + + + + + 7 + 75 + true + + + + Start / Centre MHz + + + + + + + Set markers to start frequency + + + ... + + + Qt::LeftArrow + + + + + + + Filter preset list + + + + + + + + 55 + 16777215 + + + + + Sans Serif + 7 + + + + Marker type + + + + + + + + 0 + 0 + + + + false + + + + + + + + + + + 7 + 75 + true + + + + Stop / Span MHz + + + + + + + + + + true + + + 3D Spectrum + + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + 3 + + + 0.010000000000000 + + + + + + + + Sans Serif + 7 + + + + Shade = (Colour * dBm + const) ^ exponent + + + + + + + + 7 + + + + Qt::LeftToRight + + + Smooth + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + B + + + 3 + + + 0.400000000000000 + + + 0.001000000000000 + + + 0.400000000000000 + + + + + + + Qt::LeftToRight + + + Show Grid + + + true + + + + + + + + 0 + 2 + + + + + 5 + 0 + + + + + 9 + + + + Reset + + + + 10 + 16 + + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + -10.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 0.600000000000000 + + + + + + + + 9 + + + + ... + + + Qt::UpArrow + + + + + + + + 7 + + + + Qt::LeftToRight + + + Normals + + + + + + + + 9 + + + + Up + + + Qt::NoArrow + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + -10.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + -0.300000000000000 + + + + + + + + 9 + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + + 0 + 0 + + + + + + + + + 9 + + + + F + + + Qt::NoArrow + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + ^ exponent + + + + + + + + 7 + 75 + true + + + + RGB Height Shader Settings + + + + + + + + 9 + + + + B + + + Qt::NoArrow + + + + + + + + 9 + + + + ... + + + Qt::DownArrow + + + + + + + + 9 + + + + R + + + Qt::NoArrow + + + + + + + + 9 + + + + 90 + + + 5 + + + 5 + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + 3 + + + 0.010000000000000 + + + + + + + + 9 + + + + Dn + + + Qt::NoArrow + + + + + + + + 9 + + + + ... + + + Qt::RightArrow + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + G + + + 3 + + + 0.001000000000000 + + + 0.001000000000000 + + + 0.010000000000000 + + + + + + + + 9 + + + + ... + + + Qt::LeftArrow + + + + + + + + 9 + + + + L + + + Qt::NoArrow + + + + + + + + 9 + + + + Orbit + + + + + + + ... + + + Qt::UpArrow + + + + + + + + 9 + + + + Enable 3D + + + + + + + + 9 + + + + 10 + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + x sig dBm + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 7 + + + + R + + + 3 + + + 0.001000000000000 + + + 0.001000000000000 + + + 0.010000000000000 + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + -10.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + + 200 + + + 40 + + + 40 + + + Qt::Horizontal + + + true + + + false + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + 3 + + + 0.010000000000000 + + + + + + + + 0 + 0 + + + + + 16 + 0 + + + + + 7 + + + + + constant + + + + + + + + 9 + + + + Axes + + + + + + + + 9 + + + + Run + + + + + + + ... + + + Qt::DownArrow + + + + + + + + + + + + + + + + 0 + 0 + 1000 + 23 + + + + + &Help + + + + + + &Settings + + + + + + + + + setting + + + + + level + + + + + About QtTinySA + + + + + Preferences + + + + + Sweeps + + + + + Bands and Markers + + + + + + PlotWidget + QWidget +
pyqtgraph
+ 1 +
+ + GLViewWidget + QOpenGLWidget +
pyqtgraph.opengl
+
+
+ + + + + 10 + + + 10 + + + true + + + true + + + true + + + + + +
diff --git a/README.md b/README.md index f286507..59d637f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # QtTinySA -![Markers](https://github.com/g4ixt/QtTinySA/assets/76836635/cd2b9ee6-08e6-4c02-a7c2-6e2146e24ebf) +![Screenshot_20240404_143416](https://github.com/g4ixt/QtTinySA/assets/76836635/47d9e6e9-daeb-4ae3-8e9c-91b5f041f6ff) A Python 'TinySA Ultra' (and original 'TinySA') GUI programme using Qt5 and PyQt5. Designed to run in Linux but works in Windows (minimal testing) and mac (no testing). The Windows executable does not work on Windows versions < 10. @@ -15,35 +15,11 @@ http://athome.kaashoek.com/tinySA/python/ The serial communication commands are based on Martin's Python NanoVNA/TinySA Toolset https://github.com/Ho-Ro -Dependencies: Install from your repository - numpy, pyqtgraph, pyopengl, pyqt5, pyserial. -You may need to add the Qt5 SQLite 3 database driver (libqt5sql5-sqlite) and Python3 bindings for QT5's SQL Module. +Dependencies: Install from your repository - numpy, pyqtgraph, pyopengl, pyqt5, pyserial, platformdirs. +You may need to add the Qt5 SQLite 3 database driver (libqt5sql5-sqlite) and Python3 bindings for QT5's SQL Module. You may need to update 'platformdirs'. If you get a serial exception on startup, add your username to the 'dialout' group. The 3D (time) spectrum requires OpenGL The GUI was originally designed for a 7" 1024 x 600 screen but should maximise properly. The GUI appearence may change significantly due to development. -There is limited error trapping. The 3D spectrum can sometimes crash the Application, but this only happens if it's enabled. - -Working Features (v0.8 onwards): - -Trace updates as tinySA scans. -LNA on/off. -SPUR auto/off. -Scan points selectable between 20 and 30,000 set manually or automatically based on RBW. -RBW control. -4 different colour traces, all can be turned on/off and set to average, max hold or min hold. -Selectable averaging. -Selectable memory depth. -Band frequency selection. -Start/stop frequency selection. -4 different colour markers. Each trace has 1 marker associated with it. Markers can be set to normal, delta, or one of the four largest peaks -with a selectable threshold. -The selected marker(s) can be set to sweep start frequency with a button, or can be draggged to any desired frequency. -All standard pyqtgraph features, selectable by right-click on the graph display, including: - Export as CSV, HDF5, Image file of various types, Matplotlib window, SVG -3D spectrum with measurements over time represented as a surface plot. Can be clicked/zoomed/dragged/rotated using the mouse -and with the control buttons. -The 3D spectrum can be enabled/disabled on its tab page. Disabled by default. -Trace and marker settings are saved when the programme is closed and restored when opened. -The 'band' frequencies can be edited and made visible or hidden in the preferences menu. -The signal level reminder lines can be made visible or hidden in the preferences menu. +There is limited error trapping. diff --git a/Screenshots/3D_20240404_143445.png b/Screenshots/3D_20240404_143445.png new file mode 100644 index 0000000..f7e3117 Binary files /dev/null and b/Screenshots/3D_20240404_143445.png differ diff --git a/Screenshots/LNB_Mode_20240405_101426.png b/Screenshots/LNB_Mode_20240405_101426.png new file mode 100644 index 0000000..762335d Binary files /dev/null and b/Screenshots/LNB_Mode_20240405_101426.png differ diff --git a/Screenshots/LNB_high_LO_20240405_101841.png b/Screenshots/LNB_high_LO_20240405_101841.png new file mode 100644 index 0000000..9fee3ad Binary files /dev/null and b/Screenshots/LNB_high_LO_20240405_101841.png differ diff --git a/Screenshots/Preferences_20240404_143501.png b/Screenshots/Preferences_20240404_143501.png new file mode 100644 index 0000000..ef704e0 Binary files /dev/null and b/Screenshots/Preferences_20240404_143501.png differ diff --git a/Screenshots/Preferences_LNB_20240405_101516.png b/Screenshots/Preferences_LNB_20240405_101516.png new file mode 100644 index 0000000..c9d5305 Binary files /dev/null and b/Screenshots/Preferences_LNB_20240405_101516.png differ diff --git a/Screenshots/RF_mic-markers.png b/Screenshots/RF_mic-markers.png new file mode 100644 index 0000000..ae71144 Binary files /dev/null and b/Screenshots/RF_mic-markers.png differ diff --git a/Screenshots/RF_mic.png b/Screenshots/RF_mic.png new file mode 100644 index 0000000..db3ccb7 Binary files /dev/null and b/Screenshots/RF_mic.png differ diff --git a/Screenshots/Spectrum_20240404_143416.png b/Screenshots/Spectrum_20240404_143416.png new file mode 100644 index 0000000..69890d0 Binary files /dev/null and b/Screenshots/Spectrum_20240404_143416.png differ diff --git a/preferences.ui b/preferences.ui index 8f85af1..6a2c8d8 100644 --- a/preferences.ui +++ b/preferences.ui @@ -6,385 +6,432 @@ 0 0 - 412 - 701 + 800 + 600 Preferences - - - - - - - Low - - - true - - - buttonGroup - - - - - - - Auto minimum points - - - - - - - - 75 - true - - - - Frequency Settings - - - - - - - - 0 - 0 - - - - - - - - true - - - - 0 - 0 - - - - Delete Row - - - - - - - Points / Resolution Bandwidth - - - - - - - Detection Threshold - - - - - - - Max with auto attenuator - - - - - - - true - - - - 0 - 0 - - - - Add Row - - - - - - - Absolute maximum - - - - - - - LO offset from wanted freq - - - - - - - Filter table on - - - - - - - 0dBm - - - false - - - - - - - High - - - buttonGroup - - - - - - - -25dBm - - - false - - - - - - - - 75 - true - - - - Peak Marker Settings - - - - - - - true - - - - 0 - 0 - - - - Import - - - - - - - - - - Auto maximum points - - - - - - - Max for best accuracy - - - - - - - - 75 - true - - - - Preset Bands and Markers - - - - - - - - 0 - 0 - - - - - 83 - 16777215 - - - - - 9 - - - - dBm - - - - - - -120 - - - -20 - - - -90 - - - - - - - QAbstractSpinBox::NoButtons - - - 25 - - - 100000 - - - 30000 - - - - - - - +6dBm - - - false - - - - - - - QAbstractSpinBox::NoButtons - - - 25 - - - 450 - - - 450 - - - - - - - 2 - - - 10 - - - 3 - - - - - - - - 75 - true - - - - Scan Points Settings - - - - - - - - 75 - true - - - - Signal Level Reminder lines - - - - - - - true - - - - 0 - 0 - - - - Export - - - - - - - LO frequency - - - - - - - MHz - - - 6 - - - 100000.000000000000000 - - - 0.000000000000000 - - - - - - + + + + 10 + 10 + 411 + 572 + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Preset Bands and Markers + + + + + + + true + + + + 0 + 0 + + + + Add Row + + + + + + + + 0 + 0 + + + + + 0 + 450 + + + + + + + + true + + + + 0 + 0 + + + + Delete Row + + + + + + + Delete All + + + + + + + + 0 + 0 + + + + Filter on: + + + + + + + + + + true + + + + 0 + 0 + + + + Export + + + + + + + true + + + + 0 + 0 + + + + Import + + + + + + + + + 440 + 10 + 356 + 571 + + + + + + + 0dBm + + + false + + + + + + + Points / Resolution Bandwidth + + + + + + + QAbstractSpinBox::NoButtons + + + 25 + + + 450 + + + 450 + + + + + + + + 75 + true + + + + External Mixer / LNB + + + + + + + + 0 + 0 + + + + + 83 + 16777215 + + + + + 9 + + + + dBm + + + + + + -120 + + + -20 + + + -90 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + MHz + + + 6 + + + 0.000000000000000 + + + 100000.000000000000000 + + + 0.000000000000000 + + + + + + + 2 + + + 10 + + + 3 + + + + + + + Auto maximum points + + + + + + + + 75 + true + + + + Scan Points Settings + + + + + + + + 75 + true + + + + Signal Level Reminder lines + + + + + + + -25dBm + + + false + + + + + + + Absolute maximum + + + + + + + Max for best accuracy + + + + + + + LO above displayed Freq + + + + + + + +6dBm + + + false + + + + + + + + + + + + + + Detection Threshold + + + + + + + Max with auto attenuator + + + + + + + QAbstractSpinBox::NoButtons + + + 25 + + + 100000 + + + 30000 + + + + + + + + 75 + true + + + + Peak Marker Settings + + + + + + + Auto minimum points + + + + + + + LO Frequency + + + + + + + True + + + + +
- - -