Spectrum GUI: format update

pull/1304/head
f4exb 2022-06-23 21:22:35 +02:00
rodzic f58e22e338
commit 87451425c7
8 zmienionych plików z 204 dodań i 152 usunięć

Wyświetl plik

@ -49,15 +49,17 @@ 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->Line5Layout);
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->Line3Layout);
flowLayout->addItem(ui->Line4Layout);
flowLayout->addItem(ui->Line1Layout); flowLayout->addItem(ui->Line1Layout);
flowLayout->addItem(ui->Line2Layout); flowLayout->addItem(ui->Line2Layout);
flowLayout->addItem(ui->Line4Layout); flowLayout->addItem(ui->Line5Layout);
ui->verticalLayout->addItem(flowLayout); ui->verticalLayout->addItem(flowLayout);
on_linscale_toggled(false); on_linscale_toggled(false);
@ -162,9 +164,16 @@ void GLSpectrumGUI::displaySettings()
ui->spectrogramStyle->setCurrentIndex((int) m_settings.m_3DSpectrogramStyle); ui->spectrogramStyle->setCurrentIndex((int) m_settings.m_3DSpectrogramStyle);
ui->spectrogramStyle->setVisible(m_settings.m_display3DSpectrogram); ui->spectrogramStyle->setVisible(m_settings.m_display3DSpectrogram);
ui->colorMap->setCurrentText(m_settings.m_colorMap); 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->maxHold->setChecked(m_settings.m_displayMaxHold);
ui->current->setChecked(m_settings.m_displayCurrent);
ui->histogram->setChecked(m_settings.m_displayHistogram); ui->histogram->setChecked(m_settings.m_displayHistogram);
ui->invertWaterfall->setChecked(m_settings.m_invertedWaterfall); ui->invertWaterfall->setChecked(m_settings.m_invertedWaterfall);
ui->grid->setChecked(m_settings.m_displayGrid); ui->grid->setChecked(m_settings.m_displayGrid);
@ -464,12 +473,6 @@ void GLSpectrumGUI::on_stroke_valueChanged(int index)
applySettings(); applySettings();
} }
void GLSpectrumGUI::on_spectrumStyle_currentIndexChanged(int index)
{
m_settings.m_spectrumStyle = (SpectrumSettings::SpectrumStyle)index;
applySettings();
}
void GLSpectrumGUI::on_spectrogramStyle_currentIndexChanged(int index) void GLSpectrumGUI::on_spectrogramStyle_currentIndexChanged(int index)
{ {
m_settings.m_3DSpectrogramStyle = (SpectrumSettings::SpectrogramStyle)index; m_settings.m_3DSpectrogramStyle = (SpectrumSettings::SpectrogramStyle)index;
@ -520,8 +523,41 @@ void GLSpectrumGUI::on_maxHold_toggled(bool checked)
applySettings(); 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; m_settings.m_displayCurrent = checked;
applySettings(); applySettings();
} }

Wyświetl plik

@ -96,7 +96,6 @@ private slots:
void on_decay_valueChanged(int index); void on_decay_valueChanged(int index);
void on_decayDivisor_valueChanged(int index); void on_decayDivisor_valueChanged(int index);
void on_stroke_valueChanged(int index); void on_stroke_valueChanged(int index);
void on_spectrumStyle_currentIndexChanged(int index);
void on_spectrogramStyle_currentIndexChanged(int index); void on_spectrogramStyle_currentIndexChanged(int index);
void on_colorMap_currentIndexChanged(int index); void on_colorMap_currentIndexChanged(int index);
void on_gridIntensity_valueChanged(int index); void on_gridIntensity_valueChanged(int index);
@ -111,7 +110,9 @@ private slots:
void on_spectrogram_toggled(bool checked); void on_spectrogram_toggled(bool checked);
void on_histogram_toggled(bool checked); void on_histogram_toggled(bool checked);
void on_maxHold_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_invertWaterfall_toggled(bool checked);
void on_grid_toggled(bool checked); void on_grid_toggled(bool checked);
void on_clearSpectrum_clicked(bool checked); void on_clearSpectrum_clicked(bool checked);

Wyświetl plik

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>364</width> <width>630</width>
<height>137</height> <height>151</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
@ -565,6 +565,54 @@
<property name="spacing"> <property name="spacing">
<number>1</number> <number>1</number>
</property> </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> <item>
<widget class="QPushButton" name="clearSpectrum"> <widget class="QPushButton" name="clearSpectrum">
<property name="sizePolicy"> <property name="sizePolicy">
@ -614,6 +662,29 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<widget class="QDial" name="decay"> <widget class="QDial" name="decay">
<property name="maximumSize"> <property name="maximumSize">
@ -678,30 +749,30 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="ButtonSwitch" name="maxHold"> <widget class="QLabel" name="fillLabel3">
<property name="toolTip"> <property name="sizePolicy">
<string>Display max hold</string> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="minimumSize">
<string>Max Hold</string>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/maxhold.png</normaloff>:/maxhold.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>16</width> <width>5</width>
<height>16</height> <height>22</height>
</size> </size>
</property> </property>
<property name="checkable"> <property name="text">
<bool>true</bool> <string/>
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="Line4Layout">
<item> <item>
<widget class="ButtonSwitch" name="current"> <widget class="ButtonSwitch" name="currentLine">
<property name="toolTip"> <property name="toolTip">
<string>Display live spectrum</string> <string>Display live spectrum</string>
</property> </property>
@ -710,7 +781,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../resources/res.qrc"> <iconset resource="../resources/res.qrc">
<normaloff>:/current.png</normaloff>:/current.png</iconset> <normaloff>:/bell_line.png</normaloff>:/bell_line.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -724,37 +795,49 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="spectrumStyle"> <widget class="ButtonSwitch" name="currentFill">
<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"> <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> </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> </widget>
</item> </item>
<item> <item>
@ -779,6 +862,25 @@
</property> </property>
</widget> </widget>
</item> </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> <item>
<widget class="ButtonSwitch" name="invertWaterfall"> <widget class="ButtonSwitch" name="invertWaterfall">
<property name="toolTip"> <property name="toolTip">
@ -898,96 +1000,10 @@
</item> </item>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="Line4Layout"> <layout class="QHBoxLayout" name="Line5Layout">
<item> <item>
<widget class="ButtonSwitch" name="freeze"> <widget class="ButtonSwitch" name="freeze">
<property name="toolTip"> <property name="toolTip">
@ -1083,11 +1099,6 @@
<header>gui/buttonswitch.h</header> <header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>maxHold</tabstop>
<tabstop>invertWaterfall</tabstop>
<tabstop>grid</tabstop>
</tabstops>
<resources> <resources>
<include location="../resources/res.qrc"/> <include location="../resources/res.qrc"/>
</resources> </resources>

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 6.5 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 7.2 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 6.4 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 8.4 KiB

Wyświetl plik

@ -1,5 +1,9 @@
<RCC> <RCC>
<qresource prefix="/"> <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>ruler.png</file>
<file>sort.png</file> <file>sort.png</file>
<file>audio_mic.png</file> <file>audio_mic.png</file>