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

Update spectrum GUI layout

This commit is contained in:
f4exb 2022-04-09 22:05:02 +02:00
parent 0ca0eb8f73
commit dfe1a424a6
2 changed files with 138 additions and 83 deletions

View File

@ -48,13 +48,15 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
ui->setupUi(this); ui->setupUi(this);
// 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->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->Line1Layout); flowLayout->addItem(ui->Line1Layout);
flowLayout->addItem(ui->Line2Layout); flowLayout->addItem(ui->Line2Layout);
flowLayout->addItem(ui->Line3Layout); flowLayout->addItem(ui->Line4Layout);
ui->verticalLayout->addItem(flowLayout); ui->verticalLayout->addItem(flowLayout);
on_linscale_toggled(false); on_linscale_toggled(false);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>359</width> <width>364</width>
<height>106</height> <height>137</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@ -357,32 +357,23 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ButtonSwitch" name="freeze"> <widget class="QLabel" name="fillLabel1">
<property name="toolTip"> <property name="sizePolicy">
<string>Play/Pause spectrum display</string> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="icon"> <property name="minimumSize">
<iconset resource="../resources/res.qrc">
<normaloff>:/pause.png</normaloff>
<normalon>:/play.png</normalon>:/pause.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>20</height> <height>22</height>
</size> </size>
</property> </property>
</spacer> <property name="text">
<string/>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
@ -539,61 +530,23 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ButtonSwitch" name="wsSpectrum"> <widget class="QLabel" name="fillLabel2">
<property name="toolTip"> <property name="sizePolicy">
<string>Left: toggle websocket spectrum - Right: websocket spectrum parameters</string> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="icon"> <property name="minimumSize">
<iconset>
<normalon>:/stream.png</normalon>
</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="markers">
<property name="toolTip">
<string>Open spectrum markers dialog</string>
</property>
<property name="icon">
<iconset>
<normalon>:/gridpolar.png</normalon>
</iconset>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="calibration">
<property name="toolTip">
<string>Left: toggle relative / calibrated power - Right: open calibration dialog</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/ruler.png</normaloff>:/ruler.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>20</height> <height>22</height>
</size> </size>
</property> </property>
</spacer> <property name="text">
<string/>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
@ -604,6 +557,12 @@
</property> </property>
<item> <item>
<widget class="QPushButton" name="clearSpectrum"> <widget class="QPushButton" name="clearSpectrum">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Clear spectrum histogram</string> <string>Clear spectrum histogram</string>
</property> </property>
@ -874,17 +833,111 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="horizontalSpacer_2"> <widget class="QLabel" name="fillLabel3">
<property name="orientation"> <property name="sizePolicy">
<enum>Qt::Horizontal</enum> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="minimumSize">
<size> <size>
<width>40</width> <width>5</width>
<height>20</height> <height>22</height>
</size> </size>
</property> </property>
</spacer> <property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line4Layout">
<item>
<widget class="ButtonSwitch" name="freeze">
<property name="toolTip">
<string>Play/Pause spectrum display</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/pause.png</normaloff>
<normalon>:/play.png</normalon>:/pause.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="wsSpectrum">
<property name="toolTip">
<string>Left: toggle websocket spectrum - Right: websocket spectrum parameters</string>
</property>
<property name="icon">
<iconset>
<normalon>:/stream.png</normalon>
</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="markers">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Open spectrum markers dialog</string>
</property>
<property name="icon">
<iconset>
<normalon>:/gridpolar.png</normalon>
</iconset>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="calibration">
<property name="toolTip">
<string>Left: toggle relative / calibrated power - Right: open calibration dialog</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/ruler.png</normaloff>:/ruler.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fillLabel4">
<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> </item>
</layout> </layout>
</item> </item>