1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 01:39:05 -05:00

Reworked spectrum GUI controls

This commit is contained in:
f4exb 2022-06-24 03:33:32 +02:00
parent 87451425c7
commit bbeb058944
9 changed files with 457 additions and 447 deletions

View File

@ -50,16 +50,18 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
// Use the custom flow layout for the 3 main horizontal layouts (lines) // Use the custom flow layout for the 3 main horizontal layouts (lines)
ui->verticalLayout->removeItem(ui->Line5Layout); ui->verticalLayout->removeItem(ui->Line5Layout);
ui->verticalLayout->removeItem(ui->Line6Layout);
ui->verticalLayout->removeItem(ui->Line4Layout); ui->verticalLayout->removeItem(ui->Line4Layout);
ui->verticalLayout->removeItem(ui->Line3Layout); ui->verticalLayout->removeItem(ui->Line3Layout);
ui->verticalLayout->removeItem(ui->Line2Layout); ui->verticalLayout->removeItem(ui->Line2Layout);
ui->verticalLayout->removeItem(ui->Line1Layout); ui->verticalLayout->removeItem(ui->Line1Layout);
FlowLayout *flowLayout = new FlowLayout(nullptr, 1, 1, 1); FlowLayout *flowLayout = new FlowLayout(nullptr, 1, 1, 1);
flowLayout->addItem(ui->Line3Layout);
flowLayout->addItem(ui->Line4Layout);
flowLayout->addItem(ui->Line1Layout); flowLayout->addItem(ui->Line1Layout);
flowLayout->addItem(ui->Line2Layout); flowLayout->addItem(ui->Line2Layout);
flowLayout->addItem(ui->Line3Layout);
flowLayout->addItem(ui->Line4Layout);
flowLayout->addItem(ui->Line5Layout); flowLayout->addItem(ui->Line5Layout);
flowLayout->addItem(ui->Line6Layout);
ui->verticalLayout->addItem(flowLayout); ui->verticalLayout->addItem(flowLayout);
on_linscale_toggled(false); on_linscale_toggled(false);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>630</width> <width>630</width>
<height>151</height> <height>250</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@ -37,6 +37,452 @@
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="Line1Layout"> <layout class="QHBoxLayout" name="Line1Layout">
<property name="spacing">
<number>1</number>
</property>
<item>
<widget class="ButtonSwitch" name="grid">
<property name="toolTip">
<string>Toggle the scale grid</string>
</property>
<property name="text">
<string>Grid</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/gridrect.png</normaloff>:/gridrect.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="gridIntensity">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="toolTip">
<string>Grid intensity</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearSpectrum">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear spectrum histogram</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/clear.png</normaloff>:/clear.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="histogram">
<property name="toolTip">
<string>Display phosphor effect spectrum</string>
</property>
<property name="text">
<string>Histogram</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_phosphor.png</normaloff>:/bell_phosphor.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="maxHold">
<property name="toolTip">
<string>Display max hold</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_max.png</normaloff>:/bell_max.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="decay">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Decay:</string>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="decayDivisor">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Decay divisor:</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="stroke">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Stroke:</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>60</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fillLabel3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>5</width>
<height>22</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line2Layout">
<item>
<widget class="ButtonSwitch" name="currentLine">
<property name="toolTip">
<string>Display live spectrum line style</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_line.png</normaloff>:/bell_line.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="currentFill">
<property name="toolTip">
<string>Display live spectrum fill style</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_fill.png</normaloff>:/bell_fill.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="currentGradient">
<property name="toolTip">
<string>Display live spectrum gradient style</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_gradient.png</normaloff>:/bell_gradient.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="traceIntensity">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Trace intensity</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="colorMap">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Color Map</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line3Layout">
<item>
<widget class="ButtonSwitch" name="invertWaterfall">
<property name="toolTip">
<string>Exchange waterfall and spectrum</string>
</property>
<property name="text">
<string>Inv</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/flip_windows.png</normaloff>:/flip_windows.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="waterfall">
<property name="toolTip">
<string>Display waterfall</string>
</property>
<property name="text">
<string>Waterfall</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/waterfall.png</normaloff>:/waterfall.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="spectrogram">
<property name="toolTip">
<string>Display 3D spectrogram</string>
</property>
<property name="text">
<string>3D Spectrogram</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/waterfall_3d.png</normaloff>:/waterfall_3d.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="spectrogramStyle">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>3D Spectrogram Style</string>
</property>
<item>
<property name="text">
<string>Points</string>
</property>
</item>
<item>
<property name="text">
<string>Lines</string>
</property>
</item>
<item>
<property name="text">
<string>Solid</string>
</property>
</item>
<item>
<property name="text">
<string>Outline</string>
</property>
</item>
<item>
<property name="text">
<string>Shaded</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line4Layout">
<property name="spacing"> <property name="spacing">
<number>1</number> <number>1</number>
</property> </property>
@ -388,7 +834,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="Line2Layout"> <layout class="QHBoxLayout" name="Line5Layout">
<property name="spacing"> <property name="spacing">
<number>1</number> <number>1</number>
</property> </property>
@ -561,449 +1007,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="Line3Layout"> <layout class="QHBoxLayout" name="Line6Layout">
<property name="spacing">
<number>1</number>
</property>
<item>
<widget class="ButtonSwitch" name="grid">
<property name="toolTip">
<string>Toggle the scale grid</string>
</property>
<property name="text">
<string>Grid</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/grid.png</normaloff>:/grid.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="gridIntensity">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="toolTip">
<string>Grid intensity</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearSpectrum">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear spectrum histogram</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/clear.png</normaloff>:/clear.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="histogram">
<property name="toolTip">
<string>Display phosphor effect spectrum</string>
</property>
<property name="text">
<string>Histogram</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/histogram.png</normaloff>:/histogram.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="maxHold">
<property name="toolTip">
<string>Display max hold</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_red.png</normaloff>:/bell_red.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="decay">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Decay:</string>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="decayDivisor">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Decay divisor:</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="stroke">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Stroke:</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>60</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fillLabel3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>5</width>
<height>22</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line4Layout">
<item>
<widget class="ButtonSwitch" name="currentLine">
<property name="toolTip">
<string>Display live spectrum</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_line.png</normaloff>:/bell_line.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="currentFill">
<property name="toolTip">
<string>Display live spectrum</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_fill.png</normaloff>:/bell_fill.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="currentGradient">
<property name="toolTip">
<string>Display live spectrum</string>
</property>
<property name="text">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bell_gradient.png</normaloff>:/bell_gradient.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="traceIntensity">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Trace intensity</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="colorMap">
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Color Map</string>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="invertWaterfall">
<property name="toolTip">
<string>Exchange waterfall and histogram</string>
</property>
<property name="text">
<string>Inv</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/invertspectrum.png</normaloff>:/invertspectrum.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="waterfall">
<property name="toolTip">
<string>Display waterfall</string>
</property>
<property name="text">
<string>Waterfall</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/waterfall.png</normaloff>:/waterfall.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="spectrogram">
<property name="toolTip">
<string>Display 3D spectrogram</string>
</property>
<property name="text">
<string>3D Spectrogram</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/3dspectrogram.png</normaloff>:/3dspectrogram.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="spectrogramStyle">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>3D Spectrogram Style</string>
</property>
<item>
<property name="text">
<string>Points</string>
</property>
</item>
<item>
<property name="text">
<string>Lines</string>
</property>
</item>
<item>
<property name="text">
<string>Solid</string>
</property>
</item>
<item>
<property name="text">
<string>Outline</string>
</property>
</item>
<item>
<property name="text">
<string>Shaded</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line5Layout">
<item> <item>
<widget class="ButtonSwitch" name="freeze"> <widget class="ButtonSwitch" name="freeze">
<property name="toolTip"> <property name="toolTip">

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

View File

@ -1,5 +1,9 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>flip_windows.png</file>
<file>waterfall_3d.png</file>
<file>bell_max.png</file>
<file>bell_phosphor.png</file>
<file>bell_red.png</file> <file>bell_red.png</file>
<file>bell_fill.png</file> <file>bell_fill.png</file>
<file>bell_gradient.png</file> <file>bell_gradient.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB