From 22a8f160f01f401b0b31e2e669905647062391b5 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 5 Oct 2024 17:13:03 +0200 Subject: [PATCH] Update channel list upon Morse Decoder and Demod Analyzer GUI creation. Fixes #2263 --- plugins/feature/demodanalyzer/demodanalyzer.cpp | 6 ++++++ plugins/feature/demodanalyzer/demodanalyzer.h | 2 ++ plugins/feature/demodanalyzer/demodanalyzergui.cpp | 1 + plugins/feature/demodanalyzer/demodanalyzersettings.cpp | 1 + plugins/feature/morsedecoder/morsedecoder.cpp | 5 +++++ plugins/feature/morsedecoder/morsedecoder.h | 1 + plugins/feature/morsedecoder/morsedecodergui.cpp | 1 + 7 files changed, 17 insertions(+) diff --git a/plugins/feature/demodanalyzer/demodanalyzer.cpp b/plugins/feature/demodanalyzer/demodanalyzer.cpp index 58f0bb1144..bcc183f80b 100644 --- a/plugins/feature/demodanalyzer/demodanalyzer.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzer.cpp @@ -323,6 +323,12 @@ void DemodAnalyzer::notifyUpdate(const QStringList& renameFrom, const QStringLis } } +void DemodAnalyzer::getAvailableChannelsReport() +{ + notifyUpdate(QStringList{}, QStringList{}); +} + + void DemodAnalyzer::setChannel(ChannelAPI *selectedChannel) { if ((selectedChannel == m_selectedChannel) || (m_availableChannels.indexOfObject(selectedChannel) == -1)) { diff --git a/plugins/feature/demodanalyzer/demodanalyzer.h b/plugins/feature/demodanalyzer/demodanalyzer.h index 8f0c21656a..c241c992d4 100644 --- a/plugins/feature/demodanalyzer/demodanalyzer.h +++ b/plugins/feature/demodanalyzer/demodanalyzer.h @@ -194,6 +194,8 @@ class DemodAnalyzer : public Feature const QStringList& featureSettingsKeys, SWGSDRangel::SWGFeatureSettings& response); + void getAvailableChannelsReport(); + static const char* const m_featureIdURI; static const char* const m_featureId; diff --git a/plugins/feature/demodanalyzer/demodanalyzergui.cpp b/plugins/feature/demodanalyzer/demodanalyzergui.cpp index fec29c1b28..4d70d4782a 100644 --- a/plugins/feature/demodanalyzer/demodanalyzergui.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzergui.cpp @@ -192,6 +192,7 @@ DemodAnalyzerGUI::DemodAnalyzerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUI makeUIConnections(); DialPopup::addPopupsToChildDials(this); m_resizer.enableChildMouseTracking(); + m_demodAnalyzer->getAvailableChannelsReport(); } DemodAnalyzerGUI::~DemodAnalyzerGUI() diff --git a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp index da3dfbb432..452cc7eef5 100644 --- a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp @@ -48,6 +48,7 @@ const QStringList DemodAnalyzerSettings::m_channelURIs = { QStringLiteral("sdrangel.channeltx.modssb"), QStringLiteral("sdrangel.channel.wfmdemod"), QStringLiteral("sdrangel.channeltx.modwfm"), + QStringLiteral("sdrangel.channel.wdsprx"), }; DemodAnalyzerSettings::DemodAnalyzerSettings() : diff --git a/plugins/feature/morsedecoder/morsedecoder.cpp b/plugins/feature/morsedecoder/morsedecoder.cpp index a8c3240897..a744ede3b5 100644 --- a/plugins/feature/morsedecoder/morsedecoder.cpp +++ b/plugins/feature/morsedecoder/morsedecoder.cpp @@ -372,6 +372,11 @@ void MorseDecoder::notifyUpdate(const QStringList& renameFrom, const QStringList } } +void MorseDecoder::getAvailableChannelsReport() +{ + notifyUpdate(QStringList{}, QStringList{}); +} + void MorseDecoder::setChannel(ChannelAPI *selectedChannel) { if ((selectedChannel == m_selectedChannel) || (m_availableChannels.indexOfObject(selectedChannel) == -1)) { diff --git a/plugins/feature/morsedecoder/morsedecoder.h b/plugins/feature/morsedecoder/morsedecoder.h index 1f78f3714d..5e7a1aa62e 100644 --- a/plugins/feature/morsedecoder/morsedecoder.h +++ b/plugins/feature/morsedecoder/morsedecoder.h @@ -216,6 +216,7 @@ class MorseDecoder : public Feature SWGSDRangel::SWGFeatureSettings& response); ScopeVis *getScopeVis() { return &m_scopeVis; } + void getAvailableChannelsReport(); static const char* const m_featureIdURI; static const char* const m_featureId; diff --git a/plugins/feature/morsedecoder/morsedecodergui.cpp b/plugins/feature/morsedecoder/morsedecodergui.cpp index 1a28149fcb..2e315841ff 100644 --- a/plugins/feature/morsedecoder/morsedecodergui.cpp +++ b/plugins/feature/morsedecoder/morsedecodergui.cpp @@ -216,6 +216,7 @@ MorseDecoderGUI::MorseDecoderGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe makeUIConnections(); DialPopup::addPopupsToChildDials(this); m_resizer.enableChildMouseTracking(); + m_morseDecoder->getAvailableChannelsReport(); } MorseDecoderGUI::~MorseDecoderGUI()