diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp index 7bd4f8ab40..cf976e5e7f 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp @@ -46,7 +46,6 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) : m_thread(nullptr), m_basebandSource(nullptr), m_running(false), - m_guiMessageQueue(nullptr), m_frequencyOffset(0), m_basebandSampleRate(48000) { @@ -62,7 +61,7 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) : this, &BeamSteeringCWMod::networkManagerFinished ); - startSources(); + BeamSteeringCWMod::startSources(); } BeamSteeringCWMod::~BeamSteeringCWMod() @@ -77,7 +76,7 @@ BeamSteeringCWMod::~BeamSteeringCWMod() m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeMIMOChannel(this); - stopSources(); + BeamSteeringCWMod::stopSources(); } void BeamSteeringCWMod::setDeviceAPI(DeviceAPI *deviceAPI) @@ -194,7 +193,7 @@ void BeamSteeringCWMod::applySettings(const BeamSteeringCWModSettings& settings, QList pipes; MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes); - if (pipes.size() > 0) { + if (!pipes.empty()) { sendChannelSettings(pipes, reverseAPIKeys, settings, force); } @@ -205,7 +204,7 @@ void BeamSteeringCWMod::handleInputMessages() { Message* message; - while ((message = m_inputMessageQueue.pop()) != 0) + while ((message = m_inputMessageQueue.pop()) != nullptr) { if (handleMessage(*message)) { @@ -218,14 +217,14 @@ bool BeamSteeringCWMod::handleMessage(const Message& cmd) { if (MsgConfigureBeamSteeringCWMod::match(cmd)) { - MsgConfigureBeamSteeringCWMod& cfg = (MsgConfigureBeamSteeringCWMod&) cmd; + auto& cfg = (const MsgConfigureBeamSteeringCWMod&) cmd; qDebug() << "BeamSteeringCWMod::handleMessage: MsgConfigureBeamSteeringCWMod"; applySettings(cfg.getSettings(), cfg.getForce()); return true; } else if (DSPMIMOSignalNotification::match(cmd)) { - DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd; + auto& notif = (const DSPMIMOSignalNotification&) cmd; qDebug() << "BeamSteeringCWMod::handleMessage: DSPMIMOSignalNotification:" << " basebandSampleRate: " << notif.getSampleRate() @@ -301,7 +300,7 @@ void BeamSteeringCWMod::validateFilterChainHash(BeamSteeringCWModSettings& setti void BeamSteeringCWMod::calculateFrequencyOffset() { double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Interp, m_settings.m_filterChainHash); - m_frequencyOffset = m_basebandSampleRate * shiftFactor; + m_frequencyOffset = (int64_t) (m_basebandSampleRate * shiftFactor); } int BeamSteeringCWMod::webapiSettingsGet( @@ -380,13 +379,13 @@ void BeamSteeringCWMod::webapiUpdateChannelSettings( settings.m_reverseAPIAddress = *response.getBeamSteeringCwModSettings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getBeamSteeringCwModSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getBeamSteeringCwModSettings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = (uint16_t) response.getBeamSteeringCwModSettings()->getReverseApiChannelIndex(); } if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) { settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker()); @@ -429,7 +428,7 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti } else { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker); } @@ -443,16 +442,16 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti } else { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); response.getBeamSteeringCwModSettings()->setRollupState(swgRollupState); } } } -void BeamSteeringCWMod::webapiReverseSendSettings(QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force) +void BeamSteeringCWMod::webapiReverseSendSettings(const QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings") @@ -463,8 +462,8 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList& channelSetting m_networkRequest.setUrl(QUrl(channelSettingsURL)); m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - QBuffer *buffer = new QBuffer(); - buffer->open((QBuffer::ReadWrite)); + auto *buffer = new QBuffer(); + buffer->open(QBuffer::ReadWrite); buffer->write(swgChannelSettings->asJson().toUtf8()); buffer->seek(0); @@ -477,9 +476,9 @@ void BeamSteeringCWMod::webapiReverseSendSettings(QList& channelSetting void BeamSteeringCWMod::sendChannelSettings( const QList& pipes, - QList& channelSettingsKeys, + const QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, - bool force) + bool force) const { for (const auto& pipe : pipes) { @@ -487,7 +486,7 @@ void BeamSteeringCWMod::sendChannelSettings( if (messageQueue) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( this, @@ -501,11 +500,11 @@ void BeamSteeringCWMod::sendChannelSettings( } void BeamSteeringCWMod::webapiFormatChannelSettings( - QList& channelSettingsKeys, + const QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, const BeamSteeringCWModSettings& settings, bool force -) +) const { swgChannelSettings->setDirection(2); // MIMO sink swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); @@ -534,20 +533,20 @@ void BeamSteeringCWMod::webapiFormatChannelSettings( if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force)) { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker); } if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force)) { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); swgBeamSteeringCWSettings->setRollupState(swgRollupState); } } -void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply) +void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply) const { QNetworkReply::NetworkError replyError = reply->error(); diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h index fa2c614b3a..0c7375d90e 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h @@ -86,67 +86,64 @@ class BeamSteeringCWMod: public MIMOChannel, public ChannelAPI qint64 m_centerFrequency; }; - BeamSteeringCWMod(DeviceAPI *deviceAPI); - virtual ~BeamSteeringCWMod(); - virtual void destroy() { delete this; } - virtual void setDeviceAPI(DeviceAPI *deviceAPI); - virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } - - virtual void startSinks() {} - virtual void stopSinks() {} - virtual void startSources(); //!< thread start() - virtual void stopSources(); //!< thread exit() and wait() - virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex); - virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex); - virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); } - virtual QString getMIMOName() { return objectName(); } - - virtual void getIdentifier(QString& id) { id = objectName(); } - virtual QString getIdentifier() const { return objectName(); } - virtual void getTitle(QString& title) { title = "BeamSteeringCWMod"; } - virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } - virtual void setCenterFrequency(qint64) {} + explicit BeamSteeringCWMod(DeviceAPI *deviceAPI); + ~BeamSteeringCWMod() final; + void destroy() final { delete this; } + void setDeviceAPI(DeviceAPI *deviceAPI) final; + DeviceAPI *getDeviceAPI() final { return m_deviceAPI; } + + void startSinks() final { /* Not used for MIMO */ } + void stopSinks() final { /* Not used for MIMO */ } + void startSources( /* Not used for MIMO */ ) final; //!< thread start() + void stopSources( /* Not used for MIMO */ ) final; //!< thread exit() and wait() + void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final; + void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final; + void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); } + QString getMIMOName() final { return objectName(); } + + void getIdentifier(QString& id) final { id = objectName(); } + QString getIdentifier() const final { return objectName(); } + void getTitle(QString& title) final { title = "BeamSteeringCWMod"; } + qint64 getCenterFrequency() const final { return m_frequencyOffset; } + void setCenterFrequency(qint64) final { /* Not used for MIMO */ } uint32_t getBasebandSampleRate() const { return m_basebandSampleRate; } - virtual QByteArray serialize() const; - virtual bool deserialize(const QByteArray& data); + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; - virtual int getNbSinkStreams() const { return 0; } - virtual int getNbSourceStreams() const { return 2; } - virtual int getStreamIndex() const { return -1; } + int getNbSinkStreams() const final { return 0; } + int getNbSourceStreams() const final { return 2; } + int getStreamIndex() const final { return -1; } - virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const + qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final { (void) streamIndex; (void) sinkElseSource; return m_frequencyOffset; } - virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } - MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } - - virtual int webapiSettingsGet( - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiSettingsPutPatch( - bool force, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiWorkspaceGet( - SWGSDRangel::SWGWorkspaceInfo& query, - QString& errorMessage); + int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage) final; static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, const BeamSteeringCWModSettings& settings); static void webapiUpdateChannelSettings( - BeamSteeringCWModSettings& settings, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response); + BeamSteeringCWModSettings& settings, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response); static const char* const m_channelIdURI; static const char* const m_channelId; @@ -161,36 +158,36 @@ class BeamSteeringCWMod: public MIMOChannel, public ChannelAPI BasebandSampleSink* m_spectrumSink; BasebandSampleSink* m_scopeSink; BeamSteeringCWModSettings m_settings; - MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; int64_t m_frequencyOffset; uint32_t m_basebandSampleRate; - int m_count0, m_count1; + int m_count0; + int m_count1; - virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed + bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed void applySettings(const BeamSteeringCWModSettings& settings, bool force = false); static void validateFilterChainHash(BeamSteeringCWModSettings& settings); void calculateFrequencyOffset(); - void webapiReverseSendSettings(QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force); + void webapiReverseSendSettings(const QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force); void sendChannelSettings( const QList& pipes, - QList& channelSettingsKeys, + const QList& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force - ); + ) const; void webapiFormatChannelSettings( - QList& channelSettingsKeys, + const QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, const BeamSteeringCWModSettings& settings, bool force - ); + ) const; private slots: void handleInputMessages(); - void networkManagerFinished(QNetworkReply *reply); + void networkManagerFinished(QNetworkReply *reply) const; }; #endif // INCLUDE_BEAMSTEERINGCWSOURCE_H diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp index 9ab94de534..1ead0427e0 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp @@ -30,15 +30,10 @@ BeamSteeringCWModGUI* BeamSteeringCWModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel) { - BeamSteeringCWModGUI* gui = new BeamSteeringCWModGUI(pluginAPI, deviceUISet, mimoChannel); + auto* gui = new BeamSteeringCWModGUI(pluginAPI, deviceUISet, mimoChannel); return gui; } -void BeamSteeringCWModGUI::destroy() -{ - delete this; -} - void BeamSteeringCWModGUI::resetToDefaults() { m_settings.resetToDefaults(); @@ -67,7 +62,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message) { if (BeamSteeringCWMod::MsgBasebandNotification::match(message)) { - BeamSteeringCWMod::MsgBasebandNotification& notif = (BeamSteeringCWMod::MsgBasebandNotification&) message; + auto& notif = (const BeamSteeringCWMod::MsgBasebandNotification&) message; m_basebandSampleRate = notif.getSampleRate(); m_centerFrequency = notif.getCenterFrequency(); displayRateAndShift(); @@ -76,7 +71,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message) } else if (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod::match(message)) { - const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod& cfg = (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message; + auto& cfg = (const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message; m_settings = cfg.getSettings(); blockApplySettings(true); m_channelMarker.updateSettings(static_cast(m_settings.m_channelMarker)); @@ -109,7 +104,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); m_bsCWSource = (BeamSteeringCWMod*) mimoChannel; - m_bsCWSource->setMessageQueueToGUI(getInputMessageQueue()); + m_bsCWSource->setMessageQueueToGUI(BeamSteeringCWModGUI::getInputMessageQueue()); m_basebandSampleRate = m_bsCWSource->getBasebandSampleRate(); connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); @@ -128,7 +123,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de m_deviceUISet->addChannelMarker(&m_channelMarker); - connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); + connect(BeamSteeringCWModGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); displaySettings(); makeUIConnections(); @@ -183,13 +178,13 @@ void BeamSteeringCWModGUI::displaySettings() void BeamSteeringCWModGUI::displayRateAndShift() { - int shift = m_shiftFrequencyFactor * m_basebandSampleRate; + auto shift = (int) (m_shiftFrequencyFactor * m_basebandSampleRate); double channelSampleRate = ((double) m_basebandSampleRate) / (1<offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift))); ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5))); m_channelMarker.setCenterFrequency(shift); - m_channelMarker.setBandwidth(channelSampleRate); + m_channelMarker.setBandwidth((int) channelSampleRate); } void BeamSteeringCWModGUI::leaveEvent(QEvent*) @@ -206,7 +201,7 @@ void BeamSteeringCWModGUI::handleSourceMessages() { Message* message; - while ((message = getInputMessageQueue()->pop()) != 0) + while ((message = getInputMessageQueue()->pop()) != nullptr) { if (handleMessage(*message)) { @@ -215,7 +210,7 @@ void BeamSteeringCWModGUI::handleSourceMessages() } } -void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown) +void BeamSteeringCWModGUI::onWidgetRolled(const QWidget* widget, bool rollDown) { (void) widget; (void) rollDown; @@ -226,7 +221,7 @@ void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void BeamSteeringCWModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); @@ -316,7 +311,7 @@ void BeamSteeringCWModGUI::tick() } } -void BeamSteeringCWModGUI::makeUIConnections() +void BeamSteeringCWModGUI::makeUIConnections() const { QObject::connect(ui->channelOutput, QOverload::of(&QComboBox::currentIndexChanged), this, &BeamSteeringCWModGUI::on_channelOutput_currentIndexChanged); QObject::connect(ui->interpolationFactor, QOverload::of(&QComboBox::currentIndexChanged), this, &BeamSteeringCWModGUI::on_interpolationFactor_currentIndexChanged); @@ -326,5 +321,5 @@ void BeamSteeringCWModGUI::makeUIConnections() void BeamSteeringCWModGUI::updateAbsoluteCenterFrequency() { - setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_basebandSampleRate); + setStatusFrequency(m_centerFrequency + (qint64) (m_shiftFrequencyFactor * m_basebandSampleRate)); } diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h index 4670821bad..643e66e2fa 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h @@ -47,22 +47,21 @@ class BeamSteeringCWModGUI : public ChannelGUI { public: static BeamSteeringCWModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel); - virtual void destroy(); - virtual void resetToDefaults(); - QByteArray serialize() const; - bool deserialize(const QByteArray& data); - virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }; - virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }; - virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }; - virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }; - virtual QString getTitle() const { return m_settings.m_title; }; - virtual QColor getTitleColor() const { return m_settings.m_rgbColor; }; - virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; } - virtual bool getHidden() const { return m_settings.m_hidden; } - virtual ChannelMarker& getChannelMarker() { return m_channelMarker; } - virtual int getStreamIndex() const { return -1; } - virtual void setStreamIndex(int streamIndex) { (void) streamIndex; } + void resetToDefaults() final; + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; + MessageQueue *getInputMessageQueue() final { return &m_inputMessageQueue; } + void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; }; + int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; }; + void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; }; + QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; }; + QString getTitle() const final { return m_settings.m_title; }; + QColor getTitleColor() const final { return m_settings.m_rgbColor; }; + void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; } + bool getHidden() const final { return m_settings.m_hidden; } + ChannelMarker& getChannelMarker() final { return m_channelMarker; } + int getStreamIndex() const final { return -1; } + void setStreamIndex(int streamIndex) final { (void) streamIndex; } private: Ui::BeamSteeringCWModGUI* ui; @@ -82,18 +81,18 @@ class BeamSteeringCWModGUI : public ChannelGUI { uint32_t m_tickCount; explicit BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel, QWidget* parent = nullptr); - virtual ~BeamSteeringCWModGUI(); + ~BeamSteeringCWModGUI() final; void blockApplySettings(bool block); void applySettings(bool force = false); void displaySettings(); void displayRateAndShift(); bool handleMessage(const Message& message); - void makeUIConnections(); + void makeUIConnections() const; void updateAbsoluteCenterFrequency(); - void leaveEvent(QEvent*); - void enterEvent(EnterEventType*); + void leaveEvent(QEvent*) final; + void enterEvent(EnterEventType*) final; void applyInterpolation(); void applyPosition(); @@ -104,7 +103,7 @@ private slots: void on_interpolationFactor_currentIndexChanged(int index); void on_position_valueChanged(int value); void on_steeringDegrees_valueChanged(int value); - void onWidgetRolled(QWidget* widget, bool rollDown); + void onWidgetRolled(const QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void tick(); }; diff --git a/plugins/channelmimo/doa2/doa2.cpp b/plugins/channelmimo/doa2/doa2.cpp index 6ff6537724..ed3704f1a1 100644 --- a/plugins/channelmimo/doa2/doa2.cpp +++ b/plugins/channelmimo/doa2/doa2.cpp @@ -48,7 +48,6 @@ DOA2::DOA2(DeviceAPI *deviceAPI) : m_thread(nullptr), m_basebandSink(nullptr), m_running(false), - m_guiMessageQueue(nullptr), m_frequencyOffset(0), m_deviceSampleRate(48000), m_deviceCenterFrequency(435000000) @@ -65,7 +64,7 @@ DOA2::DOA2(DeviceAPI *deviceAPI) : this, &DOA2::networkManagerFinished ); - startSinks(); + DOA2::startSinks(); } DOA2::~DOA2() @@ -80,7 +79,7 @@ DOA2::~DOA2() m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeMIMOChannel(this); - stopSinks(); + DOA2::stopSinks(); } void DOA2::setDeviceAPI(DeviceAPI *deviceAPI) @@ -203,7 +202,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force) reverseAPIKeys.append("squelchdB"); if (m_running) { - m_basebandSink->setMagThreshold(CalcDb::powerFromdB(settings.m_squelchdB)); + m_basebandSink->setMagThreshold((float) CalcDb::powerFromdB(settings.m_squelchdB)); } } @@ -217,7 +216,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force) } if (m_running && ((m_settings.m_log2Decim != settings.m_log2Decim) - || (m_settings.m_filterChainHash != settings.m_filterChainHash) || force)) + || (m_settings.m_filterChainHash != settings.m_filterChainHash) || force)) { DOA2Baseband::MsgConfigureChannelizer *msg = DOA2Baseband::MsgConfigureChannelizer::create( settings.m_log2Decim, settings.m_filterChainHash); @@ -238,7 +237,7 @@ void DOA2::applySettings(const DOA2Settings& settings, bool force) QList pipes; MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes); - if (pipes.size() > 0) { + if (!pipes.empty()) { sendChannelSettings(pipes, reverseAPIKeys, settings, force); } @@ -249,7 +248,7 @@ void DOA2::handleInputMessages() { Message* message; - while ((message = m_inputMessageQueue.pop()) != 0) + while ((message = m_inputMessageQueue.pop()) != nullptr) { if (handleMessage(*message)) { @@ -262,14 +261,14 @@ bool DOA2::handleMessage(const Message& cmd) { if (MsgConfigureDOA2::match(cmd)) { - MsgConfigureDOA2& cfg = (MsgConfigureDOA2&) cmd; + auto& cfg = (const MsgConfigureDOA2&) cmd; qDebug() << "DOA2::handleMessage: MsgConfigureDOA2"; applySettings(cfg.getSettings(), cfg.getForce()); return true; } else if (DSPMIMOSignalNotification::match(cmd)) { - DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd; + auto& notif = (const DSPMIMOSignalNotification&) cmd; qDebug() << "DOA2::handleMessage: DSPMIMOSignalNotification:" << " inputSampleRate: " << notif.getSampleRate() @@ -347,7 +346,7 @@ void DOA2::validateFilterChainHash(DOA2Settings& settings) void DOA2::calculateFrequencyOffset() { double shiftFactor = HBFilterChainConverter::getShiftFactor(m_settings.m_log2Decim, m_settings.m_filterChainHash); - m_frequencyOffset = m_deviceSampleRate * shiftFactor; + m_frequencyOffset = (int64_t) (m_deviceSampleRate * shiftFactor); } void DOA2::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash) @@ -360,12 +359,12 @@ void DOA2::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash) m_basebandSink->getInputMessageQueue()->push(msg); } -float DOA2::getPhi() const +double DOA2::getPhi() const { - return m_basebandSink ? m_basebandSink->getPhi() : 0.0f; + return m_basebandSink ? m_basebandSink->getPhi() : 0.0; } -float DOA2::getPositiveDOA() const +double DOA2::getPositiveDOA() const { return std::acos(getPhi()/M_PI)*(180/M_PI); } @@ -469,13 +468,13 @@ void DOA2::webapiUpdateChannelSettings( settings.m_reverseAPIAddress = *response.getDoa2Settings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getDoa2Settings()->getReverseApiPort(); + settings.m_reverseAPIPort = (uint16_t) response.getDoa2Settings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getDoa2Settings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = (uint16_t) response.getDoa2Settings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getDoa2Settings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = (uint16_t) response.getDoa2Settings()->getReverseApiChannelIndex(); } if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) { settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getDoa2Settings()->getScopeConfig()); @@ -525,7 +524,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response } else { - SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope(); + auto *swgGLScope = new SWGSDRangel::SWGGLScope(); settings.m_scopeGUI->formatTo(swgGLScope); response.getDoa2Settings()->setScopeConfig(swgGLScope); } @@ -539,7 +538,7 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response } else { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); response.getDoa2Settings()->setChannelMarker(swgChannelMarker); } @@ -553,39 +552,39 @@ void DOA2::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response } else { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); response.getDoa2Settings()->setRollupState(swgRollupState); } } } -void DOA2::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) +void DOA2::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) const { - float phi = normalizeAngle(getPhi() * (180/M_PI), 180.0f); - response.getDoa2Report()->setPhi(phi); + double phi = normalizeAngle(getPhi() * (180.0/M_PI), 180.0); + response.getDoa2Report()->setPhi((qint32) phi); - float hwl = 1.5e8 / (m_deviceCenterFrequency + m_frequencyOffset); - float cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance); - float blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ? + double hwl = 1.5e8 / (double) (m_deviceCenterFrequency + m_frequencyOffset); + double cosTheta = (getPhi()/M_PI) * ((hwl * 1000.0) / m_settings.m_basebandDistance); + double blindAngle = (m_settings.m_basebandDistance > hwl * 1000.0) ? std::acos((hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) : 0; response.getDoa2Report()->setBlindAngle((int) blindAngle); - float doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI); + double doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180.0/M_PI); qDebug("DOA2::webapiFormatChannelReport: phi: %f cosT: %f DOAngle: %f", getPhi(), cosTheta, doaAngle); - float posAngle = normalizeAngle(m_settings.m_antennaAz - doaAngle, 360.0f); // DOA angles are trigonometric but displayed angles are clockwise - float negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0f); - response.getDoa2Report()->setPosAz(posAngle); - response.getDoa2Report()->setNegAz(negAngle); + double posAngle = normalizeAngle(m_settings.m_antennaAz - doaAngle, 360.0); // DOA angles are trigonometric but displayed angles are clockwise + double negAngle = normalizeAngle(m_settings.m_antennaAz + doaAngle, 360.0); + response.getDoa2Report()->setPosAz((qint32) posAngle); + response.getDoa2Report()->setNegAz((qint32) negAngle); response.getDoa2Report()->setFftSize(m_fftSize); int channelSampleRate = m_deviceSampleRate / (1<setChannelSampleRate(channelSampleRate); } -void DOA2::webapiReverseSendSettings(QList& channelSettingsKeys, const DOA2Settings& settings, bool force) +void DOA2::webapiReverseSendSettings(const QList& channelSettingsKeys, const DOA2Settings& settings, bool force) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings") @@ -596,8 +595,8 @@ void DOA2::webapiReverseSendSettings(QList& channelSettingsKeys, const m_networkRequest.setUrl(QUrl(channelSettingsURL)); m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - QBuffer *buffer = new QBuffer(); - buffer->open((QBuffer::ReadWrite)); + auto *buffer = new QBuffer(); + buffer->open(QBuffer::ReadWrite); buffer->write(swgChannelSettings->asJson().toUtf8()); buffer->seek(0); @@ -610,9 +609,9 @@ void DOA2::webapiReverseSendSettings(QList& channelSettingsKeys, const void DOA2::sendChannelSettings( const QList& pipes, - QList& channelSettingsKeys, + const QList& channelSettingsKeys, const DOA2Settings& settings, - bool force) + bool force) const { for (const auto& pipe : pipes) { @@ -620,7 +619,7 @@ void DOA2::sendChannelSettings( if (messageQueue) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( this, @@ -634,11 +633,11 @@ void DOA2::sendChannelSettings( } void DOA2::webapiFormatChannelSettings( - QList& channelSettingsKeys, + const QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, const DOA2Settings& settings, bool force -) +) const { swgChannelSettings->setDirection(2); // MIMO sink swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); @@ -677,29 +676,26 @@ void DOA2::webapiFormatChannelSettings( swgDOA2Settings->setFftAveragingValue(DOA2Settings::getAveragingValue(settings.m_fftAveragingIndex)); } - if (settings.m_scopeGUI) - { - if (channelSettingsKeys.contains("scopeConfig") || force) { - settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig()); - } + if ((settings.m_scopeGUI) && (channelSettingsKeys.contains("scopeConfig") || force)) { + settings.m_scopeGUI->formatTo(swgDOA2Settings->getScopeConfig()); } if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force)) { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); swgDOA2Settings->setChannelMarker(swgChannelMarker); } if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force)) { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); swgDOA2Settings->setRollupState(swgRollupState); } } -void DOA2::networkManagerFinished(QNetworkReply *reply) +void DOA2::networkManagerFinished(QNetworkReply *reply) const { QNetworkReply::NetworkError replyError = reply->error(); @@ -720,7 +716,7 @@ void DOA2::networkManagerFinished(QNetworkReply *reply) reply->deleteLater(); } -float DOA2::normalizeAngle(float angle, float max) +double DOA2::normalizeAngle(double angle, double max) { if (angle < 0) { return max + angle; } if (angle > max) { return angle - max; } diff --git a/plugins/channelmimo/doa2/doa2.h b/plugins/channelmimo/doa2/doa2.h index 236f90b293..391dcb7a3b 100644 --- a/plugins/channelmimo/doa2/doa2.h +++ b/plugins/channelmimo/doa2/doa2.h @@ -86,76 +86,73 @@ class DOA2: public MIMOChannel, public ChannelAPI qint64 m_centerFrequency; }; - DOA2(DeviceAPI *deviceAPI); - virtual ~DOA2(); - virtual void destroy() { delete this; } - virtual void setDeviceAPI(DeviceAPI *deviceAPI); - virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } - - virtual void startSinks(); //!< thread start() - virtual void stopSinks(); //!< thread exit() and wait() - virtual void startSources() {} - virtual void stopSources() {} - virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex); - virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex); - virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); } - virtual QString getMIMOName() { return objectName(); } - - virtual void getIdentifier(QString& id) { id = objectName(); } - virtual QString getIdentifier() const { return objectName(); } - virtual void getTitle(QString& title) { title = "DOA 2 sources"; } - virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } - virtual void setCenterFrequency(qint64) {} + explicit DOA2(DeviceAPI *deviceAPI); + ~DOA2() final; + void destroy() final { delete this; } + void setDeviceAPI(DeviceAPI *deviceAPI) final; + DeviceAPI *getDeviceAPI() final { return m_deviceAPI; } + + void startSinks() final; //!< thread start() + void stopSinks() final; //!< thread exit() and wait() + void startSources() final { /* Not for MIMO */ } + void stopSources() final { /* Not for MIMO */ } + void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final; + void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final; + void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); } + QString getMIMOName() final { return objectName(); } + + void getIdentifier(QString& id) final { id = objectName(); } + QString getIdentifier() const final { return objectName(); } + void getTitle(QString& title) final { title = "DOA 2 sources"; } + qint64 getCenterFrequency() const final { return m_frequencyOffset; } + void setCenterFrequency(qint64) final { /* Not for MIMO */ } uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; } - virtual QByteArray serialize() const; - virtual bool deserialize(const QByteArray& data); + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; - virtual int getNbSinkStreams() const { return 2; } - virtual int getNbSourceStreams() const { return 0; } - virtual int getStreamIndex() const { return -1; } + int getNbSinkStreams() const final { return 2; } + int getNbSourceStreams() const final { return 0; } + int getStreamIndex() const final { return -1; } - virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const + qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final { (void) streamIndex; (void) sinkElseSource; return m_frequencyOffset; } - virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } - MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } - ScopeVis *getScopeVis() { return &m_scopeSink; } void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash); - float getPhi() const; - float getPositiveDOA() const; + double getPhi() const; + double getPositiveDOA() const; - virtual int webapiSettingsGet( - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiSettingsPutPatch( - bool force, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiReportGet( - SWGSDRangel::SWGChannelReport& response, - QString& errorMessage); + int webapiReportGet( + SWGSDRangel::SWGChannelReport& response, + QString& errorMessage) final; - virtual int webapiWorkspaceGet( - SWGSDRangel::SWGWorkspaceInfo& query, - QString& errorMessage); + int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage) final; static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, const DOA2Settings& settings); static void webapiUpdateChannelSettings( - DOA2Settings& settings, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response); + DOA2Settings& settings, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response); static const char* const m_channelIdURI; static const char* const m_channelId; @@ -169,7 +166,6 @@ class DOA2: public MIMOChannel, public ChannelAPI QMutex m_mutex; bool m_running; DOA2Settings m_settings; - MessageQueue *m_guiMessageQueue; //!< Input message queue to the GUI QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; @@ -177,31 +173,32 @@ class DOA2: public MIMOChannel, public ChannelAPI int64_t m_frequencyOffset; uint32_t m_deviceSampleRate; qint64 m_deviceCenterFrequency; - int m_count0, m_count1; + int m_count0; + int m_count1; - virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed + bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed void applySettings(const DOA2Settings& settings, bool force = false); static void validateFilterChainHash(DOA2Settings& settings); void calculateFrequencyOffset(); - void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); - void webapiReverseSendSettings(QList& channelSettingsKeys, const DOA2Settings& settings, bool force); + void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) const; + void webapiReverseSendSettings(const QList& channelSettingsKeys, const DOA2Settings& settings, bool force); void sendChannelSettings( const QList& pipes, - QList& channelSettingsKeys, + const QList& channelSettingsKeys, const DOA2Settings& settings, bool force - ); + ) const; void webapiFormatChannelSettings( - QList& channelSettingsKeys, + const QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, const DOA2Settings& settings, bool force - ); - static float normalizeAngle(float angle, float max); + ) const; + static double normalizeAngle(double angle, double max); private slots: void handleInputMessages(); - void networkManagerFinished(QNetworkReply *reply); + void networkManagerFinished(QNetworkReply *reply) const; }; #endif // INCLUDE_DOA2_H diff --git a/plugins/channelmimo/doa2/doa2baseband.h b/plugins/channelmimo/doa2/doa2baseband.h index b00518bf03..9ee669efbb 100644 --- a/plugins/channelmimo/doa2/doa2baseband.h +++ b/plugins/channelmimo/doa2/doa2baseband.h @@ -73,7 +73,7 @@ class DOA2Baseband : public QObject private: DOA2Settings::CorrelationType m_correlationType; - MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) : + explicit MsgConfigureCorrelation(DOA2Settings::CorrelationType correlationType) : Message(), m_correlationType(correlationType) {} @@ -103,8 +103,8 @@ class DOA2Baseband : public QObject { } }; - DOA2Baseband(int fftSize); - ~DOA2Baseband(); + explicit DOA2Baseband(int fftSize); + ~DOA2Baseband() final; void reset(); MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication @@ -114,7 +114,7 @@ class DOA2Baseband : public QObject void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int streamIndex); void setBasebandSampleRate(unsigned int sampleRate); - float getPhi() const { return m_phi; } + double getPhi() const { return m_phi; } void setMagThreshold(float threshold) { m_magThreshold = threshold * SDR_RX_SCALED * SDR_RX_SCALED; } void setFFTAveraging(int nbFFT); @@ -128,9 +128,9 @@ class DOA2Baseband : public QObject DOA2Settings::CorrelationType m_correlationType; int m_fftSize; int m_samplesCount; //!< Number of samples processed by DOA - float m_magSum; //!< Squared magnitudes accumulator - float m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude) - float m_phi; //!< Resulting calculated phase difference + double m_magSum; //!< Squared magnitudes accumulator + double m_wphSum; //!< Phase difference accumulator (averaging weighted by squared magnitude) + double m_phi; //!< Resulting calculated phase difference double m_magThreshold; //!< Squared magnitude scaled threshold int m_fftAvg; //!< Average over a certain number of FFTs int m_fftAvgCount; //!< FFT averaging counter diff --git a/plugins/channelmimo/doa2/doa2gui.cpp b/plugins/channelmimo/doa2/doa2gui.cpp index 75f6b6fa03..972491b61b 100644 --- a/plugins/channelmimo/doa2/doa2gui.cpp +++ b/plugins/channelmimo/doa2/doa2gui.cpp @@ -33,15 +33,10 @@ DOA2GUI* DOA2GUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO) { - DOA2GUI* gui = new DOA2GUI(pluginAPI, deviceUISet, channelMIMO); + auto* gui = new DOA2GUI(pluginAPI, deviceUISet, channelMIMO); return gui; } -void DOA2GUI::destroy() -{ - delete this; -} - void DOA2GUI::resetToDefaults() { m_settings.resetToDefaults(); @@ -78,7 +73,7 @@ bool DOA2GUI::handleMessage(const Message& message) { if (DOA2::MsgBasebandNotification::match(message)) { - DOA2::MsgBasebandNotification& notif = (DOA2::MsgBasebandNotification&) message; + auto& notif = (const DOA2::MsgBasebandNotification&) message; m_sampleRate = notif.getSampleRate(); m_centerFrequency = notif.getCenterFrequency(); displayRateAndShift(); @@ -88,7 +83,7 @@ bool DOA2GUI::handleMessage(const Message& message) } else if (DOA2::MsgConfigureDOA2::match(message)) { - const DOA2::MsgConfigureDOA2& notif = (const DOA2::MsgConfigureDOA2&) message; + auto& notif = (const DOA2::MsgConfigureDOA2&) message; m_settings = notif.getSettings(); ui->scopeGUI->updateSettings(); m_channelMarker.updateSettings(static_cast(m_settings.m_channelMarker)); @@ -122,7 +117,7 @@ DOA2GUI::DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *ch m_doa2 = (DOA2*) channelMIMO; m_scopeVis = m_doa2->getScopeVis(); m_scopeVis->setGLScope(ui->glScope); - m_doa2->setMessageQueueToGUI(getInputMessageQueue()); + m_doa2->setMessageQueueToGUI(DOA2GUI::getInputMessageQueue()); m_sampleRate = m_doa2->getDeviceSampleRate(); ui->glScope->setTraceModulo(DOA2::m_fftSize); @@ -150,7 +145,7 @@ DOA2GUI::DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *ch ui->scopeGUI->traceLengthChange(); ui->compass->setBlindAngleBorder(true); - connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); + connect(DOA2GUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); displaySettings(); makeUIConnections(); @@ -221,20 +216,20 @@ void DOA2GUI::displaySettings() void DOA2GUI::displayRateAndShift() { - int shift = m_shiftFrequencyFactor * m_sampleRate; + auto shift = (int) (m_shiftFrequencyFactor * m_sampleRate); double channelSampleRate = ((double) m_sampleRate) / (1<offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift))); ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5))); m_channelMarker.setCenterFrequency(shift); - m_channelMarker.setBandwidth(channelSampleRate); - m_scopeVis->setLiveRate(channelSampleRate); + m_channelMarker.setBandwidth((int) channelSampleRate); + m_scopeVis->setLiveRate((int) channelSampleRate); } void DOA2GUI::setFFTAveragingTooltip() { - float channelSampleRate = ((float) m_sampleRate) / (1<pop()) != 0) + while ((message = getInputMessageQueue()->pop()) != nullptr) { if (handleMessage(*message)) { @@ -283,7 +278,7 @@ void DOA2GUI::handleSourceMessages() } } -void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown) +void DOA2GUI::onWidgetRolled(const QWidget* widget, bool rollDown) { (void) widget; (void) rollDown; @@ -294,7 +289,7 @@ void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown) void DOA2GUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); @@ -434,7 +429,7 @@ void DOA2GUI::tick() } } -void DOA2GUI::makeUIConnections() +void DOA2GUI::makeUIConnections() const { QObject::connect(ui->decimationFactor, QOverload::of(&QComboBox::currentIndexChanged), this, &DOA2GUI::on_decimationFactor_currentIndexChanged); QObject::connect(ui->position, &QSlider::valueChanged, this, &DOA2GUI::on_position_valueChanged); @@ -449,9 +444,9 @@ void DOA2GUI::makeUIConnections() void DOA2GUI::updateAbsoluteCenterFrequency() { - qint64 cf = m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate; + auto cf = (qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate); setStatusFrequency(cf); - m_hwl = 1.5e+8 / cf; + m_hwl = 1.5e+8 / (double) cf; ui->halfWLText->setText(tr("%1").arg(m_hwl*1000, 5, 'f', 0)); updateScopeFScale(); } @@ -470,14 +465,14 @@ void DOA2GUI::updateScopeFScale() void DOA2GUI::updateDOA() { - float cosTheta = (m_doa2->getPhi()/M_PI) * ((m_hwl * 1000.0) / m_settings.m_basebandDistance); - float blindAngle = (m_settings.m_basebandDistance > m_hwl * 1000.0) ? + double cosTheta = (m_doa2->getPhi()/M_PI) * ((m_hwl * 1000.0) / m_settings.m_basebandDistance); + double blindAngle = (m_settings.m_basebandDistance > m_hwl * 1000.0) ? std::acos((m_hwl * 1000.0) / m_settings.m_basebandDistance) * (180/M_PI) : 0; ui->compass->setBlindAngle(blindAngle); - float doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI); - float posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise - float negAngle = ui->antAz->value() + doaAngle; + double doaAngle = std::acos(cosTheta < -1.0 ? -1.0 : cosTheta > 1.0 ? 1.0 : cosTheta) * (180/M_PI); + double posAngle = ui->antAz->value() - doaAngle; // DOA angles are trigonometric but displayed angles are clockwise + double negAngle = ui->antAz->value() + doaAngle; ui->compass->setAzPos(posAngle); ui->compass->setAzNeg(negAngle); ui->posText->setText(tr("%1").arg(ui->compass->getAzPos(), 3, 'f', 0, QLatin1Char('0'))); diff --git a/plugins/channelmimo/doa2/doa2gui.h b/plugins/channelmimo/doa2/doa2gui.h index 3cd559c6f0..f0d669f3cb 100644 --- a/plugins/channelmimo/doa2/doa2gui.h +++ b/plugins/channelmimo/doa2/doa2gui.h @@ -46,22 +46,21 @@ class DOA2GUI : public ChannelGUI { public: static DOA2GUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel); - virtual void destroy(); - virtual void resetToDefaults(); - virtual QByteArray serialize() const; - virtual bool deserialize(const QByteArray& data); - virtual MessageQueue* getInputMessageQueue(); - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }; - virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }; - virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }; - virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }; - virtual QString getTitle() const { return m_settings.m_title; }; - virtual QColor getTitleColor() const { return m_settings.m_rgbColor; }; - virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; } - virtual bool getHidden() const { return m_settings.m_hidden; } - virtual ChannelMarker& getChannelMarker() { return m_channelMarker; } - virtual int getStreamIndex() const { return -1; } - virtual void setStreamIndex(int streamIndex) { (void) streamIndex; } + void resetToDefaults() final; + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; + MessageQueue* getInputMessageQueue() final; + void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; }; + int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; }; + void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; }; + QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; }; + QString getTitle() const final { return m_settings.m_title; }; + QColor getTitleColor() const final { return m_settings.m_rgbColor; }; + void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; } + bool getHidden() const final { return m_settings.m_hidden; } + ChannelMarker& getChannelMarker() final { return m_channelMarker; } + int getStreamIndex() const final { return -1; } + void setStreamIndex(int streamIndex) final { (void) streamIndex; } private: Ui::DOA2GUI* ui; @@ -82,7 +81,7 @@ class DOA2GUI : public ChannelGUI { double m_hwl; //!< Half wavelength at center frequency explicit DOA2GUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr); - virtual ~DOA2GUI(); + ~DOA2GUI() final; void blockApplySettings(bool block); void applySettings(bool force = false); @@ -93,13 +92,13 @@ class DOA2GUI : public ChannelGUI { void setFFTAveragingTooltip(); static void setNumberStr(float v, int decimalPlaces, QString& s); bool handleMessage(const Message& message); - void makeUIConnections(); + void makeUIConnections() const; void updateAbsoluteCenterFrequency(); void updateScopeFScale(); void updateDOA(); - void leaveEvent(QEvent*); - void enterEvent(EnterEventType*); + void leaveEvent(QEvent*) final; + void enterEvent(EnterEventType*) final; private slots: void handleSourceMessages(); @@ -112,7 +111,7 @@ private slots: void on_squelch_valueChanged(int value); void on_fftAveraging_currentIndexChanged(int index); void on_centerPosition_clicked(); - void onWidgetRolled(QWidget* widget, bool rollDown); + void onWidgetRolled(const QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void tick(); }; diff --git a/plugins/channelmimo/interferometer/interferometer.cpp b/plugins/channelmimo/interferometer/interferometer.cpp index 1330edbf2e..808e6503cb 100644 --- a/plugins/channelmimo/interferometer/interferometer.cpp +++ b/plugins/channelmimo/interferometer/interferometer.cpp @@ -83,7 +83,7 @@ Interferometer::Interferometer(DeviceAPI *deviceAPI) : &Interferometer::updateDeviceSetList ); updateDeviceSetList(); - startSinks(); + Interferometer::startSinks(); } Interferometer::~Interferometer() @@ -98,7 +98,7 @@ Interferometer::~Interferometer() m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeMIMOChannel(this); - stopSinks(); + Interferometer::stopSinks(); } void Interferometer::setDeviceAPI(DeviceAPI *deviceAPI) @@ -229,7 +229,7 @@ void Interferometer::applySettings(const InterferometerSettings& settings, const QList pipes; MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes); - if (pipes.size() > 0) { + if (!pipes.empty()) { sendChannelSettings(pipes, settingsKeys, settings, force); } @@ -254,7 +254,7 @@ void Interferometer::handleInputMessages() { Message* message; - while ((message = m_inputMessageQueue.pop()) != 0) + while ((message = m_inputMessageQueue.pop()) != nullptr) { if (handleMessage(*message)) { @@ -267,14 +267,14 @@ bool Interferometer::handleMessage(const Message& cmd) { if (MsgConfigureInterferometer::match(cmd)) { - MsgConfigureInterferometer& cfg = (MsgConfigureInterferometer&) cmd; + auto& cfg = (const MsgConfigureInterferometer&) cmd; qDebug() << "Interferometer::handleMessage: MsgConfigureInterferometer"; applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce()); return true; } else if (DSPMIMOSignalNotification::match(cmd)) { - DSPMIMOSignalNotification& notif = (DSPMIMOSignalNotification&) cmd; + auto& notif = (const DSPMIMOSignalNotification&) cmd; qDebug() << "Interferometer::handleMessage: DSPMIMOSignalNotification:" << " inputSampleRate: " << notif.getSampleRate() @@ -355,7 +355,7 @@ void Interferometer::validateFilterChainHash(InterferometerSettings& settings) void Interferometer::calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash) { double shiftFactor = HBFilterChainConverter::getShiftFactor(log2Decim, filterChainHash); - m_frequencyOffset = m_deviceSampleRate * shiftFactor; + m_frequencyOffset = (int64_t) (m_deviceSampleRate * shiftFactor); } void Interferometer::applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash) @@ -383,7 +383,7 @@ void Interferometer::updateDeviceSetList() if (deviceSourceEngine) { - DeviceSampleSource *deviceSource = deviceSourceEngine->getSource(); + const DeviceSampleSource *deviceSource = deviceSourceEngine->getSource(); if (deviceSource->getDeviceDescription() == "LocalInput") { m_localInputDeviceIndexes.append(deviceSetIndex); @@ -401,7 +401,7 @@ void Interferometer::updateDeviceSetList() InterferometerSettings settings = m_settings; int newIndexInList; - if (m_localInputDeviceIndexes.size() != 0) // there are some local input devices + if (!m_localInputDeviceIndexes.empty()) // there are some local input devices { if (m_settings.m_localDeviceIndex < 0) { // not set before newIndexInList = 0; // set to first device in list @@ -574,13 +574,13 @@ void Interferometer::webapiUpdateChannelSettings( settings.m_reverseAPIAddress = *response.getInterferometerSettings()->getReverseApiAddress(); } if (channelSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getInterferometerSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = (uint16_t) response.getInterferometerSettings()->getReverseApiPort(); } if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getInterferometerSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = (uint16_t) response.getInterferometerSettings()->getReverseApiDeviceIndex(); } if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { - settings.m_reverseAPIChannelIndex = response.getInterferometerSettings()->getReverseApiChannelIndex(); + settings.m_reverseAPIChannelIndex = (uint16_t) response.getInterferometerSettings()->getReverseApiChannelIndex(); } if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) { settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getSpectrumConfig()); @@ -632,7 +632,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings } else { - SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum(); + auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum(); settings.m_spectrumGUI->formatTo(swgGLSpectrum); response.getInterferometerSettings()->setSpectrumConfig(swgGLSpectrum); } @@ -646,7 +646,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings } else { - SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope(); + auto *swgGLScope = new SWGSDRangel::SWGGLScope(); settings.m_scopeGUI->formatTo(swgGLScope); response.getInterferometerSettings()->setScopeConfig(swgGLScope); } @@ -660,7 +660,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings } else { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); response.getInterferometerSettings()->setChannelMarker(swgChannelMarker); } @@ -674,7 +674,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings } else { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); response.getInterferometerSettings()->setRollupState(swgRollupState); } @@ -683,7 +683,7 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings void Interferometer::webapiReverseSendSettings(const QList& channelSettingsKeys, const InterferometerSettings& settings, bool force) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings") @@ -694,8 +694,8 @@ void Interferometer::webapiReverseSendSettings(const QList& channelSett m_networkRequest.setUrl(QUrl(channelSettingsURL)); m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - QBuffer *buffer = new QBuffer(); - buffer->open((QBuffer::ReadWrite)); + auto *buffer = new QBuffer(); + buffer->open(QBuffer::ReadWrite); buffer->write(swgChannelSettings->asJson().toUtf8()); buffer->seek(0); @@ -710,7 +710,7 @@ void Interferometer::sendChannelSettings( const QList& pipes, const QList& channelSettingsKeys, const InterferometerSettings& settings, - bool force) + bool force) const { for (const auto& pipe : pipes) { @@ -718,7 +718,7 @@ void Interferometer::sendChannelSettings( if (messageQueue) { - SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); + auto *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force); MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create( this, @@ -736,7 +736,7 @@ void Interferometer::webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings *swgChannelSettings, const InterferometerSettings& settings, bool force -) +) const { swgChannelSettings->setDirection(2); // MIMO sink swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); @@ -774,34 +774,34 @@ void Interferometer::webapiFormatChannelSettings( if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrumConfig") || force)) { - SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum(); + auto *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum(); settings.m_spectrumGUI->formatTo(swgGLSpectrum); swgInterferometerSettings->setSpectrumConfig(swgGLSpectrum); } if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force)) { - SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope(); + auto *swgGLScope = new SWGSDRangel::SWGGLScope(); settings.m_scopeGUI->formatTo(swgGLScope); swgInterferometerSettings->setScopeConfig(swgGLScope); } if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force)) { - SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); + auto *swgChannelMarker = new SWGSDRangel::SWGChannelMarker(); settings.m_channelMarker->formatTo(swgChannelMarker); swgInterferometerSettings->setChannelMarker(swgChannelMarker); } if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force)) { - SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState(); + auto *swgRollupState = new SWGSDRangel::SWGRollupState(); settings.m_rollupState->formatTo(swgRollupState); swgInterferometerSettings->setRollupState(swgRollupState); } } -void Interferometer::networkManagerFinished(QNetworkReply *reply) +void Interferometer::networkManagerFinished(QNetworkReply *reply) const { QNetworkReply::NetworkError replyError = reply->error(); diff --git a/plugins/channelmimo/interferometer/interferometer.h b/plugins/channelmimo/interferometer/interferometer.h index 9272826753..4531fb4a23 100644 --- a/plugins/channelmimo/interferometer/interferometer.h +++ b/plugins/channelmimo/interferometer/interferometer.h @@ -108,72 +108,69 @@ class Interferometer: public MIMOChannel, public ChannelAPI { } }; - Interferometer(DeviceAPI *deviceAPI); - virtual ~Interferometer(); - virtual void destroy() { delete this; } - virtual void setDeviceAPI(DeviceAPI *deviceAPI); - virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } - - virtual void startSinks(); //!< thread start() - virtual void stopSinks(); //!< thread exit() and wait() - virtual void startSources() {} - virtual void stopSources() {} - virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex); - virtual void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex); - virtual void pushMessage(Message *msg) { m_inputMessageQueue.push(msg); } - virtual QString getMIMOName() { return objectName(); } - - virtual void getIdentifier(QString& id) { id = objectName(); } - virtual QString getIdentifier() const { return objectName(); } - virtual void getTitle(QString& title) { title = "Interferometer"; } - virtual qint64 getCenterFrequency() const { return m_frequencyOffset; } - virtual void setCenterFrequency(qint64) {} + explicit Interferometer(DeviceAPI *deviceAPI); + ~Interferometer() final; + void destroy() final { delete this; } + void setDeviceAPI(DeviceAPI *deviceAPI) final; + DeviceAPI *getDeviceAPI() final { return m_deviceAPI; } + + void startSinks() final; //!< thread start() + void stopSinks() final; //!< thread exit() and wait() + void startSources() final { /* not for MIMMO*/ } + void stopSources() final { /* not for MIMMO*/ } + void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, unsigned int sinkIndex) final; + void pull(SampleVector::iterator& begin, unsigned int nbSamples, unsigned int sourceIndex) final; + void pushMessage(Message *msg) final { m_inputMessageQueue.push(msg); } + QString getMIMOName() final { return objectName(); } + + void getIdentifier(QString& id) final { id = objectName(); } + QString getIdentifier() const final { return objectName(); } + void getTitle(QString& title) final { title = "Interferometer"; } + qint64 getCenterFrequency() const final { return m_frequencyOffset; } + void setCenterFrequency(qint64) final { /* not for MIMMO*/ } uint32_t getDeviceSampleRate() const { return m_deviceSampleRate; } - virtual QByteArray serialize() const; - virtual bool deserialize(const QByteArray& data); + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; - virtual int getNbSinkStreams() const { return 2; } - virtual int getNbSourceStreams() const { return 0; } - virtual int getStreamIndex() const { return -1; } + int getNbSinkStreams() const final { return 2; } + int getNbSourceStreams() const final { return 0; } + int getStreamIndex() const final { return -1; } - virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const + qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const final { (void) streamIndex; (void) sinkElseSource; return m_frequencyOffset; } - virtual void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } - MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } - SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } ScopeVis *getScopeVis() { return &m_scopeSink; } void applyChannelSettings(uint32_t log2Decim, uint32_t filterChainHash); const QList& getDeviceSetList() { return m_localInputDeviceIndexes; } - virtual int webapiSettingsGet( - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsGet( + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiSettingsPutPatch( - bool force, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response, - QString& errorMessage); + int webapiSettingsPutPatch( + bool force, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response, + QString& errorMessage) final; - virtual int webapiWorkspaceGet( - SWGSDRangel::SWGWorkspaceInfo& query, - QString& errorMessage); + int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage) final; static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, const InterferometerSettings& settings); static void webapiUpdateChannelSettings( - InterferometerSettings& settings, - const QStringList& channelSettingsKeys, - SWGSDRangel::SWGChannelSettings& response); + InterferometerSettings& settings, + const QStringList& channelSettingsKeys, + SWGSDRangel::SWGChannelSettings& response); static const char* const m_channelIdURI; static const char* const m_channelId; @@ -196,11 +193,12 @@ class Interferometer: public MIMOChannel, public ChannelAPI uint64_t m_centerFrequency; int64_t m_frequencyOffset; uint32_t m_deviceSampleRate; - int m_count0, m_count1; + int m_count0; + int m_count1; QList m_localInputDeviceIndexes; - virtual bool handleMessage(const Message& cmd); //!< Processing of a message. Returns true if message has actually been processed + bool handleMessage(const Message& cmd) final; //!< Processing of a message. Returns true if message has actually been processed void applySettings(const InterferometerSettings& settings, const QList& settingsKeys, bool force = false); static void validateFilterChainHash(InterferometerSettings& settings); void calculateFrequencyOffset(uint32_t log2Decim, uint32_t filterChainHash); @@ -213,17 +211,17 @@ class Interferometer: public MIMOChannel, public ChannelAPI const QList& channelSettingsKeys, const InterferometerSettings& settings, bool force - ); + ) const; void webapiFormatChannelSettings( const QList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings *swgChannelSettings, const InterferometerSettings& settings, bool force - ); + ) const; private slots: void handleInputMessages(); - void networkManagerFinished(QNetworkReply *reply); + void networkManagerFinished(QNetworkReply *reply) const; }; #endif // INCLUDE_INTERFEROMETER_H diff --git a/plugins/channelmimo/interferometer/interferometergui.cpp b/plugins/channelmimo/interferometer/interferometergui.cpp index a4830d32c0..f9f006eef2 100644 --- a/plugins/channelmimo/interferometer/interferometergui.cpp +++ b/plugins/channelmimo/interferometer/interferometergui.cpp @@ -32,15 +32,10 @@ InterferometerGUI* InterferometerGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *channelMIMO) { - InterferometerGUI* gui = new InterferometerGUI(pluginAPI, deviceUISet, channelMIMO); + auto* gui = new InterferometerGUI(pluginAPI, deviceUISet, channelMIMO); return gui; } -void InterferometerGUI::destroy() -{ - delete this; -} - void InterferometerGUI::resetToDefaults() { m_settings.resetToDefaults(); @@ -77,7 +72,7 @@ bool InterferometerGUI::handleMessage(const Message& message) { if (Interferometer::MsgBasebandNotification::match(message)) { - Interferometer::MsgBasebandNotification& notif = (Interferometer::MsgBasebandNotification&) message; + auto& notif = (const Interferometer::MsgBasebandNotification&) message; m_sampleRate = notif.getSampleRate(); m_centerFrequency = notif.getCenterFrequency(); displayRateAndShift(); @@ -86,7 +81,7 @@ bool InterferometerGUI::handleMessage(const Message& message) } else if (Interferometer::MsgConfigureInterferometer::match(message)) { - const Interferometer::MsgConfigureInterferometer& cfg = (const Interferometer::MsgConfigureInterferometer&) message; + auto& cfg = (const Interferometer::MsgConfigureInterferometer&) message; if (cfg.getForce()) { m_settings = cfg.getSettings(); @@ -102,7 +97,8 @@ bool InterferometerGUI::handleMessage(const Message& message) } else if (Interferometer::MsgReportDevices::match(message)) { - Interferometer::MsgReportDevices& report = (Interferometer::MsgReportDevices&) message; + auto& msg = const_cast(message); + auto& report = (Interferometer::MsgReportDevices&) msg; updateDeviceSetList(report.getDeviceSetIndexes()); return true; } @@ -135,7 +131,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI m_spectrumVis->setGLSpectrum(ui->glSpectrum); m_scopeVis = m_interferometer->getScopeVis(); m_scopeVis->setGLScope(ui->glScope); - m_interferometer->setMessageQueueToGUI(getInputMessageQueue()); + m_interferometer->setMessageQueueToGUI(InterferometerGUI::getInputMessageQueue()); m_sampleRate = m_interferometer->getDeviceSampleRate(); ui->spectrumGUI->setBuddies(m_spectrumVis, ui->glSpectrum); @@ -175,7 +171,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI m_scopeVis->setTraceChunkSize(Interferometer::m_fftSize); // Set scope trace length unit to FFT size ui->scopeGUI->traceLengthChange(); - connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); + connect(InterferometerGUI::getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages())); updateDeviceSetList(m_interferometer->getDeviceSetList()); displaySettings(); @@ -243,15 +239,15 @@ void InterferometerGUI::displaySettings() void InterferometerGUI::displayRateAndShift() { - int shift = m_shiftFrequencyFactor * m_sampleRate; + auto shift = (int) (m_shiftFrequencyFactor * m_sampleRate); double channelSampleRate = ((double) m_sampleRate) / (1<offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift))); ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5))); m_channelMarker.setCenterFrequency(shift); - m_channelMarker.setBandwidth(channelSampleRate); - ui->glSpectrum->setSampleRate(channelSampleRate); - m_scopeVis->setLiveRate(channelSampleRate); + m_channelMarker.setBandwidth((int) channelSampleRate); + ui->glSpectrum->setSampleRate((int) channelSampleRate); + m_scopeVis->setLiveRate((int) channelSampleRate); } void InterferometerGUI::leaveEvent(QEvent*) @@ -268,7 +264,7 @@ void InterferometerGUI::handleSourceMessages() { Message* message; - while ((message = getInputMessageQueue()->pop()) != 0) + while ((message = getInputMessageQueue()->pop()) != nullptr) { if (handleMessage(*message)) { @@ -277,7 +273,7 @@ void InterferometerGUI::handleSourceMessages() } } -void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown) +void InterferometerGUI::onWidgetRolled(const QWidget* widget, bool rollDown) { (void) widget; (void) rollDown; @@ -288,7 +284,7 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void InterferometerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); @@ -330,7 +326,7 @@ void InterferometerGUI::onMenuDialogCalled(const QPoint &p) void InterferometerGUI::updateDeviceSetList(const QList& deviceSetIndexes) { - QList::const_iterator it = deviceSetIndexes.begin(); + auto it = deviceSetIndexes.begin(); ui->localDevice->blockSignals(true); @@ -343,7 +339,7 @@ void InterferometerGUI::updateDeviceSetList(const QList& deviceSetIndexes) ui->localDevice->blockSignals(false); } -int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex) +int InterferometerGUI::getLocalDeviceIndexInCombo(int localDeviceIndex) const { int index = 0; @@ -457,7 +453,7 @@ void InterferometerGUI::tick() } } -void InterferometerGUI::makeUIConnections() +void InterferometerGUI::makeUIConnections() const { QObject::connect(ui->decimationFactor, QOverload::of(&QComboBox::currentIndexChanged), this, &InterferometerGUI::on_decimationFactor_currentIndexChanged); QObject::connect(ui->position, &QSlider::valueChanged, this, &InterferometerGUI::on_position_valueChanged); @@ -472,5 +468,5 @@ void InterferometerGUI::makeUIConnections() void InterferometerGUI::updateAbsoluteCenterFrequency() { - setStatusFrequency(m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate); + setStatusFrequency((qint64) ((double) m_centerFrequency + m_shiftFrequencyFactor * m_sampleRate)); } diff --git a/plugins/channelmimo/interferometer/interferometergui.h b/plugins/channelmimo/interferometer/interferometergui.h index a0d19f59d9..f6fc7a37db 100644 --- a/plugins/channelmimo/interferometer/interferometergui.h +++ b/plugins/channelmimo/interferometer/interferometergui.h @@ -46,22 +46,21 @@ class InterferometerGUI : public ChannelGUI { public: static InterferometerGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *mimoChannel); - virtual void destroy(); - virtual void resetToDefaults(); - virtual QByteArray serialize() const; - virtual bool deserialize(const QByteArray& data); - virtual MessageQueue* getInputMessageQueue(); - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; }; - virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; }; - virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }; - virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }; - virtual QString getTitle() const { return m_settings.m_title; }; - virtual QColor getTitleColor() const { return m_settings.m_rgbColor; }; - virtual void zetHidden(bool hidden) { m_settings.m_hidden = hidden; } - virtual bool getHidden() const { return m_settings.m_hidden; } - virtual ChannelMarker& getChannelMarker() { return m_channelMarker; } - virtual int getStreamIndex() const { return -1; } - virtual void setStreamIndex(int streamIndex) { (void) streamIndex; } + void resetToDefaults() final; + QByteArray serialize() const final; + bool deserialize(const QByteArray& data) final; + MessageQueue* getInputMessageQueue() final; + void setWorkspaceIndex(int index) final { m_settings.m_workspaceIndex = index; }; + int getWorkspaceIndex() const final { return m_settings.m_workspaceIndex; }; + void setGeometryBytes(const QByteArray& blob) final { m_settings.m_geometryBytes = blob; }; + QByteArray getGeometryBytes() const final { return m_settings.m_geometryBytes; }; + QString getTitle() const final { return m_settings.m_title; }; + QColor getTitleColor() const final { return m_settings.m_rgbColor; }; + void zetHidden(bool hidden) final { m_settings.m_hidden = hidden; } + bool getHidden() const final { return m_settings.m_hidden; } + ChannelMarker& getChannelMarker() final { return m_channelMarker; } + int getStreamIndex() const final { return -1; } + void setStreamIndex(int streamIndex) final { (void) streamIndex; } private: Ui::InterferometerGUI* ui; @@ -83,7 +82,7 @@ class InterferometerGUI : public ChannelGUI { uint32_t m_tickCount; explicit InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, MIMOChannel *rxChannel, QWidget* parent = nullptr); - virtual ~InterferometerGUI(); + ~InterferometerGUI() final; void blockApplySettings(bool block); void applySettings(bool force = false); @@ -92,13 +91,13 @@ class InterferometerGUI : public ChannelGUI { void displaySettings(); void displayRateAndShift(); bool handleMessage(const Message& message); - void makeUIConnections(); + void makeUIConnections() const; void updateAbsoluteCenterFrequency(); void updateDeviceSetList(const QList& deviceSetIndexes); - int getLocalDeviceIndexInCombo(int localDeviceIndex); + int getLocalDeviceIndexInCombo(int localDeviceIndex) const; - void leaveEvent(QEvent*); - void enterEvent(EnterEventType*); + void leaveEvent(QEvent*) final; + void enterEvent(EnterEventType*) final; private slots: void handleSourceMessages(); @@ -111,7 +110,7 @@ private slots: void on_correlationType_currentIndexChanged(int index); void on_localDevice_currentIndexChanged(int index); void on_localDevicePlay_toggled(bool checked); - void onWidgetRolled(QWidget* widget, bool rollDown); + void onWidgetRolled(const QWidget* widget, bool rollDown); void onMenuDialogCalled(const QPoint& p); void tick(); }; diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.cpp b/plugins/channelrx/chanalyzer/chanalyzergui.cpp index 6de3cac8c5..26b15643d4 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzergui.cpp @@ -474,7 +474,7 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ChannelAnalyzerGUI::onMenuDialogCalled(const QPoint& p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/channelpower/channelpower.h b/plugins/channelrx/channelpower/channelpower.h index 505c2db522..07ab73e4d7 100644 --- a/plugins/channelrx/channelpower/channelpower.h +++ b/plugins/channelrx/channelpower/channelpower.h @@ -138,11 +138,6 @@ class ChannelPower : public BasebandSampleSink, public ChannelAPI { m_basebandSink->resetMagLevels(); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ - uint32_t getNumberOfDeviceStreams() const; static const char * const m_channelIdURI; diff --git a/plugins/channelrx/channelpower/channelpowergui.cpp b/plugins/channelrx/channelpower/channelpowergui.cpp index 5b90dcc150..f76aa829ed 100644 --- a/plugins/channelrx/channelpower/channelpowergui.cpp +++ b/plugins/channelrx/channelpower/channelpowergui.cpp @@ -200,7 +200,7 @@ void ChannelPowerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ChannelPowerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodadsb/adsbdemod.h b/plugins/channelrx/demodadsb/adsbdemod.h index 2ded12ee93..aa514e784c 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.h +++ b/plugins/channelrx/demodadsb/adsbdemod.h @@ -152,7 +152,7 @@ class ADSBDemod : public BasebandSampleSink, public ChannelAPI { SWGSDRangel::SWGChannelSettings& response); void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } - void setMessageQueueToGUI(MessageQueue* queue) override { + void setMessageQueueToGUI(MessageQueue* queue) final { ChannelAPI::setMessageQueueToGUI(queue); m_basebandSink->setMessageQueueToGUI(queue); } diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index 342e8f5c83..40f5b75283 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -3904,7 +3904,7 @@ void ADSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ADSBDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodais/aisdemod.h b/plugins/channelrx/demodais/aisdemod.h index 54b521af24..009f3be1c4 100644 --- a/plugins/channelrx/demodais/aisdemod.h +++ b/plugins/channelrx/demodais/aisdemod.h @@ -163,10 +163,6 @@ class AISDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodais/aisdemodgui.cpp b/plugins/channelrx/demodais/aisdemodgui.cpp index b47ebbf36a..2c6b877a26 100644 --- a/plugins/channelrx/demodais/aisdemodgui.cpp +++ b/plugins/channelrx/demodais/aisdemodgui.cpp @@ -667,7 +667,7 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void AISDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodam/amdemodgui.cpp b/plugins/channelrx/demodam/amdemodgui.cpp index 415a65f3e6..bed687ecf9 100644 --- a/plugins/channelrx/demodam/amdemodgui.cpp +++ b/plugins/channelrx/demodam/amdemodgui.cpp @@ -394,7 +394,7 @@ void AMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void AMDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodapt/aptdemodgui.cpp b/plugins/channelrx/demodapt/aptdemodgui.cpp index c018ae69c5..cdbf3250f6 100644 --- a/plugins/channelrx/demodapt/aptdemodgui.cpp +++ b/plugins/channelrx/demodapt/aptdemodgui.cpp @@ -556,7 +556,7 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void APTDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index d8b9f0128c..cd010a55d5 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -207,7 +207,7 @@ void ATVDemodGUI::handleSourceMessages() void ATVDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.cpp b/plugins/channelrx/demodbfm/bfmdemodgui.cpp index 516132209c..2ccd75900b 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.cpp +++ b/plugins/channelrx/demodbfm/bfmdemodgui.cpp @@ -332,7 +332,7 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void BFMDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp index 7a87afeb5d..ceaada06e1 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.cpp @@ -349,7 +349,7 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ChirpChatDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demoddab/dabdemod.h b/plugins/channelrx/demoddab/dabdemod.h index 8f90cc756a..bce5df35b8 100644 --- a/plugins/channelrx/demoddab/dabdemod.h +++ b/plugins/channelrx/demoddab/dabdemod.h @@ -392,10 +392,6 @@ class DABDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; int getAudioSampleRate() const { return m_basebandSink->getAudioSampleRate(); } diff --git a/plugins/channelrx/demoddab/dabdemodgui.cpp b/plugins/channelrx/demoddab/dabdemodgui.cpp index 889a41334f..956632439e 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.cpp +++ b/plugins/channelrx/demoddab/dabdemodgui.cpp @@ -451,7 +451,7 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void DABDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index 56ef720287..cce1efe84e 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -169,7 +169,7 @@ void DATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void DATVDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demoddsc/dscdemod.h b/plugins/channelrx/demoddsc/dscdemod.h index 4fd4c1201d..e06b3bde5c 100644 --- a/plugins/channelrx/demoddsc/dscdemod.h +++ b/plugins/channelrx/demoddsc/dscdemod.h @@ -163,10 +163,6 @@ class DSCDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demoddsc/dscdemodgui.cpp b/plugins/channelrx/demoddsc/dscdemodgui.cpp index cbade9cbd7..de9f2deb68 100644 --- a/plugins/channelrx/demoddsc/dscdemodgui.cpp +++ b/plugins/channelrx/demoddsc/dscdemodgui.cpp @@ -493,7 +493,7 @@ void DSCDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void DSCDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index fa88e0248c..b6be07e024 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -297,7 +297,7 @@ void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void DSDDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodendoftrain/endoftraindemod.h b/plugins/channelrx/demodendoftrain/endoftraindemod.h index a3d2944037..88f2b22781 100644 --- a/plugins/channelrx/demodendoftrain/endoftraindemod.h +++ b/plugins/channelrx/demodendoftrain/endoftraindemod.h @@ -137,10 +137,6 @@ class EndOfTrainDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp b/plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp index d94497b102..3d66bc9910 100644 --- a/plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp +++ b/plugins/channelrx/demodendoftrain/endoftraindemodgui.cpp @@ -373,7 +373,7 @@ void EndOfTrainDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void EndOfTrainDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp index 5a738215f4..cd35e06332 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp @@ -201,7 +201,7 @@ void FreeDVDemodGUI::on_spanLog2_valueChanged(int value) void FreeDVDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodft8/ft8demod.h b/plugins/channelrx/demodft8/ft8demod.h index 8b57d2b231..7fe05bb77b 100644 --- a/plugins/channelrx/demodft8/ft8demod.h +++ b/plugins/channelrx/demodft8/ft8demod.h @@ -102,7 +102,7 @@ class FT8Demod : public BasebandSampleSink, public ChannelAPI { } void setDeviceCenterFrequency(qint64 centerFrequency, int index); - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; } double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; } diff --git a/plugins/channelrx/demodft8/ft8demodgui.cpp b/plugins/channelrx/demodft8/ft8demodgui.cpp index 43f762245c..2de0c60e98 100644 --- a/plugins/channelrx/demodft8/ft8demodgui.cpp +++ b/plugins/channelrx/demodft8/ft8demodgui.cpp @@ -542,7 +542,7 @@ void FT8DemodGUI::on_settings_clicked() void FT8DemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodils/ilsdemod.h b/plugins/channelrx/demodils/ilsdemod.h index a636983eb4..911a2d1ab5 100644 --- a/plugins/channelrx/demodils/ilsdemod.h +++ b/plugins/channelrx/demodils/ilsdemod.h @@ -179,10 +179,6 @@ class ILSDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodils/ilsdemodgui.cpp b/plugins/channelrx/demodils/ilsdemodgui.cpp index 4d8baac7c4..a155a41bb8 100644 --- a/plugins/channelrx/demodils/ilsdemodgui.cpp +++ b/plugins/channelrx/demodils/ilsdemodgui.cpp @@ -946,7 +946,7 @@ void ILSDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ILSDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodm17/m17demodgui.cpp b/plugins/channelrx/demodm17/m17demodgui.cpp index 51941bf2a7..88a323d1eb 100644 --- a/plugins/channelrx/demodm17/m17demodgui.cpp +++ b/plugins/channelrx/demodm17/m17demodgui.cpp @@ -349,7 +349,7 @@ void M17DemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void M17DemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodnavtex/navtexdemod.h b/plugins/channelrx/demodnavtex/navtexdemod.h index a9dc61f479..205cfecce4 100644 --- a/plugins/channelrx/demodnavtex/navtexdemod.h +++ b/plugins/channelrx/demodnavtex/navtexdemod.h @@ -183,10 +183,6 @@ class NavtexDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodnavtex/navtexdemodgui.cpp b/plugins/channelrx/demodnavtex/navtexdemodgui.cpp index dbf3d71272..8fbba971b0 100644 --- a/plugins/channelrx/demodnavtex/navtexdemodgui.cpp +++ b/plugins/channelrx/demodnavtex/navtexdemodgui.cpp @@ -450,7 +450,7 @@ void NavtexDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void NavtexDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index 8d15047956..afa0031270 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -135,7 +135,6 @@ class NFMDemod : public BasebandSampleSink, public ChannelAPI { } } - void setMessageQueueToGUI(MessageQueue* queue) override { ChannelAPI::setMessageQueueToGUI(queue); } int getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; } uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index 2a09aa779f..2d832894a1 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -318,7 +318,7 @@ void NFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void NFMDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodpacket/packetdemod.h b/plugins/channelrx/demodpacket/packetdemod.h index 1d0d1238a7..29763cb08c 100644 --- a/plugins/channelrx/demodpacket/packetdemod.h +++ b/plugins/channelrx/demodpacket/packetdemod.h @@ -134,10 +134,6 @@ class PacketDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodpacket/packetdemodgui.cpp b/plugins/channelrx/demodpacket/packetdemodgui.cpp index ce80591766..9c5174f44c 100644 --- a/plugins/channelrx/demodpacket/packetdemodgui.cpp +++ b/plugins/channelrx/demodpacket/packetdemodgui.cpp @@ -372,7 +372,7 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void PacketDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodpager/pagerdemod.h b/plugins/channelrx/demodpager/pagerdemod.h index cae8e7658b..c59bddbb3f 100644 --- a/plugins/channelrx/demodpager/pagerdemod.h +++ b/plugins/channelrx/demodpager/pagerdemod.h @@ -190,10 +190,6 @@ class PagerDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodpager/pagerdemodgui.cpp b/plugins/channelrx/demodpager/pagerdemodgui.cpp index 89dea3efd5..e8186da80d 100644 --- a/plugins/channelrx/demodpager/pagerdemodgui.cpp +++ b/plugins/channelrx/demodpager/pagerdemodgui.cpp @@ -424,7 +424,7 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void PagerDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp b/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp index 4d88bb9c12..ed96214792 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp +++ b/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp @@ -501,7 +501,7 @@ void RadiosondeDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RadiosondeDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodrtty/rttydemod.h b/plugins/channelrx/demodrtty/rttydemod.h index aa0267a0f7..849579baca 100644 --- a/plugins/channelrx/demodrtty/rttydemod.h +++ b/plugins/channelrx/demodrtty/rttydemod.h @@ -177,10 +177,6 @@ class RttyDemod : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/demodrtty/rttydemodgui.cpp b/plugins/channelrx/demodrtty/rttydemodgui.cpp index 29977f38de..baad2448ec 100644 --- a/plugins/channelrx/demodrtty/rttydemodgui.cpp +++ b/plugins/channelrx/demodrtty/rttydemodgui.cpp @@ -358,7 +358,7 @@ void RttyDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RttyDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 49c3aa067a..c2f7e94b72 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -101,7 +101,7 @@ class SSBDemod : public BasebandSampleSink, public ChannelAPI { return m_settings.m_inputFrequencyOffset; } - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; uint32_t getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; } uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; } double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; } diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index a331ffdff2..879022832b 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -299,7 +299,7 @@ void SSBDemodGUI::on_filterIndex_valueChanged(int value) void SSBDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodvor/vordemodgui.cpp b/plugins/channelrx/demodvor/vordemodgui.cpp index e6bbb58415..8ea23389cd 100644 --- a/plugins/channelrx/demodvor/vordemodgui.cpp +++ b/plugins/channelrx/demodvor/vordemodgui.cpp @@ -238,7 +238,7 @@ void VORDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void VORDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodvormc/vordemodmc.h b/plugins/channelrx/demodvormc/vordemodmc.h index 20799a1d4f..febc6c95e9 100644 --- a/plugins/channelrx/demodvormc/vordemodmc.h +++ b/plugins/channelrx/demodvormc/vordemodmc.h @@ -125,7 +125,7 @@ class VORDemodMC : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } - void setMessageQueueToGUI(MessageQueue* queue) override { + void setMessageQueueToGUI(MessageQueue* queue) final { ChannelAPI::setMessageQueueToGUI(queue); m_basebandSink->setMessageQueueToGUI(queue); } diff --git a/plugins/channelrx/demodvormc/vordemodmcgui.cpp b/plugins/channelrx/demodvormc/vordemodmcgui.cpp index 93a126c3f6..a06c812f7e 100644 --- a/plugins/channelrx/demodvormc/vordemodmcgui.cpp +++ b/plugins/channelrx/demodvormc/vordemodmcgui.cpp @@ -1111,7 +1111,7 @@ void VORDemodMCGUI::onWidgetRolled(QWidget* widget, bool rollDown) void VORDemodMCGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.cpp b/plugins/channelrx/demodwfm/wfmdemodgui.cpp index b9e5764112..bae2b95c43 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.cpp +++ b/plugins/channelrx/demodwfm/wfmdemodgui.cpp @@ -180,7 +180,7 @@ void WFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown) void WFMDemodGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/filesink/filesink.h b/plugins/channelrx/filesink/filesink.h index 516bd2d234..16079ce5a5 100644 --- a/plugins/channelrx/filesink/filesink.h +++ b/plugins/channelrx/filesink/filesink.h @@ -148,7 +148,7 @@ class FileSink : public BasebandSampleSink, public ChannelAPI { const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response); - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; void getLocalDevices(std::vector& indexes); uint32_t getNumberOfDeviceStreams() const; SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } diff --git a/plugins/channelrx/filesink/filesinkgui.cpp b/plugins/channelrx/filesink/filesinkgui.cpp index 1b83569f0f..5e686366ac 100644 --- a/plugins/channelrx/filesink/filesinkgui.cpp +++ b/plugins/channelrx/filesink/filesinkgui.cpp @@ -363,7 +363,7 @@ void FileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void FileSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/freqscanner/freqscanner.h b/plugins/channelrx/freqscanner/freqscanner.h index a5ec4ff374..3989b00c72 100644 --- a/plugins/channelrx/freqscanner/freqscanner.h +++ b/plugins/channelrx/freqscanner/freqscanner.h @@ -355,7 +355,7 @@ class FreqScanner : public BasebandSampleSink, public ChannelAPI { const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response); - void setMessageQueueToGUI(MessageQueue* queue) override { + void setMessageQueueToGUI(MessageQueue* queue) final { ChannelAPI::setMessageQueueToGUI(queue); m_basebandSink->setMessageQueueToGUI(queue); } diff --git a/plugins/channelrx/freqscanner/freqscannergui.cpp b/plugins/channelrx/freqscanner/freqscannergui.cpp index fa8287ec01..7aa5ead862 100644 --- a/plugins/channelrx/freqscanner/freqscannergui.cpp +++ b/plugins/channelrx/freqscanner/freqscannergui.cpp @@ -377,7 +377,7 @@ void FreqScannerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void FreqScannerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/freqtracker/freqtrackergui.cpp b/plugins/channelrx/freqtracker/freqtrackergui.cpp index 2bb22702f1..965bc65056 100644 --- a/plugins/channelrx/freqtracker/freqtrackergui.cpp +++ b/plugins/channelrx/freqtracker/freqtrackergui.cpp @@ -264,7 +264,7 @@ void FreqTrackerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void FreqTrackerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/heatmap/heatmap.h b/plugins/channelrx/heatmap/heatmap.h index 91505d224f..34e074f28e 100644 --- a/plugins/channelrx/heatmap/heatmap.h +++ b/plugins/channelrx/heatmap/heatmap.h @@ -143,11 +143,6 @@ class HeatMap : public BasebandSampleSink, public ChannelAPI { m_basebandSink->resetMagLevels(); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ - uint32_t getNumberOfDeviceStreams() const; static const char * const m_channelIdURI; diff --git a/plugins/channelrx/heatmap/heatmapgui.cpp b/plugins/channelrx/heatmap/heatmapgui.cpp index d18b3a9def..6d9fc72138 100644 --- a/plugins/channelrx/heatmap/heatmapgui.cpp +++ b/plugins/channelrx/heatmap/heatmapgui.cpp @@ -483,7 +483,7 @@ void HeatMapGUI::onWidgetRolled(QWidget* widget, bool rollDown) void HeatMapGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/localsink/localsinkgui.cpp b/plugins/channelrx/localsink/localsinkgui.cpp index 002de5ac4d..34a819ba99 100644 --- a/plugins/channelrx/localsink/localsinkgui.cpp +++ b/plugins/channelrx/localsink/localsinkgui.cpp @@ -333,7 +333,7 @@ void LocalSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void LocalSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/noisefigure/noisefiguregui.cpp b/plugins/channelrx/noisefigure/noisefiguregui.cpp index b371b3061e..8f41f7b2a3 100644 --- a/plugins/channelrx/noisefigure/noisefiguregui.cpp +++ b/plugins/channelrx/noisefigure/noisefiguregui.cpp @@ -540,7 +540,7 @@ void NoiseFigureGUI::onWidgetRolled(QWidget* widget, bool rollDown) void NoiseFigureGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/radioastronomy/radioastronomy.h b/plugins/channelrx/radioastronomy/radioastronomy.h index bc1679bac7..db3948ba8c 100644 --- a/plugins/channelrx/radioastronomy/radioastronomy.h +++ b/plugins/channelrx/radioastronomy/radioastronomy.h @@ -442,10 +442,6 @@ class RadioAstronomy : public BasebandSampleSink, public ChannelAPI { void getMagSqLevels(double& avg, double& peak, int& nbSamples) { m_basebandSink->getMagSqLevels(avg, peak, nbSamples); } -/* void setMessageQueueToGUI(MessageQueue* queue) override { - ChannelAPI::setMessageQueueToGUI(queue); - m_basebandSink->setMessageQueueToGUI(queue); - }*/ uint32_t getNumberOfDeviceStreams() const; diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.cpp b/plugins/channelrx/radioastronomy/radioastronomygui.cpp index 185bfd3843..89633ad55a 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomygui.cpp @@ -1940,7 +1940,7 @@ void RadioAstronomyGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RadioAstronomyGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/radioclock/radioclockgui.cpp b/plugins/channelrx/radioclock/radioclockgui.cpp index e1fe6ff590..a21d19e96d 100644 --- a/plugins/channelrx/radioclock/radioclockgui.cpp +++ b/plugins/channelrx/radioclock/radioclockgui.cpp @@ -282,7 +282,7 @@ void RadioClockGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RadioClockGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/remotesink/remotesinkgui.cpp b/plugins/channelrx/remotesink/remotesinkgui.cpp index 259b0929a2..94247a47de 100644 --- a/plugins/channelrx/remotesink/remotesinkgui.cpp +++ b/plugins/channelrx/remotesink/remotesinkgui.cpp @@ -233,7 +233,7 @@ void RemoteSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RemoteSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/remotetcpsink/remotetcpsink.h b/plugins/channelrx/remotetcpsink/remotetcpsink.h index 4b5cf1108e..edb4e9170a 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsink.h +++ b/plugins/channelrx/remotetcpsink/remotetcpsink.h @@ -164,7 +164,7 @@ class RemoteTCPSink : public BasebandSampleSink, public ChannelAPI { uint32_t getNumberOfDeviceStreams() const; int getBasebandSampleRate() const { return m_basebandSampleRate; } - void setMessageQueueToGUI(MessageQueue* queue) override { + void setMessageQueueToGUI(MessageQueue* queue) final { ChannelAPI::setMessageQueueToGUI(queue); m_basebandSink->setMessageQueueToGUI(queue); } diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp index 17c1fde3f7..12d6fe11f1 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp +++ b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp @@ -318,7 +318,7 @@ void RemoteTCPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RemoteTCPSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.h b/plugins/channelrx/sigmffilesink/sigmffilesink.h index 3a5f3e29a8..9a7f5d6781 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.h @@ -148,7 +148,7 @@ class SigMFFileSink : public BasebandSampleSink, public ChannelAPI { const QStringList& channelSettingsKeys, SWGSDRangel::SWGChannelSettings& response); - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; void getLocalDevices(std::vector& indexes); uint32_t getNumberOfDeviceStreams() const; SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp index 4036cbef0d..2604d33a2d 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp @@ -357,7 +357,7 @@ void SigMFFileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void SigMFFileSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/udpsink/udpsinkgui.cpp b/plugins/channelrx/udpsink/udpsinkgui.cpp index fada6d19f4..5cf7d806c8 100644 --- a/plugins/channelrx/udpsink/udpsinkgui.cpp +++ b/plugins/channelrx/udpsink/udpsinkgui.cpp @@ -615,7 +615,7 @@ void UDPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown) void UDPSinkGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channelrx/wdsprx/wdsprx.h b/plugins/channelrx/wdsprx/wdsprx.h index cce0f4910f..cd3c5e44e0 100644 --- a/plugins/channelrx/wdsprx/wdsprx.h +++ b/plugins/channelrx/wdsprx/wdsprx.h @@ -101,7 +101,7 @@ class WDSPRx : public BasebandSampleSink, public ChannelAPI { return m_settings.m_inputFrequencyOffset; } - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; uint32_t getAudioSampleRate() const { return m_running ? m_basebandSink->getAudioSampleRate() : 0; } uint32_t getChannelSampleRate() const { return m_running ? m_basebandSink->getChannelSampleRate() : 0; } double getMagSq() const { return m_running ? m_basebandSink->getMagSq() : 0.0; } diff --git a/plugins/channelrx/wdsprx/wdsprxgui.cpp b/plugins/channelrx/wdsprx/wdsprxgui.cpp index 8f3543c5bc..bb6cd0717d 100644 --- a/plugins/channelrx/wdsprx/wdsprxgui.cpp +++ b/plugins/channelrx/wdsprx/wdsprxgui.cpp @@ -434,7 +434,7 @@ void WDSPRxGUI::on_demod_currentIndexChanged(int index) void WDSPRxGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/filesource/filesource.h b/plugins/channeltx/filesource/filesource.h index bf89c4b69c..515fce43f1 100644 --- a/plugins/channeltx/filesource/filesource.h +++ b/plugins/channeltx/filesource/filesource.h @@ -219,7 +219,7 @@ class FileSource : public BasebandSampleSource, public ChannelAPI { double getMagSq() const; void getMagSqLevels(double& avg, double& peak, int& nbSamples) const; - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; uint32_t getNumberOfDeviceStreams() const; static const char* const m_channelIdURI; diff --git a/plugins/channeltx/filesource/filesourcegui.cpp b/plugins/channeltx/filesource/filesourcegui.cpp index 9d95a09cae..617ca34f6f 100644 --- a/plugins/channeltx/filesource/filesourcegui.cpp +++ b/plugins/channeltx/filesource/filesourcegui.cpp @@ -369,7 +369,7 @@ void FileSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) void FileSourceGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/localsource/localsourcegui.cpp b/plugins/channeltx/localsource/localsourcegui.cpp index 62138d6041..191e3ebec6 100644 --- a/plugins/channeltx/localsource/localsourcegui.cpp +++ b/plugins/channeltx/localsource/localsourcegui.cpp @@ -237,7 +237,7 @@ void LocalSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) void LocalSourceGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp index b9123943c6..7a10b99324 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp @@ -331,7 +331,7 @@ void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void IEEE_802_15_4_ModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modais/aismodgui.cpp b/plugins/channeltx/modais/aismodgui.cpp index d41a09f860..8e2a56dfa2 100644 --- a/plugins/channeltx/modais/aismodgui.cpp +++ b/plugins/channeltx/modais/aismodgui.cpp @@ -353,7 +353,7 @@ void AISModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void AISModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index ee02347bde..a0d5b80227 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -296,7 +296,7 @@ void AMModGUI::onWidgetRolled(const QWidget* widget, bool rollDown) void AMModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index bc77a82fc6..164b8a0104 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -309,7 +309,7 @@ class ATVMod : public BasebandSampleSource, public ChannelAPI { void setLevelMeter(QObject *levelMeter); int getEffectiveSampleRate() const; void getCameraNumbers(std::vector& numbers); - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; static const char* const m_channelIdURI; static const char* const m_channelId; diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index 0c0968950a..409b2e7c67 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -702,7 +702,7 @@ void ATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ATVModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp b/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp index f177e2bb53..deb422120d 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp @@ -370,7 +370,7 @@ void ChirpChatModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void ChirpChatModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/moddatv/datvmod.h b/plugins/channeltx/moddatv/datvmod.h index bb259141ab..5d8f49aff9 100644 --- a/plugins/channeltx/moddatv/datvmod.h +++ b/plugins/channeltx/moddatv/datvmod.h @@ -262,7 +262,7 @@ class DATVMod : public BasebandSampleSource, public ChannelAPI { uint32_t getNumberOfDeviceStreams() const; double getMagSq() const; int getEffectiveSampleRate() const; - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; static const char* const m_channelIdURI; static const char* const m_channelId; diff --git a/plugins/channeltx/moddatv/datvmodgui.cpp b/plugins/channeltx/moddatv/datvmodgui.cpp index 035be57a9a..8478945f77 100644 --- a/plugins/channeltx/moddatv/datvmodgui.cpp +++ b/plugins/channeltx/moddatv/datvmodgui.cpp @@ -497,7 +497,7 @@ void DATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void DATVModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modfreedv/freedvmodgui.cpp b/plugins/channeltx/modfreedv/freedvmodgui.cpp index 5d289d51b0..c63a5c802a 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.cpp +++ b/plugins/channeltx/modfreedv/freedvmodgui.cpp @@ -306,7 +306,7 @@ void FreeDVModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void FreeDVModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modm17/m17modgui.cpp b/plugins/channeltx/modm17/m17modgui.cpp index c06b59c2cf..3913603da5 100644 --- a/plugins/channeltx/modm17/m17modgui.cpp +++ b/plugins/channeltx/modm17/m17modgui.cpp @@ -402,7 +402,7 @@ void M17ModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void M17ModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index c3b51aff0e..180a5e04eb 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -384,7 +384,7 @@ void NFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void NFMModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modpacket/packetmodgui.cpp b/plugins/channeltx/modpacket/packetmodgui.cpp index 15fbc27d39..8c281ac592 100644 --- a/plugins/channeltx/modpacket/packetmodgui.cpp +++ b/plugins/channeltx/modpacket/packetmodgui.cpp @@ -399,7 +399,7 @@ void PacketModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void PacketModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modpsk31/psk31mod.h b/plugins/channeltx/modpsk31/psk31mod.h index 4b217ab880..b1c569bf41 100644 --- a/plugins/channeltx/modpsk31/psk31mod.h +++ b/plugins/channeltx/modpsk31/psk31mod.h @@ -194,7 +194,7 @@ class PSK31 : public BasebandSampleSource, public ChannelAPI { void setLevelMeter(QObject *levelMeter); uint32_t getNumberOfDeviceStreams() const; int getSourceChannelSampleRate() const; - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; static const char* const m_channelIdURI; static const char* const m_channelId; diff --git a/plugins/channeltx/modpsk31/psk31modgui.cpp b/plugins/channeltx/modpsk31/psk31modgui.cpp index 92c9d1f0dc..1bc3956f89 100644 --- a/plugins/channeltx/modpsk31/psk31modgui.cpp +++ b/plugins/channeltx/modpsk31/psk31modgui.cpp @@ -283,7 +283,7 @@ void PSK31GUI::onWidgetRolled(QWidget* widget, bool rollDown) void PSK31GUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modrtty/rttymod.h b/plugins/channeltx/modrtty/rttymod.h index ea332c6786..32353e666b 100644 --- a/plugins/channeltx/modrtty/rttymod.h +++ b/plugins/channeltx/modrtty/rttymod.h @@ -194,7 +194,7 @@ class RttyMod : public BasebandSampleSource, public ChannelAPI { void setLevelMeter(QObject *levelMeter); uint32_t getNumberOfDeviceStreams() const; int getSourceChannelSampleRate() const; - void setMessageQueueToGUI(MessageQueue* queue) override; + void setMessageQueueToGUI(MessageQueue* queue) final; static const char* const m_channelIdURI; static const char* const m_channelId; diff --git a/plugins/channeltx/modrtty/rttymodgui.cpp b/plugins/channeltx/modrtty/rttymodgui.cpp index eeaa0ee436..da26dfc283 100644 --- a/plugins/channeltx/modrtty/rttymodgui.cpp +++ b/plugins/channeltx/modrtty/rttymodgui.cpp @@ -362,7 +362,7 @@ void RttyModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RttyModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index d0f9e59468..c24e9615dc 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -371,7 +371,7 @@ void SSBModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void SSBModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index 1fcb1eb585..8697e1841d 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -300,7 +300,7 @@ void WFMModGUI::onWidgetRolled(QWidget* widget, bool rollDown) void WFMModGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/remotesource/remotesourcegui.cpp b/plugins/channeltx/remotesource/remotesourcegui.cpp index f53676bdd3..d60712bee3 100644 --- a/plugins/channeltx/remotesource/remotesourcegui.cpp +++ b/plugins/channeltx/remotesource/remotesourcegui.cpp @@ -310,7 +310,7 @@ void RemoteSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/channeltx/udpsource/udpsourcegui.cpp b/plugins/channeltx/udpsource/udpsourcegui.cpp index b93a0c6876..53830689d6 100644 --- a/plugins/channeltx/udpsource/udpsourcegui.cpp +++ b/plugins/channeltx/udpsource/udpsourcegui.cpp @@ -495,7 +495,7 @@ void UDPSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) void UDPSourceGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); diff --git a/plugins/feature/afc/afcgui.cpp b/plugins/feature/afc/afcgui.cpp index e855d605cb..bff9d14f9b 100644 --- a/plugins/feature/afc/afcgui.cpp +++ b/plugins/feature/afc/afcgui.cpp @@ -278,7 +278,7 @@ void AFCGUI::updateDeviceSetLists(const AFC::MsgDeviceSetListsReport& report) void AFCGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/ais/aisgui.cpp b/plugins/feature/ais/aisgui.cpp index d240c23557..e8514a27bb 100644 --- a/plugins/feature/ais/aisgui.cpp +++ b/plugins/feature/ais/aisgui.cpp @@ -296,7 +296,7 @@ void AISGUI::displaySettings() void AISGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/ambe/ambegui.cpp b/plugins/feature/ambe/ambegui.cpp index b7f306eafe..f0decea86e 100644 --- a/plugins/feature/ambe/ambegui.cpp +++ b/plugins/feature/ambe/ambegui.cpp @@ -115,7 +115,7 @@ void AMBEGUI::onWidgetRolled(QWidget* widget, bool rollDown) void AMBEGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/antennatools/antennatoolsgui.cpp b/plugins/feature/antennatools/antennatoolsgui.cpp index 0266590d7d..3f385c28fc 100644 --- a/plugins/feature/antennatools/antennatoolsgui.cpp +++ b/plugins/feature/antennatools/antennatoolsgui.cpp @@ -212,7 +212,7 @@ void AntennaToolsGUI::makeUIConnections() void AntennaToolsGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/aprs/aprsgui.cpp b/plugins/feature/aprs/aprsgui.cpp index 4265813736..697db8b662 100644 --- a/plugins/feature/aprs/aprsgui.cpp +++ b/plugins/feature/aprs/aprsgui.cpp @@ -723,7 +723,7 @@ void APRSGUI::resizeEvent(QResizeEvent* event) void APRSGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/demodanalyzer/demodanalyzergui.cpp b/plugins/feature/demodanalyzer/demodanalyzergui.cpp index bd6cc65be4..fec29c1b28 100644 --- a/plugins/feature/demodanalyzer/demodanalyzergui.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzergui.cpp @@ -263,7 +263,7 @@ void DemodAnalyzerGUI::updateChannelList() void DemodAnalyzerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/gs232controller/gs232controllergui.cpp b/plugins/feature/gs232controller/gs232controllergui.cpp index 5b8c544be6..460a8279b1 100644 --- a/plugins/feature/gs232controller/gs232controllergui.cpp +++ b/plugins/feature/gs232controller/gs232controllergui.cpp @@ -586,7 +586,7 @@ void GS232ControllerGUI::updatePipeList(const AvailableChannelOrFeatureList& sou void GS232ControllerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp b/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp index 2f1e395f54..db96ff89a3 100644 --- a/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp +++ b/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp @@ -247,7 +247,7 @@ void JogdialControllerGUI::updateChannelList() void JogdialControllerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/limerfe/limerfegui.cpp b/plugins/feature/limerfe/limerfegui.cpp index 2dcab36cc7..f18bc309ad 100644 --- a/plugins/feature/limerfe/limerfegui.cpp +++ b/plugins/feature/limerfe/limerfegui.cpp @@ -86,7 +86,7 @@ void LimeRFEGUI::onWidgetRolled(QWidget* widget, bool rollDown) void LimeRFEGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index 8714b48846..91b155e088 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -1957,7 +1957,7 @@ void MapGUI::displaySettings() void MapGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/morsedecoder/morsedecodergui.cpp b/plugins/feature/morsedecoder/morsedecodergui.cpp index 500a129b22..1a28149fcb 100644 --- a/plugins/feature/morsedecoder/morsedecodergui.cpp +++ b/plugins/feature/morsedecoder/morsedecodergui.cpp @@ -285,7 +285,7 @@ void MorseDecoderGUI::updateChannelList() void MorseDecoderGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/pertester/pertestergui.cpp b/plugins/feature/pertester/pertestergui.cpp index 0acfc50e05..268f05c2a2 100644 --- a/plugins/feature/pertester/pertestergui.cpp +++ b/plugins/feature/pertester/pertestergui.cpp @@ -200,7 +200,7 @@ void PERTesterGUI::displaySettings() void PERTesterGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/radiosonde/radiosondegui.cpp b/plugins/feature/radiosonde/radiosondegui.cpp index c8c1169a42..066448855e 100644 --- a/plugins/feature/radiosonde/radiosondegui.cpp +++ b/plugins/feature/radiosonde/radiosondegui.cpp @@ -265,7 +265,7 @@ void RadiosondeGUI::displaySettings() void RadiosondeGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/remotecontrol/remotecontrolgui.cpp b/plugins/feature/remotecontrol/remotecontrolgui.cpp index 5b2fa27f9c..5dc74b48c5 100644 --- a/plugins/feature/remotecontrol/remotecontrolgui.cpp +++ b/plugins/feature/remotecontrol/remotecontrolgui.cpp @@ -191,7 +191,7 @@ void RemoteControlGUI::displaySettings() void RemoteControlGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/rigctlserver/rigctlservergui.cpp b/plugins/feature/rigctlserver/rigctlservergui.cpp index f4056cdace..6c311c1b46 100644 --- a/plugins/feature/rigctlserver/rigctlservergui.cpp +++ b/plugins/feature/rigctlserver/rigctlservergui.cpp @@ -288,7 +288,7 @@ bool RigCtlServerGUI::updateChannelList() void RigCtlServerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/satellitetracker/satellitetrackergui.cpp b/plugins/feature/satellitetracker/satellitetrackergui.cpp index 34d02bdf46..8f3c70df71 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.cpp +++ b/plugins/feature/satellitetracker/satellitetrackergui.cpp @@ -397,7 +397,7 @@ void SatelliteTrackerGUI::displaySettings() void SatelliteTrackerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/sid/sidgui.cpp b/plugins/feature/sid/sidgui.cpp index 6c7c0d581f..f6fb0637ca 100644 --- a/plugins/feature/sid/sidgui.cpp +++ b/plugins/feature/sid/sidgui.cpp @@ -415,7 +415,7 @@ void SIDGUI::setAutosaveTimer() void SIDGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/simpleptt/simplepttgui.cpp b/plugins/feature/simpleptt/simplepttgui.cpp index c5ada8a9a5..89e96c944d 100644 --- a/plugins/feature/simpleptt/simplepttgui.cpp +++ b/plugins/feature/simpleptt/simplepttgui.cpp @@ -365,7 +365,7 @@ void SimplePTTGUI::updateDeviceSetLists() void SimplePTTGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/skymap/skymapgui.cpp b/plugins/feature/skymap/skymapgui.cpp index f81472316d..f2caef05d4 100644 --- a/plugins/feature/skymap/skymapgui.cpp +++ b/plugins/feature/skymap/skymapgui.cpp @@ -426,7 +426,7 @@ void SkyMapGUI::displaySettings() void SkyMapGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); @@ -1110,4 +1110,4 @@ void SkyMapGUI::handlePipeMessageQueue(MessageQueue* messageQueue) delete message; } } -} \ No newline at end of file +} diff --git a/plugins/feature/startracker/startrackergui.cpp b/plugins/feature/startracker/startrackergui.cpp index da419dfb27..87639ab65d 100644 --- a/plugins/feature/startracker/startrackergui.cpp +++ b/plugins/feature/startracker/startrackergui.cpp @@ -565,7 +565,7 @@ void StarTrackerGUI::displaySettings() void StarTrackerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/feature/vorlocalizer/vorlocalizergui.cpp b/plugins/feature/vorlocalizer/vorlocalizergui.cpp index a1b20aa99f..17734a04ae 100644 --- a/plugins/feature/vorlocalizer/vorlocalizergui.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizergui.cpp @@ -988,7 +988,7 @@ void VORLocalizerGUI::onWidgetRolled(QWidget* widget, bool rollDown) void VORLocalizerGUI::onMenuDialogCalled(const QPoint &p) { - if (m_contextMenuType == ContextMenuChannelSettings) + if (m_contextMenuType == ContextMenuType::ContextMenuChannelSettings) { BasicFeatureSettingsDialog dialog(this); dialog.setTitle(m_settings.m_title); diff --git a/plugins/samplesink/remoteoutput/remoteoutput.cpp b/plugins/samplesink/remoteoutput/remoteoutput.cpp index cbd20ca606..f3eeba7f63 100644 --- a/plugins/samplesink/remoteoutput/remoteoutput.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutput.cpp @@ -47,21 +47,8 @@ MESSAGE_CLASS_DEFINITION(RemoteOutput::MsgRequestFixedData, Message) RemoteOutput::RemoteOutput(DeviceAPI *deviceAPI) : m_deviceAPI(deviceAPI), - m_running(false), m_settings(), - m_centerFrequency(435000000), - m_sampleRate(48000), - m_remoteOutputWorker(nullptr), - m_deviceDescription("RemoteOutput"), - m_startingTimeStamp(0), - m_masterTimer(deviceAPI->getMasterTimer()), - m_tickCount(0), - m_greaterTickCount(0), - m_tickMultiplier(1), - m_queueLength(0), - m_queueSize(0), - m_recoverableCount(0), - m_unrecoverableCount(0) + m_masterTimer(deviceAPI->getMasterTimer()) { m_deviceAPI->setNbSinkStreams(1); m_networkManager = new QNetworkAccessManager(); diff --git a/plugins/samplesink/remoteoutput/remoteoutput.h b/plugins/samplesink/remoteoutput/remoteoutput.h index 825215d27d..544be03812 100644 --- a/plugins/samplesink/remoteoutput/remoteoutput.h +++ b/plugins/samplesink/remoteoutput/remoteoutput.h @@ -259,22 +259,22 @@ class RemoteOutput : public DeviceSampleSink { private: DeviceAPI *m_deviceAPI; QRecursiveMutex m_mutex; - bool m_running; + bool m_running = false; RemoteOutputSettings m_settings; - uint64_t m_centerFrequency; - int m_sampleRate; - RemoteOutputWorker* m_remoteOutputWorker; + uint64_t m_centerFrequency = 435000000; + int m_sampleRate = 48000; + RemoteOutputWorker* m_remoteOutputWorker = nullptr; QThread m_remoteOutputWorkerThread; - QString m_deviceDescription; - std::time_t m_startingTimeStamp; + QString m_deviceDescription = "RemoteOutput"; + std::time_t m_startingTimeStamp = 0; const QTimer& m_masterTimer; - uint32_t m_tickCount; // for 50 ms timer - uint32_t m_greaterTickCount; // for 1 s derived timer - uint32_t m_tickMultiplier; // for greater tick count - int m_queueLength; - int m_queueSize; - int m_recoverableCount; - int m_unrecoverableCount; + uint32_t m_tickCount = 0; // for 50 ms timer + uint32_t m_greaterTickCount = 0; // for 1 s derived timer + uint32_t m_tickMultiplier = 1; // for greater tick count + int m_queueLength = 0; + int m_queueSize = 0; + int m_recoverableCount = 0; + int m_unrecoverableCount = 0; QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; diff --git a/plugins/samplesource/sigmffileinput/sigmffileinput.cpp b/plugins/samplesource/sigmffileinput/sigmffileinput.cpp index 54fcd8f3a1..692eda9081 100644 --- a/plugins/samplesource/sigmffileinput/sigmffileinput.cpp +++ b/plugins/samplesource/sigmffileinput/sigmffileinput.cpp @@ -61,8 +61,7 @@ MESSAGE_CLASS_DEFINITION(SigMFFileInput::MsgReportTotalSamplesCheck, Message) SigMFFileInput::SigMFFileInput(DeviceAPI *deviceAPI) : m_deviceAPI(deviceAPI), - m_settings(), - m_deviceDescription("SigMFFileInput") + m_settings() { m_sampleFifo.setLabel(m_deviceDescription); m_deviceAPI->setNbSourceStreams(1); diff --git a/plugins/samplesource/sigmffileinput/sigmffileinput.h b/plugins/samplesource/sigmffileinput/sigmffileinput.h index 872db9e85f..820521f32b 100644 --- a/plugins/samplesource/sigmffileinput/sigmffileinput.h +++ b/plugins/samplesource/sigmffileinput/sigmffileinput.h @@ -462,7 +462,7 @@ class SigMFFileInput : public DeviceSampleSource { QString m_recordSummary; SigMFFileInputWorker* m_fileInputWorker = nullptr; QThread m_fileInputWorkerThread; - QString m_deviceDescription; + QString m_deviceDescription = "SigMFFileInput"; int m_sampleRate = 48000; unsigned int m_sampleBytes = 1; quint64 m_centerFrequency = 0; diff --git a/sdrbase/channel/channelapi.cpp b/sdrbase/channel/channelapi.cpp index 8141ddc4e2..49eda04d0f 100644 --- a/sdrbase/channel/channelapi.cpp +++ b/sdrbase/channel/channelapi.cpp @@ -21,6 +21,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include "util/uid.h" +#include "util/message.h" #include "channelapi.h" ChannelAPI::ChannelAPI(const QString& uri, StreamType streamType) : @@ -39,7 +40,7 @@ void ChannelAPI::handleInputMessages() { Message* message; - while ((message = m_inputMessageQueue.pop()) != 0) + while ((message = m_inputMessageQueue.pop()) != nullptr) { if (handleMessage(*message)) { delete message; diff --git a/sdrbase/channel/channelapi.h b/sdrbase/channel/channelapi.h index 10c7a940cb..9be8900766 100644 --- a/sdrbase/channel/channelapi.h +++ b/sdrbase/channel/channelapi.h @@ -55,7 +55,7 @@ class SDRBASE_API ChannelAPI : public QObject { }; ChannelAPI(const QString& name, StreamType streamType); - virtual ~ChannelAPI() {} + ~ChannelAPI() override = default; virtual void destroy() = 0; virtual void setDeviceAPI(DeviceAPI*) = 0; virtual DeviceAPI *getDeviceAPI() = 0; diff --git a/sdrbase/dsp/devicesamplemimo.cpp b/sdrbase/dsp/devicesamplemimo.cpp index ec29c1608f..c3de8162bb 100644 --- a/sdrbase/dsp/devicesamplemimo.cpp +++ b/sdrbase/dsp/devicesamplemimo.cpp @@ -20,20 +20,18 @@ #include "devicesamplemimo.h" DeviceSampleMIMO::DeviceSampleMIMO() : - m_guiMessageQueue(0) + m_guiMessageQueue(nullptr) { connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); } -DeviceSampleMIMO::~DeviceSampleMIMO() -{ -} +DeviceSampleMIMO::~DeviceSampleMIMO() = default; void DeviceSampleMIMO::handleInputMessages() { Message* message; - while ((message = m_inputMessageQueue.pop()) != 0) + while ((message = m_inputMessageQueue.pop()) != nullptr) { if (handleMessage(*message)) { diff --git a/sdrgui/channel/channelgui.cpp b/sdrgui/channel/channelgui.cpp index 556857fadb..af5ab62531 100644 --- a/sdrgui/channel/channelgui.cpp +++ b/sdrgui/channel/channelgui.cpp @@ -41,11 +41,11 @@ ChannelGUI::ChannelGUI(QWidget *parent) : QMdiSubWindow(parent), - m_deviceType(DeviceRx), + m_resizer(this), + m_contextMenuType(ContextMenuType::ContextMenuNone), + m_deviceType(DeviceType::DeviceRx), m_deviceSetIndex(0), m_channelIndex(0), - m_contextMenuType(ContextMenuNone), - m_resizer(this), m_drag(false), m_disableResize(false), m_mdi(nullptr) @@ -125,9 +125,6 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_moveToDeviceButton->setToolTip("Move to another device"); m_statusFrequency = new QLabel(); - // QFont font = m_statusFrequency->font(); - // font.setPointSize(8); - // m_statusFrequency->setFont(font); m_statusFrequency->setAlignment(Qt::AlignRight |Qt::AlignVCenter); m_statusFrequency->setFixedHeight(20); m_statusFrequency->setFixedWidth(90); @@ -136,7 +133,6 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_statusFrequency->setToolTip("Channel absolute frequency (Hz)"); m_statusLabel = new QLabel(); - // m_statusLabel->setText("OK"); // for future use m_statusLabel->setFixedHeight(20); m_statusLabel->setMinimumWidth(20); m_statusLabel->setContentsMargins(10, 0, 0, 0); // Add space between statusFrequency and statusLabel @@ -152,7 +148,6 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_topLayout->addWidget(m_indexLabel); m_topLayout->addWidget(m_settingsButton); m_topLayout->addWidget(m_titleLabel); - // m_topLayout->addStretch(1); m_topLayout->addWidget(m_helpButton); m_topLayout->addWidget(m_moveButton); m_topLayout->addWidget(m_shrinkButton); @@ -174,7 +169,6 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_sizeGripBottomRight = new QSizeGrip(this); m_sizeGripBottomRight->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_sizeGripBottomRight->setFixedHeight(20); - // m_bottomLayout->addStretch(1); m_bottomLayout->addWidget(m_sizeGripBottomRight, 0, Qt::AlignBottom | Qt::AlignRight); m_layouts->addLayout(m_topLayout); @@ -275,11 +269,11 @@ void ChannelGUI::leaveEvent(QEvent* event) void ChannelGUI::activateSettingsDialog() { QPoint p = QCursor::pos(); - m_contextMenuType = ContextMenuChannelSettings; + m_contextMenuType = ContextMenuType::ContextMenuChannelSettings; emit customContextMenuRequested(p); } -void ChannelGUI::showHelp() +void ChannelGUI::showHelp() const { if (m_helpURL.isEmpty()) { return; @@ -322,13 +316,11 @@ void ChannelGUI::onWidgetRolled(QWidget *widget, bool show) { if (show) { - // qDebug("ChannelGUI::onWidgetRolled: show: %d %d", m_rollupContents.height(), widget->height()); int dh = m_heightsMap.contains(widget) ? m_heightsMap[widget] - widget->height() : widget->minimumHeight(); resize(width(), 52 + 3 + m_rollupContents->height() + dh); } else { - // qDebug("ChannelGUI::onWidgetRolled: hide: %d %d", m_rollupContents.height(), widget->height()); m_heightsMap[widget] = widget->height(); resize(width(), 52 + 3 + m_rollupContents->height()); } @@ -517,7 +509,7 @@ void ChannelGUI::setStatusText(const QString& text) void ChannelGUI::updateIndexLabel() { - if ((m_deviceType == DeviceMIMO) && (getStreamIndex() >= 0)) { + if ((m_deviceType == DeviceType::DeviceMIMO) && (getStreamIndex() >= 0)) { m_indexLabel->setText(tr("%1%2:%3.%4").arg(getDeviceTypeTag()).arg(m_deviceSetIndex).arg(m_channelIndex).arg(getStreamIndex())); } else { @@ -525,7 +517,7 @@ void ChannelGUI::updateIndexLabel() } } -bool ChannelGUI::isOnMovingPad() +bool ChannelGUI::isOnMovingPad() const { return m_indexLabel->underMouse() || m_titleLabel->underMouse() || m_statusFrequency->underMouse() || m_statusLabel->underMouse(); } @@ -537,15 +529,15 @@ void ChannelGUI::setHighlighted(bool highlighted) .arg(palette().dark().color().darker(115).name()))); } -QString ChannelGUI::getDeviceTypeTag() +QString ChannelGUI::getDeviceTypeTag() const { switch (m_deviceType) { - case DeviceRx: + case DeviceType::DeviceRx: return "R"; - case DeviceTx: + case DeviceType::DeviceTx: return "T"; - case DeviceMIMO: + case DeviceType::DeviceMIMO: return "M"; default: return "X"; @@ -554,6 +546,6 @@ QString ChannelGUI::getDeviceTypeTag() QColor ChannelGUI::getTitleColor(const QColor& backgroundColor) { - float l = 0.2126*backgroundColor.redF() + 0.7152*backgroundColor.greenF() + 0.0722*backgroundColor.blueF(); - return l < 0.5f ? Qt::white : Qt::black; + double l = 0.2126*backgroundColor.redF() + 0.7152*backgroundColor.greenF() + 0.0722*backgroundColor.blueF(); + return l < 0.5 ? Qt::white : Qt::black; } diff --git a/sdrgui/channel/channelgui.h b/sdrgui/channel/channelgui.h index 0371332621..135f00b079 100644 --- a/sdrgui/channel/channelgui.h +++ b/sdrgui/channel/channelgui.h @@ -43,14 +43,14 @@ class SDRGUI_API ChannelGUI : public QMdiSubWindow, public SerializableInterface { Q_OBJECT public: - enum DeviceType + enum class DeviceType { DeviceRx, DeviceTx, DeviceMIMO }; - enum ContextMenuType + enum class ContextMenuType { ContextMenuNone, ContextMenuChannelSettings @@ -91,35 +91,36 @@ class SDRGUI_API ChannelGUI : public QMdiSubWindow, public SerializableInterface void setStatusText(const QString& text); protected: + FramelessWindowResizer m_resizer; + ContextMenuType m_contextMenuType; + QString m_helpURL; + QString m_displayedName; + void closeEvent(QCloseEvent *event) override; void leaveEvent(QEvent *event) override; void mousePressEvent(QMouseEvent* event) override; void mouseReleaseEvent(QMouseEvent* event) override; void mouseMoveEvent(QMouseEvent* event) override; - void resetContextMenuType() { m_contextMenuType = ContextMenuNone; } + void resetContextMenuType() { m_contextMenuType = ContextMenuType::ContextMenuNone; } void updateIndexLabel(); int getAdditionalHeight() const { return 22 + 22; } // height of top and bottom bars void setHighlighted(bool highlighted); - int gripSize() { return m_resizer.m_gripSize; } // size in pixels of resize grip around the window - - DeviceType m_deviceType; - int m_deviceSetIndex; - int m_channelIndex; - QString m_helpURL; - RollupContents* m_rollupContents; - ContextMenuType m_contextMenuType; - QString m_displayedName; - FramelessWindowResizer m_resizer; + int gripSize() const { return m_resizer.m_gripSize; } // size in pixels of resize grip around the window protected slots: void shrinkWindow(); void maximizeWindow(); private: - bool isOnMovingPad(); - QString getDeviceTypeTag(); + bool isOnMovingPad() const; + QString getDeviceTypeTag() const; static QColor getTitleColor(const QColor& backgroundColor); + DeviceType m_deviceType; + int m_deviceSetIndex; + int m_channelIndex; + RollupContents* m_rollupContents; + QLabel *m_indexLabel; QPushButton *m_settingsButton; QLabel *m_titleLabel; @@ -146,7 +147,7 @@ protected slots: private slots: void activateSettingsDialog(); - void showHelp(); + void showHelp() const; void openMoveToWorkspaceDialog(); void onWidgetRolled(QWidget *widget, bool show); void duplicateChannel(); diff --git a/sdrgui/device/deviceuiset.cpp b/sdrgui/device/deviceuiset.cpp index b5a12705a6..85f1541ca3 100644 --- a/sdrgui/device/deviceuiset.cpp +++ b/sdrgui/device/deviceuiset.cpp @@ -383,7 +383,7 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA MDIUtils::restoreMDIGeometry(rxChannelGUI, rxChannelGUI->getGeometryBytes()); rxChannelGUI->getRollupContents()->arrangeRollups(); - rxChannelGUI->setDeviceType(ChannelGUI::DeviceRx); + rxChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceRx); rxChannelGUI->setDeviceSetIndex(m_deviceSetIndex); rxChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); rxChannelGUI->setIndexToolTip(m_deviceAPI->getSamplingDeviceDisplayName()); @@ -511,7 +511,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA MDIUtils::restoreMDIGeometry(txChannelGUI, txChannelGUI->getGeometryBytes()); txChannelGUI->getRollupContents()->arrangeRollups(); - txChannelGUI->setDeviceType(ChannelGUI::DeviceTx); + txChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceTx); txChannelGUI->setDeviceSetIndex(m_deviceSetIndex); txChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); txChannelGUI->setIndexToolTip(m_deviceAPI->getSamplingDeviceDisplayName()); @@ -685,7 +685,7 @@ void DeviceUISet::loadMIMOChannelSettings(const Preset *preset, PluginAPI *plugi MDIUtils::restoreMDIGeometry(channelGUI, channelGUI->getGeometryBytes()); channelGUI->getRollupContents()->arrangeRollups(); - channelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + channelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceMIMO); channelGUI->setDeviceSetIndex(m_deviceSetIndex); channelGUI->setIndex(channelAPI->getIndexInDeviceSet()); channelGUI->setIndexToolTip(m_deviceAPI->getSamplingDeviceDisplayName()); diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 570eb51be4..a417a82eb9 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -2528,12 +2528,12 @@ void MainWindow::channelDuplicateToDeviceSet(const ChannelGUI *sourceChannelGUI, if (pluginInterface) { - ChannelAPI *channelAPI = nullptr; + ChannelAPI *channelAPI; BasebandSampleSink *rxChannel = nullptr; pluginInterface->createRxChannel(destDeviceUI->m_deviceAPI, &rxChannel, &channelAPI); destChannelGUI = pluginInterface->createRxChannelGUI(destDeviceUI, rxChannel); destDeviceUI->registerRxChannelInstance(channelAPI, destChannelGUI); - destChannelGUI->setDeviceType(ChannelGUI::DeviceRx); + destChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceRx); destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); destChannelGUI->deserialize(b); @@ -2560,7 +2560,7 @@ void MainWindow::channelDuplicateToDeviceSet(const ChannelGUI *sourceChannelGUI, pluginInterface->createTxChannel(destDeviceUI->m_deviceAPI, &txChannel, &channelAPI); destChannelGUI = pluginInterface->createTxChannelGUI(destDeviceUI, txChannel); destDeviceUI->registerTxChannelInstance(channelAPI, destChannelGUI); - destChannelGUI->setDeviceType(ChannelGUI::DeviceTx); + destChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceTx); destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); destChannelGUI->deserialize(b); @@ -2589,7 +2589,7 @@ void MainWindow::channelDuplicateToDeviceSet(const ChannelGUI *sourceChannelGUI, pluginInterface->createRxChannel(destDeviceUI->m_deviceAPI, &rxChannel, &channelAPI); destChannelGUI = pluginInterface->createRxChannelGUI(destDeviceUI, rxChannel); destDeviceUI->registerRxChannelInstance(channelAPI, destChannelGUI); - destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceMIMO); destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); destChannelGUI->deserialize(b); @@ -2612,7 +2612,7 @@ void MainWindow::channelDuplicateToDeviceSet(const ChannelGUI *sourceChannelGUI, pluginInterface->createTxChannel(destDeviceUI->m_deviceAPI, &txChannel, &channelAPI); destChannelGUI = pluginInterface->createTxChannelGUI(destDeviceUI, txChannel); destDeviceUI->registerTxChannelInstance(channelAPI, destChannelGUI); - destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceMIMO); destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); destChannelGUI->deserialize(b); @@ -2635,7 +2635,7 @@ void MainWindow::channelDuplicateToDeviceSet(const ChannelGUI *sourceChannelGUI, pluginInterface->createMIMOChannel(destDeviceUI->m_deviceAPI, &mimoChannel, &channelAPI); destChannelGUI = pluginInterface->createMIMOChannelGUI(destDeviceUI, mimoChannel); destDeviceUI->registerChannelInstance(channelAPI, destChannelGUI); - destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setDeviceType(ChannelGUI::DeviceType::DeviceMIMO); destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); destChannelGUI->deserialize(b); @@ -2696,7 +2696,7 @@ void MainWindow::channelAddClicked(Workspace *workspace, int deviceSetIndex, int pluginInterface->createRxChannel(deviceUI->m_deviceAPI, &rxChannel, &channelAPI); gui = pluginInterface->createRxChannelGUI(deviceUI, rxChannel); deviceUI->registerRxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceRx); + gui->setDeviceType(ChannelGUI::DeviceType::DeviceRx); gui->setIndex(channelAPI->getIndexInDeviceSet()); gui->setDisplayedame(pluginInterface->getPluginDescriptor().displayedName); } @@ -2708,7 +2708,7 @@ void MainWindow::channelAddClicked(Workspace *workspace, int deviceSetIndex, int pluginInterface->createTxChannel(deviceUI->m_deviceAPI, &txChannel, &channelAPI); gui = pluginInterface->createTxChannelGUI(deviceUI, txChannel); deviceUI->registerTxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceTx); + gui->setDeviceType(ChannelGUI::DeviceType::DeviceTx); gui->setIndex(channelAPI->getIndexInDeviceSet()); gui->setDisplayedame(pluginInterface->getPluginDescriptor().displayedName); } @@ -2758,7 +2758,7 @@ void MainWindow::channelAddClicked(Workspace *workspace, int deviceSetIndex, int return; } - gui->setDeviceType(ChannelGUI::DeviceMIMO); + gui->setDeviceType(ChannelGUI::DeviceType::DeviceMIMO); } else {