From e6667c88eb9b138fe0e8c2bcd05e7bc3d535ba81 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 5 Dec 2016 18:42:24 +0100 Subject: [PATCH] NFM Demod: use different color scheme for the signal meter bar --- plugins/channelrx/demodnfm/nfmdemodgui.cpp | 2 +- sdrbase/gui/levelmeter.cpp | 15 +++++++++------ sdrbase/gui/levelmeter.h | 9 +++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index 7f03d50ed..a7f17b574 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -291,7 +291,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg } ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::ReverseGold)); - ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenYellow); + ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue); m_channelizer = new DownChannelizer(m_nfmDemod); m_threadedChannelizer = new ThreadedBasebandSampleSink(m_channelizer, this); diff --git a/sdrbase/gui/levelmeter.cpp b/sdrbase/gui/levelmeter.cpp index 29cda5798..80da4b14b 100644 --- a/sdrbase/gui/levelmeter.cpp +++ b/sdrbase/gui/levelmeter.cpp @@ -237,19 +237,22 @@ void LevelMeterVU::render(QPainter *painter) // ==================================================================== -const QColor LevelMeterSignalDB::m_avgColor[2] = { +const QColor LevelMeterSignalDB::m_avgColor[3] = { QColor(0xff, 0x8b, 0x00, 128), - QColor(0x8c, 0xff, 0x00, 128) + QColor(0x8c, 0xff, 0x00, 128), + QColor(0x8c, 0xff, 0x00, 128) }; -const QColor LevelMeterSignalDB::m_decayedPeakColor[2] = { +const QColor LevelMeterSignalDB::m_decayedPeakColor[3] = { QColor(0x97, 0x54, 0x00, 128), - QColor(0x53, 0x96, 0x00, 128) + QColor(0x53, 0x96, 0x00, 128), + QColor(0x00, 0x96, 0x53, 128) }; -const QColor LevelMeterSignalDB::m_peakColor[2] = { +const QColor LevelMeterSignalDB::m_peakColor[3] = { Qt::red, - Qt::green + Qt::green, + Qt::green }; LevelMeterSignalDB::LevelMeterSignalDB(QWidget *parent) : diff --git a/sdrbase/gui/levelmeter.h b/sdrbase/gui/levelmeter.h index 3e79d7aab..65f674121 100644 --- a/sdrbase/gui/levelmeter.h +++ b/sdrbase/gui/levelmeter.h @@ -147,7 +147,8 @@ public: typedef enum { ColorGold, - ColorGreenYellow + ColorGreenYellow, + ColorGreenAndBlue } ColorTheme; LevelMeterSignalDB(QWidget *parent = 0); @@ -155,9 +156,9 @@ public: void setColorTheme(ColorTheme colorTheme) { m_colorTheme = colorTheme; } - static const QColor m_avgColor[2]; - static const QColor m_decayedPeakColor[2]; - static const QColor m_peakColor[2]; + static const QColor m_avgColor[3]; + static const QColor m_decayedPeakColor[3]; + static const QColor m_peakColor[3]; protected: virtual void render(QPainter *painter);