Skip to content

Commit

Permalink
Update channel list upon Morse Decoder and Demod Analyzer GUI creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Oct 5, 2024
1 parent 9d1160e commit 22a8f16
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/feature/demodanalyzer/demodanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 2 additions & 0 deletions plugins/feature/demodanalyzer/demodanalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions plugins/feature/demodanalyzer/demodanalyzergui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ DemodAnalyzerGUI::DemodAnalyzerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUI
makeUIConnections();
DialPopup::addPopupsToChildDials(this);
m_resizer.enableChildMouseTracking();
m_demodAnalyzer->getAvailableChannelsReport();
}

DemodAnalyzerGUI::~DemodAnalyzerGUI()
Expand Down
1 change: 1 addition & 0 deletions plugins/feature/demodanalyzer/demodanalyzersettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() :
Expand Down
5 changes: 5 additions & 0 deletions plugins/feature/morsedecoder/morsedecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 1 addition & 0 deletions plugins/feature/morsedecoder/morsedecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions plugins/feature/morsedecoder/morsedecodergui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ MorseDecoderGUI::MorseDecoderGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
makeUIConnections();
DialPopup::addPopupsToChildDials(this);
m_resizer.enableChildMouseTracking();
m_morseDecoder->getAvailableChannelsReport();
}

MorseDecoderGUI::~MorseDecoderGUI()
Expand Down

0 comments on commit 22a8f16

Please sign in to comment.