mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Spectrum GUI: format update
This commit is contained in:
parent
f58e22e338
commit
87451425c7
@ -49,15 +49,17 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
|
||||
ui->setupUi(this);
|
||||
|
||||
// Use the custom flow layout for the 3 main horizontal layouts (lines)
|
||||
ui->verticalLayout->removeItem(ui->Line5Layout);
|
||||
ui->verticalLayout->removeItem(ui->Line4Layout);
|
||||
ui->verticalLayout->removeItem(ui->Line3Layout);
|
||||
ui->verticalLayout->removeItem(ui->Line2Layout);
|
||||
ui->verticalLayout->removeItem(ui->Line1Layout);
|
||||
FlowLayout *flowLayout = new FlowLayout(nullptr, 1, 1, 1);
|
||||
flowLayout->addItem(ui->Line3Layout);
|
||||
flowLayout->addItem(ui->Line4Layout);
|
||||
flowLayout->addItem(ui->Line1Layout);
|
||||
flowLayout->addItem(ui->Line2Layout);
|
||||
flowLayout->addItem(ui->Line4Layout);
|
||||
flowLayout->addItem(ui->Line5Layout);
|
||||
ui->verticalLayout->addItem(flowLayout);
|
||||
|
||||
on_linscale_toggled(false);
|
||||
@ -162,9 +164,16 @@ void GLSpectrumGUI::displaySettings()
|
||||
ui->spectrogramStyle->setCurrentIndex((int) m_settings.m_3DSpectrogramStyle);
|
||||
ui->spectrogramStyle->setVisible(m_settings.m_display3DSpectrogram);
|
||||
ui->colorMap->setCurrentText(m_settings.m_colorMap);
|
||||
ui->spectrumStyle->setCurrentIndex((int) m_settings.m_spectrumStyle);
|
||||
ui->currentLine->blockSignals(true);
|
||||
ui->currentFill->blockSignals(true);
|
||||
ui->currentGradient->blockSignals(true);
|
||||
ui->currentLine->setChecked(m_settings.m_displayCurrent && (m_settings.m_spectrumStyle == SpectrumSettings::SpectrumStyle::Line));
|
||||
ui->currentFill->setChecked(m_settings.m_displayCurrent && (m_settings.m_spectrumStyle == SpectrumSettings::SpectrumStyle::Fill));
|
||||
ui->currentGradient->setChecked(m_settings.m_displayCurrent && (m_settings.m_spectrumStyle == SpectrumSettings::SpectrumStyle::Gradient));
|
||||
ui->currentLine->blockSignals(false);
|
||||
ui->currentFill->blockSignals(false);
|
||||
ui->currentGradient->blockSignals(false);
|
||||
ui->maxHold->setChecked(m_settings.m_displayMaxHold);
|
||||
ui->current->setChecked(m_settings.m_displayCurrent);
|
||||
ui->histogram->setChecked(m_settings.m_displayHistogram);
|
||||
ui->invertWaterfall->setChecked(m_settings.m_invertedWaterfall);
|
||||
ui->grid->setChecked(m_settings.m_displayGrid);
|
||||
@ -464,12 +473,6 @@ void GLSpectrumGUI::on_stroke_valueChanged(int index)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_spectrumStyle_currentIndexChanged(int index)
|
||||
{
|
||||
m_settings.m_spectrumStyle = (SpectrumSettings::SpectrumStyle)index;
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_spectrogramStyle_currentIndexChanged(int index)
|
||||
{
|
||||
m_settings.m_3DSpectrogramStyle = (SpectrumSettings::SpectrogramStyle)index;
|
||||
@ -520,8 +523,41 @@ void GLSpectrumGUI::on_maxHold_toggled(bool checked)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_current_toggled(bool checked)
|
||||
void GLSpectrumGUI::on_currentLine_toggled(bool checked)
|
||||
{
|
||||
ui->currentFill->blockSignals(true);
|
||||
ui->currentGradient->blockSignals(true);
|
||||
ui->currentFill->setChecked(false);
|
||||
ui->currentGradient->setChecked(false);
|
||||
ui->currentFill->blockSignals(false);
|
||||
ui->currentGradient->blockSignals(false);
|
||||
m_settings.m_spectrumStyle = SpectrumSettings::SpectrumStyle::Line;
|
||||
m_settings.m_displayCurrent = checked;
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_currentFill_toggled(bool checked)
|
||||
{
|
||||
ui->currentLine->blockSignals(true);
|
||||
ui->currentGradient->blockSignals(true);
|
||||
ui->currentLine->setChecked(false);
|
||||
ui->currentGradient->setChecked(false);
|
||||
ui->currentLine->blockSignals(false);
|
||||
ui->currentGradient->blockSignals(false);
|
||||
m_settings.m_spectrumStyle = SpectrumSettings::SpectrumStyle::Fill;
|
||||
m_settings.m_displayCurrent = checked;
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_currentGradient_toggled(bool checked)
|
||||
{
|
||||
ui->currentLine->blockSignals(true);
|
||||
ui->currentFill->blockSignals(true);
|
||||
ui->currentLine->setChecked(false);
|
||||
ui->currentFill->setChecked(false);
|
||||
ui->currentLine->blockSignals(false);
|
||||
ui->currentFill->blockSignals(false);
|
||||
m_settings.m_spectrumStyle = SpectrumSettings::SpectrumStyle::Gradient;
|
||||
m_settings.m_displayCurrent = checked;
|
||||
applySettings();
|
||||
}
|
||||
|
@ -96,7 +96,6 @@ private slots:
|
||||
void on_decay_valueChanged(int index);
|
||||
void on_decayDivisor_valueChanged(int index);
|
||||
void on_stroke_valueChanged(int index);
|
||||
void on_spectrumStyle_currentIndexChanged(int index);
|
||||
void on_spectrogramStyle_currentIndexChanged(int index);
|
||||
void on_colorMap_currentIndexChanged(int index);
|
||||
void on_gridIntensity_valueChanged(int index);
|
||||
@ -111,7 +110,9 @@ private slots:
|
||||
void on_spectrogram_toggled(bool checked);
|
||||
void on_histogram_toggled(bool checked);
|
||||
void on_maxHold_toggled(bool checked);
|
||||
void on_current_toggled(bool checked);
|
||||
void on_currentLine_toggled(bool checked);
|
||||
void on_currentFill_toggled(bool checked);
|
||||
void on_currentGradient_toggled(bool checked);
|
||||
void on_invertWaterfall_toggled(bool checked);
|
||||
void on_grid_toggled(bool checked);
|
||||
void on_clearSpectrum_clicked(bool checked);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>364</width>
|
||||
<height>137</height>
|
||||
<width>630</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -565,6 +565,54 @@
|
||||
<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">
|
||||
@ -614,6 +662,29 @@
|
||||
</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">
|
||||
@ -678,30 +749,30 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ButtonSwitch" name="maxHold">
|
||||
<property name="toolTip">
|
||||
<string>Display max hold</string>
|
||||
<widget class="QLabel" name="fillLabel3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Max Hold</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/res.qrc">
|
||||
<normaloff>:/maxhold.png</normaloff>:/maxhold.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
<width>5</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="Line4Layout">
|
||||
<item>
|
||||
<widget class="ButtonSwitch" name="current">
|
||||
<widget class="ButtonSwitch" name="currentLine">
|
||||
<property name="toolTip">
|
||||
<string>Display live spectrum</string>
|
||||
</property>
|
||||
@ -710,7 +781,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/res.qrc">
|
||||
<normaloff>:/current.png</normaloff>:/current.png</iconset>
|
||||
<normaloff>:/bell_line.png</normaloff>:/bell_line.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@ -724,37 +795,49 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="spectrumStyle">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="ButtonSwitch" name="currentFill">
|
||||
<property name="toolTip">
|
||||
<string>Spectrum Style</string>
|
||||
<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>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Line</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Fill</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gradient</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@ -779,6 +862,25 @@
|
||||
</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">
|
||||
@ -898,96 +1000,10 @@
|
||||
</item>
|
||||
</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="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="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">
|
||||
<layout class="QHBoxLayout" name="Line5Layout">
|
||||
<item>
|
||||
<widget class="ButtonSwitch" name="freeze">
|
||||
<property name="toolTip">
|
||||
@ -1083,11 +1099,6 @@
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>maxHold</tabstop>
|
||||
<tabstop>invertWaterfall</tabstop>
|
||||
<tabstop>grid</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../resources/res.qrc"/>
|
||||
</resources>
|
||||
|
BIN
sdrgui/resources/bell_fill.png
Normal file
BIN
sdrgui/resources/bell_fill.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
sdrgui/resources/bell_gradient.png
Normal file
BIN
sdrgui/resources/bell_gradient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
sdrgui/resources/bell_line.png
Normal file
BIN
sdrgui/resources/bell_line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
BIN
sdrgui/resources/bell_red.png
Normal file
BIN
sdrgui/resources/bell_red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
@ -1,5 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>bell_red.png</file>
|
||||
<file>bell_fill.png</file>
|
||||
<file>bell_gradient.png</file>
|
||||
<file>bell_line.png</file>
|
||||
<file>ruler.png</file>
|
||||
<file>sort.png</file>
|
||||
<file>audio_mic.png</file>
|
||||
|
Loading…
Reference in New Issue
Block a user