From 2f955ba979734f941079a881da70d5fc0d94142a Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 17 Oct 2018 13:22:09 +0200 Subject: [PATCH] Revert "added option for test Hold". Doing something else for the same result. This reverts commit d510e344a55fb0ee13c9b14f7c55930c34e7eac3. --- sdrgui/gui/glspectrum.cpp | 27 +++++++-------------------- sdrgui/gui/glspectrum.h | 2 -- sdrgui/gui/glspectrumgui.cpp | 15 --------------- sdrgui/gui/glspectrumgui.h | 2 -- sdrgui/gui/glspectrumgui.ui | 25 ------------------------- 5 files changed, 7 insertions(+), 64 deletions(-) diff --git a/sdrgui/gui/glspectrum.cpp b/sdrgui/gui/glspectrum.cpp index 1e35e7968..69ad6d5ab 100644 --- a/sdrgui/gui/glspectrum.cpp +++ b/sdrgui/gui/glspectrum.cpp @@ -49,7 +49,6 @@ GLSpectrum::GLSpectrum(QWidget* parent) : m_displayTraceIntensity(50), m_invertedWaterfall(false), m_displayMaxHold(false), - m_displayTestHold(false), // test m_currentSpectrum(0), m_displayCurrent(false), m_waterfallBuffer(NULL), @@ -249,15 +248,6 @@ void GLSpectrum::setDisplayMaxHold(bool display) update(); } -// test -void GLSpectrum::setDisplayTestHold(bool value) -{ - m_displayTestHold = value; - m_changesPending = true; - stopDrag(); - update(); -} - void GLSpectrum::setDisplayCurrent(bool display) { m_displayCurrent = display; @@ -405,17 +395,14 @@ void GLSpectrum::updateHistogram(const std::vector& spectrum) { *h = *h - sub; } - else if(!m_displayTestHold) + else if(*h > 0) { - if(*h > 0) - { - *h = *h - 1; - } - else - { - *b = *b - 1; - *h = m_histogramLateHoldoff; - } + *h = *h - 1; + } + else + { + *b = *b - 1; + *h = m_histogramLateHoldoff; } } diff --git a/sdrgui/gui/glspectrum.h b/sdrgui/gui/glspectrum.h index 637f4d26d..c1be4bdf9 100644 --- a/sdrgui/gui/glspectrum.h +++ b/sdrgui/gui/glspectrum.h @@ -76,7 +76,6 @@ public: void setLsbDisplay(bool lsbDisplay); void setInvertedWaterfall(bool inv); void setDisplayMaxHold(bool display); - void setDisplayTestHold(bool value); // test void setDisplayCurrent(bool display); void setDisplayHistogram(bool display); void setDisplayGrid(bool display); @@ -146,7 +145,6 @@ private: std::vector m_maxHold; bool m_displayMaxHold; - bool m_displayTestHold; // test const std::vector *m_currentSpectrum; bool m_displayCurrent; diff --git a/sdrgui/gui/glspectrumgui.cpp b/sdrgui/gui/glspectrumgui.cpp index 029387dad..0d2dc6814 100644 --- a/sdrgui/gui/glspectrumgui.cpp +++ b/sdrgui/gui/glspectrumgui.cpp @@ -24,7 +24,6 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) : m_displayWaterfall(true), m_invertedWaterfall(false), m_displayMaxHold(false), - m_displayTestHold(false), // test m_displayCurrent(false), m_displayHistogram(false), m_displayGrid(false), @@ -74,7 +73,6 @@ void GLSpectrumGUI::resetToDefaults() m_displayWaterfall = true; m_invertedWaterfall = false; m_displayMaxHold = false; - m_displayTestHold = false; // test m_displayHistogram = false; m_displayGrid = false; m_invert = true; @@ -95,7 +93,6 @@ QByteArray GLSpectrumGUI::serialize() const s.writeBool(6, m_displayWaterfall); s.writeBool(7, m_invertedWaterfall); s.writeBool(8, m_displayMaxHold); - //s.writeBool(?, m_displayTestHold); // test s.writeBool(9, m_displayHistogram); s.writeS32(10, m_decay); s.writeBool(11, m_displayGrid); @@ -132,7 +129,6 @@ bool GLSpectrumGUI::deserialize(const QByteArray& data) d.readBool(6, &m_displayWaterfall, true); d.readBool(7, &m_invertedWaterfall, false); d.readBool(8, &m_displayMaxHold, false); - m_displayTestHold = false; // test d.readBool(9, &m_displayHistogram, false); d.readS32(10, &m_decay, 0); d.readBool(11, &m_displayGrid, false); @@ -179,7 +175,6 @@ void GLSpectrumGUI::applySettings() ui->stroke->setSliderPosition(m_histogramStroke); ui->waterfall->setChecked(m_displayWaterfall); ui->maxHold->setChecked(m_displayMaxHold); - ui->testHold->setChecked(m_displayTestHold); // test ui->current->setChecked(m_displayCurrent); ui->histogram->setChecked(m_displayHistogram); ui->invert->setChecked(m_invert); @@ -195,7 +190,6 @@ void GLSpectrumGUI::applySettings() m_glSpectrum->setDisplayWaterfall(m_displayWaterfall); m_glSpectrum->setInvertedWaterfall(m_invertedWaterfall); m_glSpectrum->setDisplayMaxHold(m_displayMaxHold); - m_glSpectrum->setDisplayTestHold(m_displayTestHold); // test m_glSpectrum->setDisplayCurrent(m_displayCurrent); m_glSpectrum->setDisplayHistogram(m_displayHistogram); m_glSpectrum->setDecay(m_decay); @@ -421,15 +415,6 @@ void GLSpectrumGUI::on_maxHold_toggled(bool checked) } } -// test -void GLSpectrumGUI::on_testHold_toggled(bool checked) -{ - m_displayTestHold = checked; - if(m_glSpectrum != 0) { - m_glSpectrum->setDisplayTestHold(m_displayTestHold); - } -} - void GLSpectrumGUI::on_current_toggled(bool checked) { m_displayCurrent = checked; diff --git a/sdrgui/gui/glspectrumgui.h b/sdrgui/gui/glspectrumgui.h index be05916de..9cf02a20d 100644 --- a/sdrgui/gui/glspectrumgui.h +++ b/sdrgui/gui/glspectrumgui.h @@ -56,7 +56,6 @@ private: bool m_displayWaterfall; bool m_invertedWaterfall; bool m_displayMaxHold; - bool m_displayTestHold; // test bool m_displayCurrent; bool m_displayHistogram; bool m_displayGrid; @@ -93,7 +92,6 @@ private slots: void on_waterfall_toggled(bool checked); void on_histogram_toggled(bool checked); void on_maxHold_toggled(bool checked); - void on_testHold_toggled(bool checked); // test void on_current_toggled(bool checked); void on_invert_toggled(bool checked); void on_grid_toggled(bool checked); diff --git a/sdrgui/gui/glspectrumgui.ui b/sdrgui/gui/glspectrumgui.ui index b405515eb..6c81795fb 100644 --- a/sdrgui/gui/glspectrumgui.ui +++ b/sdrgui/gui/glspectrumgui.ui @@ -704,31 +704,6 @@ - - - - - Toggle test Hold - - - Test Hold - - - - :/testHold.png:/testHold.png - - - - 16 - 16 - - - - true - - - -