1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-25 20:22:10 -05:00

Add reset measurements button to Spectrum GUI

This commit is contained in:
Jon Beniston 2023-01-15 12:01:37 +00:00
parent 0a257f393e
commit 0bbda79828
3 changed files with 26 additions and 0 deletions

View File

@ -240,6 +240,7 @@ void GLSpectrumGUI::displaySettings()
ui->linscale->setChecked(m_settings.m_linear);
setAveragingToolitp();
ui->calibration->setChecked(m_settings.m_useCalibration);
ui->resetMeasurements->setVisible(m_settings.m_measurement >= SpectrumSettings::MeasurementChannelPower);
displayGotoMarkers();
displayControls();
@ -1119,8 +1120,18 @@ void GLSpectrumGUI::on_measure_clicked(bool checked)
measurementsDialog.exec();
}
void GLSpectrumGUI::on_resetMeasurements_clicked(bool checked)
{
(void) checked;
if (m_glSpectrum) {
m_glSpectrum->getMeasurements()->reset();
}
}
void GLSpectrumGUI::updateMeasurements()
{
ui->resetMeasurements->setVisible(m_settings.m_measurement >= SpectrumSettings::MeasurementChannelPower);
if (m_glSpectrum)
{
m_glSpectrum->setMeasurementsVisible(m_settings.m_measurement != SpectrumSettings::MeasurementNone);

View File

@ -129,6 +129,7 @@ private slots:
void on_showAllControls_toggled(bool checked);
void on_measure_clicked(bool checked);
void on_resetMeasurements_clicked(bool checked);
void handleInputMessages();
void openWebsocketSpectrumSettingsDialog(const QPoint& p);

View File

@ -1116,6 +1116,20 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="resetMeasurements">
<property name="toolTip">
<string>Reset measurements</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/bin.png</normaloff>:/bin.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="ButtonSwitch" name="calibration">
<property name="toolTip">