diff --git a/doc/img/exit_round.xcf b/doc/img/exit_round.xcf new file mode 100644 index 000000000..46ddba6e9 Binary files /dev/null and b/doc/img/exit_round.xcf differ diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp index cd21f50b5..97b7e8074 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp @@ -80,6 +80,18 @@ BeamSteeringCWMod::~BeamSteeringCWMod() delete m_thread; } +void BeamSteeringCWMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeMIMOChannel(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addMIMOChannel(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void BeamSteeringCWMod::startSources() { qDebug("BeamSteeringCWMod::startSources"); diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h index 04f56beeb..0d50058a3 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h @@ -88,8 +88,10 @@ public: 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 startSinks() {} virtual void stopSinks() {} virtual void startSources(); //!< thread start() virtual void stopSources(); //!< thread exit() and wait() diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h index 4c88cdd67..093b9f245 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h @@ -56,6 +56,7 @@ public: 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; } private: Ui::BeamSteeringCWModGUI* ui; diff --git a/plugins/channelmimo/interferometer/interferometer.cpp b/plugins/channelmimo/interferometer/interferometer.cpp index 17e06f543..47afd801d 100644 --- a/plugins/channelmimo/interferometer/interferometer.cpp +++ b/plugins/channelmimo/interferometer/interferometer.cpp @@ -82,6 +82,18 @@ Interferometer::~Interferometer() delete m_thread; } +void Interferometer::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeMIMOChannel(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addMIMOChannel(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void Interferometer::startSinks() { if (m_deviceSampleRate != 0) { diff --git a/plugins/channelmimo/interferometer/interferometer.h b/plugins/channelmimo/interferometer/interferometer.h index 9cb6b8118..403569e76 100644 --- a/plugins/channelmimo/interferometer/interferometer.h +++ b/plugins/channelmimo/interferometer/interferometer.h @@ -88,6 +88,8 @@ public: 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() diff --git a/plugins/channelmimo/interferometer/interferometergui.h b/plugins/channelmimo/interferometer/interferometergui.h index 2d8ac1670..47919d1e0 100644 --- a/plugins/channelmimo/interferometer/interferometergui.h +++ b/plugins/channelmimo/interferometer/interferometergui.h @@ -55,6 +55,7 @@ public: 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; } private: Ui::InterferometerGUI* ui; diff --git a/plugins/channelrx/chanalyzer/chanalyzer.cpp b/plugins/channelrx/chanalyzer/chanalyzer.cpp index d009a329b..9a00de8aa 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzer.cpp @@ -92,6 +92,18 @@ ChannelAnalyzer::~ChannelAnalyzer() qDebug("ChannelAnalyzer::~ChannelAnalyzer: done"); } +void ChannelAnalyzer::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + int ChannelAnalyzer::getChannelSampleRate() { DeviceSampleSource *source = m_deviceAPI->getSampleSource(); diff --git a/plugins/channelrx/chanalyzer/chanalyzer.h b/plugins/channelrx/chanalyzer/chanalyzer.h index 5cc6b5542..7bbb36f98 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.h +++ b/plugins/channelrx/chanalyzer/chanalyzer.h @@ -64,6 +64,8 @@ public: ChannelAnalyzer(DeviceAPI *deviceAPI); virtual ~ChannelAnalyzer(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } ScopeVis *getScopeVis() { return &m_scopeVis; } void setScopeVis(ScopeVis *scopeVis) { m_basebandSink->setScopeVis(scopeVis); } diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.h b/plugins/channelrx/chanalyzer/chanalyzergui.h index bfd8016ed..c44a9f8a9 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.h +++ b/plugins/channelrx/chanalyzer/chanalyzergui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodadsb/adsbdemod.cpp b/plugins/channelrx/demodadsb/adsbdemod.cpp index 6bf711ab5..2764ff2e3 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.cpp +++ b/plugins/channelrx/demodadsb/adsbdemod.cpp @@ -109,6 +109,18 @@ ADSBDemod::~ADSBDemod() delete m_thread; } +void ADSBDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t ADSBDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodadsb/adsbdemod.h b/plugins/channelrx/demodadsb/adsbdemod.h index db4a80797..69214119f 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.h +++ b/plugins/channelrx/demodadsb/adsbdemod.h @@ -65,6 +65,8 @@ public: ADSBDemod(DeviceAPI *deviceAPI); virtual ~ADSBDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.h b/plugins/channelrx/demodadsb/adsbdemodgui.h index d3d1fa96b..95553329f 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.h +++ b/plugins/channelrx/demodadsb/adsbdemodgui.h @@ -760,6 +760,7 @@ public: 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; } void highlightAircraft(Aircraft *aircraft); void targetAircraft(Aircraft *aircraft); diff --git a/plugins/channelrx/demodais/aisdemod.cpp b/plugins/channelrx/demodais/aisdemod.cpp index 9079b2b93..67904a891 100644 --- a/plugins/channelrx/demodais/aisdemod.cpp +++ b/plugins/channelrx/demodais/aisdemod.cpp @@ -97,6 +97,18 @@ AISDemod::~AISDemod() delete m_basebandSink; } +void AISDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t AISDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodais/aisdemod.h b/plugins/channelrx/demodais/aisdemod.h index 713f05229..7e8d3017b 100644 --- a/plugins/channelrx/demodais/aisdemod.h +++ b/plugins/channelrx/demodais/aisdemod.h @@ -93,6 +93,8 @@ public: AISDemod(DeviceAPI *deviceAPI); virtual ~AISDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodais/aisdemodgui.h b/plugins/channelrx/demodais/aisdemodgui.h index a77d95f25..5856f1852 100644 --- a/plugins/channelrx/demodais/aisdemodgui.h +++ b/plugins/channelrx/demodais/aisdemodgui.h @@ -65,6 +65,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index b420cf5b5..325aad209 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -113,6 +113,18 @@ AMDemod::~AMDemod() delete m_basebandSink; } +void AMDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t AMDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index 145f36748..156684802 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -64,6 +64,8 @@ public: AMDemod(DeviceAPI *deviceAPI); virtual ~AMDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodam/amdemodgui.h b/plugins/channelrx/demodam/amdemodgui.h index 7e838efc0..7d2440134 100644 --- a/plugins/channelrx/demodam/amdemodgui.h +++ b/plugins/channelrx/demodam/amdemodgui.h @@ -39,6 +39,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodapt/aptdemod.cpp b/plugins/channelrx/demodapt/aptdemod.cpp index 96b01b626..54b1a8f8f 100644 --- a/plugins/channelrx/demodapt/aptdemod.cpp +++ b/plugins/channelrx/demodapt/aptdemod.cpp @@ -115,6 +115,18 @@ APTDemod::~APTDemod() delete m_basebandSink; } +void APTDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t APTDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodapt/aptdemod.h b/plugins/channelrx/demodapt/aptdemod.h index 303ade6da..65ef1ac13 100644 --- a/plugins/channelrx/demodapt/aptdemod.h +++ b/plugins/channelrx/demodapt/aptdemod.h @@ -188,6 +188,8 @@ public: APTDemod(DeviceAPI *deviceAPI); virtual ~APTDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodapt/aptdemodgui.h b/plugins/channelrx/demodapt/aptdemodgui.h index ecd76ef13..1cb07b223 100644 --- a/plugins/channelrx/demodapt/aptdemodgui.h +++ b/plugins/channelrx/demodapt/aptdemodgui.h @@ -83,6 +83,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index 7770a6348..0eeb224db 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -75,6 +75,18 @@ ATVDemod::~ATVDemod() delete m_basebandSink; } +void ATVDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void ATVDemod::start() { qDebug("ATVDemod::start"); diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index e8e246c0c..f70342a17 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -63,6 +63,8 @@ public: ATVDemod(DeviceAPI *deviceAPI); virtual ~ATVDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodatv/atvdemodgui.h b/plugins/channelrx/demodatv/atvdemodgui.h index e66415e89..123bf011e 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.h +++ b/plugins/channelrx/demodatv/atvdemodgui.h @@ -58,6 +58,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index 2afb6de93..97617df1d 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -96,6 +96,18 @@ BFMDemod::~BFMDemod() delete m_thread; } +void BFMDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t BFMDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodbfm/bfmdemod.h b/plugins/channelrx/demodbfm/bfmdemod.h index 0d6b654af..49bbe0ac9 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.h +++ b/plugins/channelrx/demodbfm/bfmdemod.h @@ -70,6 +70,8 @@ public: BFMDemod(DeviceAPI *deviceAPI); virtual ~BFMDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } void setBasebandMessageQueueToGUI(MessageQueue *messageQueue) { m_basebandSink->setMessageQueueToGUI(messageQueue); } diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.h b/plugins/channelrx/demodbfm/bfmdemodgui.h index 79892b3a8..e89dabe31 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.h +++ b/plugins/channelrx/demodbfm/bfmdemodgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index 17d261310..a0f2b0ef8 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -97,6 +97,18 @@ ChirpChatDemod::~ChirpChatDemod() delete m_thread; } +void ChirpChatDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t ChirpChatDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.h b/plugins/channelrx/demodchirpchat/chirpchatdemod.h index 618782e9d..d9dec0a35 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.h @@ -202,6 +202,8 @@ public: ChirpChatDemod(DeviceAPI* deviceAPI); virtual ~ChirpChatDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } using BasebandSampleSink::feed; diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h index ea5a547cc..123c613d8 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.h @@ -54,6 +54,7 @@ public: 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; } private slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demoddab/dabdemod.cpp b/plugins/channelrx/demoddab/dabdemod.cpp index e42c47928..7319bc582 100644 --- a/plugins/channelrx/demoddab/dabdemod.cpp +++ b/plugins/channelrx/demoddab/dabdemod.cpp @@ -108,6 +108,18 @@ DABDemod::~DABDemod() delete m_basebandSink; } +void DABDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t DABDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demoddab/dabdemod.h b/plugins/channelrx/demoddab/dabdemod.h index a2423a7b9..a177a3872 100644 --- a/plugins/channelrx/demoddab/dabdemod.h +++ b/plugins/channelrx/demoddab/dabdemod.h @@ -313,6 +313,8 @@ public: DABDemod(DeviceAPI *deviceAPI); virtual ~DABDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demoddab/dabdemodgui.h b/plugins/channelrx/demoddab/dabdemodgui.h index 2ce282c2c..9ed800f16 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.h +++ b/plugins/channelrx/demoddab/dabdemodgui.h @@ -61,6 +61,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demoddatv/datvdemod.cpp b/plugins/channelrx/demoddatv/datvdemod.cpp index 988508501..e50a04956 100644 --- a/plugins/channelrx/demoddatv/datvdemod.cpp +++ b/plugins/channelrx/demoddatv/datvdemod.cpp @@ -88,6 +88,18 @@ DATVDemod::~DATVDemod() m_basebandSink->deleteLater(); } +void DATVDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void DATVDemod::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst) { (void) firstOfBurst; diff --git a/plugins/channelrx/demoddatv/datvdemod.h b/plugins/channelrx/demoddatv/datvdemod.h index 78befcd87..bd90cf38b 100644 --- a/plugins/channelrx/demoddatv/datvdemod.h +++ b/plugins/channelrx/demoddatv/datvdemod.h @@ -43,8 +43,10 @@ public: DATVDemod(DeviceAPI *); virtual ~DATVDemod(); - virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } + virtual void getIdentifier(QString& id) { id = objectName(); } virtual QString getIdentifier() const { return objectName(); } virtual void getTitle(QString& title) { title = objectName(); } diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index 83ffed036..73515445c 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -97,7 +97,7 @@ bool DATVDemodGUI::handleMessage(const Message& message) { DATVDemod::MsgConfigureDATVDemod& cfg = (DATVDemod::MsgConfigureDATVDemod&) message; m_settings = cfg.getSettings(); - m_objChannelMarker.updateSettings(static_cast(m_settings.m_channelMarker)); + m_channelMarker.updateSettings(static_cast(m_settings.m_channelMarker)); displaySettings(); return true; } @@ -132,14 +132,14 @@ void DATVDemodGUI::handleInputMessages() void DATVDemodGUI::channelMarkerChangedByCursor() { - ui->deltaFrequency->setValue(m_objChannelMarker.getCenterFrequency()); - m_settings.m_centerFrequency = m_objChannelMarker.getCenterFrequency(); + ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); + m_settings.m_centerFrequency = m_channelMarker.getCenterFrequency(); applySettings(); } void DATVDemodGUI::channelMarkerHighlightedByCursor() { - getRollupContents()->setHighlighted(m_objChannelMarker.getHighlighted()); + getRollupContents()->setHighlighted(m_channelMarker.getHighlighted()); } @@ -156,7 +156,7 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p) { if (m_contextMenuType == ContextMenuChannelSettings) { - BasicChannelSettingsDialog dialog(&m_objChannelMarker, this); + BasicChannelSettingsDialog dialog(&m_channelMarker, this); dialog.setUseReverseAPI(m_settings.m_useReverseAPI); dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress); dialog.setReverseAPIPort(m_settings.m_reverseAPIPort); @@ -165,8 +165,8 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p) dialog.move(p); dialog.exec(); - m_settings.m_rgbColor = m_objChannelMarker.getColor().rgb(); - m_settings.m_title = m_objChannelMarker.getTitle(); + m_settings.m_rgbColor = m_channelMarker.getColor().rgb(); + m_settings.m_title = m_channelMarker.getTitle(); m_settings.m_useReverseAPI = dialog.useReverseAPI(); m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress(); m_settings.m_reverseAPIPort = dialog.getReverseAPIPort(); @@ -174,7 +174,7 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p) m_settings.m_reverseAPIChannelIndex = dialog.getReverseAPIChannelIndex(); setWindowTitle(m_settings.m_title); - setTitle(m_objChannelMarker.getTitle()); + setTitle(m_channelMarker.getTitle()); setTitleColor(m_settings.m_rgbColor); applySettings(); @@ -188,8 +188,8 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p) dialog.exec(); m_settings.m_streamIndex = dialog.getSelectedStreamIndex(); - m_objChannelMarker.clearStreamIndexes(); - m_objChannelMarker.addStreamIndex(m_settings.m_streamIndex); + m_channelMarker.clearStreamIndexes(); + m_channelMarker.addStreamIndex(m_settings.m_streamIndex); displayStreamIndex(); applySettings(); } @@ -202,7 +202,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba ui(new Ui::DATVDemodGUI), m_objPluginAPI(objPluginAPI), m_deviceUISet(deviceUISet), - m_objChannelMarker(this), + m_channelMarker(this), m_deviceCenterFrequency(0), m_basebandSampleRate(1), m_blnBasicSettingsShown(false), @@ -241,7 +241,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable); } - m_settings.setChannelMarker(&m_objChannelMarker); + m_settings.setChannelMarker(&m_channelMarker); m_settings.setRollupState(&m_rollupState); connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged); @@ -264,18 +264,18 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba ui->rfBandwidth->setColorMapper(ColorMapper(ColorMapper::GrayYellow)); ui->rfBandwidth->setValueRange(true, 8, 0, 50000000); - m_objChannelMarker.blockSignals(true); - m_objChannelMarker.setColor(Qt::magenta); - m_objChannelMarker.setBandwidth(6000000); - m_objChannelMarker.setCenterFrequency(0); - m_objChannelMarker.setTitle("DATV Demodulator"); - m_objChannelMarker.blockSignals(false); - m_objChannelMarker.setVisible(true); + m_channelMarker.blockSignals(true); + m_channelMarker.setColor(Qt::magenta); + m_channelMarker.setBandwidth(6000000); + m_channelMarker.setCenterFrequency(0); + m_channelMarker.setTitle("DATV Demodulator"); + m_channelMarker.blockSignals(false); + m_channelMarker.setVisible(true); - connect(&m_objChannelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor())); - connect(&m_objChannelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor())); + connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor())); + connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor())); - m_deviceUISet->addChannelMarker(&m_objChannelMarker); + m_deviceUISet->addChannelMarker(&m_channelMarker); // QPixmap pixmapTarget = QPixmap(":/film.png"); // pixmapTarget = pixmapTarget.scaled(16, 16, Qt::KeepAspectRatio, Qt::SmoothTransformation); @@ -312,18 +312,18 @@ void DATVDemodGUI::blockApplySettings(bool blnBlock) void DATVDemodGUI::displaySettings() { - m_objChannelMarker.blockSignals(true); - m_objChannelMarker.setCenterFrequency(m_settings.m_centerFrequency); - m_objChannelMarker.setColor(m_settings.m_rgbColor); - m_objChannelMarker.setTitle(m_settings.m_title); - m_objChannelMarker.blockSignals(false); - m_objChannelMarker.setBandwidth(m_settings.m_rfBandwidth); + m_channelMarker.blockSignals(true); + m_channelMarker.setCenterFrequency(m_settings.m_centerFrequency); + m_channelMarker.setColor(m_settings.m_rgbColor); + m_channelMarker.setTitle(m_settings.m_title); + m_channelMarker.blockSignals(false); + m_channelMarker.setBandwidth(m_settings.m_rfBandwidth); blockApplySettings(true); setTitleColor(m_settings.m_rgbColor); - setWindowTitle(m_objChannelMarker.getTitle()); - setTitle(m_objChannelMarker.getTitle()); + setWindowTitle(m_channelMarker.getTitle()); + setTitle(m_channelMarker.getTitle()); ui->deltaFrequency->setValue(m_settings.m_centerFrequency); ui->chkAllowDrift->setChecked(m_settings.m_allowDrift); @@ -475,7 +475,7 @@ void DATVDemodGUI::applySettings(bool force) { qDebug("DATVDemodGUI::applySettings"); - setTitleColor(m_objChannelMarker.getColor()); + setTitleColor(m_channelMarker.getColor()); QString msg = tr("DATVDemodGUI::applySettings: force: %1").arg(force ? "true" : "false"); m_settings.debug(msg); @@ -488,14 +488,14 @@ void DATVDemodGUI::applySettings(bool force) void DATVDemodGUI::leaveEvent(QEvent*) { blockApplySettings(true); - m_objChannelMarker.setHighlighted(false); + m_channelMarker.setHighlighted(false); blockApplySettings(false); } void DATVDemodGUI::enterEvent(QEvent*) { blockApplySettings(true); - m_objChannelMarker.setHighlighted(true); + m_channelMarker.setHighlighted(true); blockApplySettings(false); } @@ -790,16 +790,16 @@ void DATVDemodGUI::on_StreamDataAvailable(int intBytes, int intPercent, qint64 i void DATVDemodGUI::on_deltaFrequency_changed(qint64 value) { - m_objChannelMarker.setCenterFrequency(value); - m_settings.m_centerFrequency = m_objChannelMarker.getCenterFrequency(); + m_channelMarker.setCenterFrequency(value); + m_settings.m_centerFrequency = m_channelMarker.getCenterFrequency(); updateAbsoluteCenterFrequency(); applySettings(); } void DATVDemodGUI::on_rfBandwidth_changed(qint64 value) { - m_objChannelMarker.setBandwidth(value); - m_settings.m_rfBandwidth = m_objChannelMarker.getBandwidth(); + m_channelMarker.setBandwidth(value); + m_settings.m_rfBandwidth = m_channelMarker.getBandwidth(); applySettings(); } diff --git a/plugins/channelrx/demoddatv/datvdemodgui.h b/plugins/channelrx/demoddatv/datvdemodgui.h index a3028f206..1b2511983 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.h +++ b/plugins/channelrx/demoddatv/datvdemodgui.h @@ -58,6 +58,7 @@ public: 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 MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } @@ -109,7 +110,7 @@ private: PluginAPI* m_objPluginAPI; DeviceUISet* m_deviceUISet; - ChannelMarker m_objChannelMarker; + ChannelMarker m_channelMarker; RollupState m_rollupState; DATVDemod* m_datvDemod; MessageQueue m_inputMessageQueue; diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index 051c6fc66..6ea650bdd 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -98,6 +98,18 @@ DSDDemod::~DSDDemod() delete m_thread; } +void DSDDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t DSDDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index e402cad24..620138826 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -65,6 +65,8 @@ public: DSDDemod(DeviceAPI *deviceAPI); virtual ~DSDDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h index 55453875f..618a853fc 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.h +++ b/plugins/channelrx/demoddsd/dsddemodgui.h @@ -60,6 +60,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodfreedv/freedvdemod.cpp b/plugins/channelrx/demodfreedv/freedvdemod.cpp index b5ff705e5..dfa55ed6d 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemod.cpp @@ -89,6 +89,18 @@ FreeDVDemod::~FreeDVDemod() delete m_thread; } +void FreeDVDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t FreeDVDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodfreedv/freedvdemod.h b/plugins/channelrx/demodfreedv/freedvdemod.h index 8404998d8..078a840c8 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.h +++ b/plugins/channelrx/demodfreedv/freedvdemod.h @@ -77,6 +77,8 @@ public: FreeDVDemod(DeviceAPI *deviceAPI); virtual ~FreeDVDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } using BasebandSampleSink::feed; diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.h b/plugins/channelrx/demodfreedv/freedvdemodgui.h index c68bfaa15..4edb7d8fd 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.h +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.h @@ -58,6 +58,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.ui b/plugins/channelrx/demodfreedv/freedvdemodgui.ui index 4c1ab1c80..a9f8f818c 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.ui +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.ui @@ -6,12 +6,12 @@ 0 0 - 442 - 523 + 412 + 478 - + 0 0 @@ -36,7 +36,7 @@ 0 0 - 441 + 410 171 @@ -661,12 +661,24 @@ - 10 + 0 170 - 218 + 410 284 + + + 0 + 0 + + + + + 410 + 0 + + Channel Spectrum @@ -688,6 +700,12 @@ + + + 0 + 0 + + 200 @@ -715,12 +733,23 @@
gui/rollupcontents.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
LevelMeterSignalDB QWidget
gui/levelmeter.h
1
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
GLSpectrum QWidget @@ -733,17 +762,6 @@
gui/glspectrumgui.h
1
- - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 -
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
LevelMeterVU QWidget diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index 1239c0e36..b532c7fe7 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -102,6 +102,18 @@ NFMDemod::~NFMDemod() delete m_thread; } +void NFMDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t NFMDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index 6581b053f..546df2274 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -64,6 +64,8 @@ public: NFMDemod(DeviceAPI *deviceAPI); virtual ~NFMDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.h b/plugins/channelrx/demodnfm/nfmdemodgui.h index 6ae22810b..e1681c039 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.h +++ b/plugins/channelrx/demodnfm/nfmdemodgui.h @@ -38,6 +38,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodpacket/packetdemod.cpp b/plugins/channelrx/demodpacket/packetdemod.cpp index 94886d91f..c7dfd2038 100644 --- a/plugins/channelrx/demodpacket/packetdemod.cpp +++ b/plugins/channelrx/demodpacket/packetdemod.cpp @@ -99,6 +99,18 @@ PacketDemod::~PacketDemod() delete m_basebandSink; } +void PacketDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t PacketDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodpacket/packetdemod.h b/plugins/channelrx/demodpacket/packetdemod.h index 861ece372..296f1503a 100644 --- a/plugins/channelrx/demodpacket/packetdemod.h +++ b/plugins/channelrx/demodpacket/packetdemod.h @@ -67,6 +67,8 @@ public: PacketDemod(DeviceAPI *deviceAPI); virtual ~PacketDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodpacket/packetdemodgui.h b/plugins/channelrx/demodpacket/packetdemodgui.h index e7ed265ed..80f860986 100644 --- a/plugins/channelrx/demodpacket/packetdemodgui.h +++ b/plugins/channelrx/demodpacket/packetdemodgui.h @@ -66,6 +66,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodpager/pagerdemod.cpp b/plugins/channelrx/demodpager/pagerdemod.cpp index 8f7552375..eaa12a793 100644 --- a/plugins/channelrx/demodpager/pagerdemod.cpp +++ b/plugins/channelrx/demodpager/pagerdemod.cpp @@ -92,6 +92,18 @@ PagerDemod::~PagerDemod() delete m_basebandSink; } +void PagerDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t PagerDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodpager/pagerdemod.h b/plugins/channelrx/demodpager/pagerdemod.h index 3561bf0a4..a283cc5d0 100644 --- a/plugins/channelrx/demodpager/pagerdemod.h +++ b/plugins/channelrx/demodpager/pagerdemod.h @@ -122,6 +122,8 @@ public: PagerDemod(DeviceAPI *deviceAPI); virtual ~PagerDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodpager/pagerdemodgui.h b/plugins/channelrx/demodpager/pagerdemodgui.h index 5e9c3b718..b4b3b82e4 100644 --- a/plugins/channelrx/demodpager/pagerdemodgui.h +++ b/plugins/channelrx/demodpager/pagerdemodgui.h @@ -60,6 +60,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp index 6964c3d2b..86944c1ea 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp +++ b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp @@ -96,6 +96,18 @@ RadiosondeDemod::~RadiosondeDemod() delete m_basebandSink; } +void RadiosondeDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t RadiosondeDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodradiosonde/radiosondedemod.h b/plugins/channelrx/demodradiosonde/radiosondedemod.h index 5703eac62..c103794aa 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemod.h +++ b/plugins/channelrx/demodradiosonde/radiosondedemod.h @@ -102,6 +102,8 @@ public: RadiosondeDemod(DeviceAPI *deviceAPI); virtual ~RadiosondeDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodradiosonde/radiosondedemodgui.h b/plugins/channelrx/demodradiosonde/radiosondedemodgui.h index 0f64739b0..1958c2503 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemodgui.h +++ b/plugins/channelrx/demodradiosonde/radiosondedemodgui.h @@ -61,6 +61,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index a3ebb7910..3cd877eb0 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -96,6 +96,18 @@ SSBDemod::~SSBDemod() delete m_thread; } +void SSBDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t SSBDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 3345cbb05..119dc700d 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -66,6 +66,8 @@ public: SSBDemod(DeviceAPI *deviceAPI); virtual ~SSBDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } using BasebandSampleSink::feed; diff --git a/plugins/channelrx/demodssb/ssbdemodgui.h b/plugins/channelrx/demodssb/ssbdemodgui.h index f5da7c3ed..3134732f5 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.h +++ b/plugins/channelrx/demodssb/ssbdemodgui.h @@ -41,6 +41,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodssb/ssbdemodgui.ui b/plugins/channelrx/demodssb/ssbdemodgui.ui index 1bc6325e8..6896c617b 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.ui +++ b/plugins/channelrx/demodssb/ssbdemodgui.ui @@ -969,17 +969,25 @@
- + + + + 0 + 0 + + + + + 0 + 30 + + +
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
RollupContents QWidget @@ -987,10 +995,9 @@ 1 - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 + ButtonSwitch + QToolButton +
gui/buttonswitch.h
LevelMeterSignalDB @@ -998,6 +1005,12 @@
gui/levelmeter.h
1
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
GLSpectrum QWidget diff --git a/plugins/channelrx/demodvor/vordemod.cpp b/plugins/channelrx/demodvor/vordemod.cpp index efb88b475..f09204d93 100644 --- a/plugins/channelrx/demodvor/vordemod.cpp +++ b/plugins/channelrx/demodvor/vordemod.cpp @@ -96,6 +96,18 @@ VORDemod::~VORDemod() delete m_basebandSink; } +void VORDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t VORDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodvor/vordemod.h b/plugins/channelrx/demodvor/vordemod.h index 8ffd638da..ef16083d6 100644 --- a/plugins/channelrx/demodvor/vordemod.h +++ b/plugins/channelrx/demodvor/vordemod.h @@ -65,6 +65,8 @@ public: VORDemod(DeviceAPI *deviceAPI); virtual ~VORDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodvor/vordemodgui.h b/plugins/channelrx/demodvor/vordemodgui.h index 875cfdf9c..f368a7b54 100644 --- a/plugins/channelrx/demodvor/vordemodgui.h +++ b/plugins/channelrx/demodvor/vordemodgui.h @@ -219,6 +219,7 @@ public: 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; } void selectVOR(VORGUI *vorGUI, bool selected); diff --git a/plugins/channelrx/demodvorsc/vordemodsc.cpp b/plugins/channelrx/demodvorsc/vordemodsc.cpp index d4d3ea223..fb30218d9 100644 --- a/plugins/channelrx/demodvorsc/vordemodsc.cpp +++ b/plugins/channelrx/demodvorsc/vordemodsc.cpp @@ -98,6 +98,18 @@ VORDemodSC::~VORDemodSC() delete m_basebandSink; } +void VORDemodSC::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t VORDemodSC::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodvorsc/vordemodsc.h b/plugins/channelrx/demodvorsc/vordemodsc.h index 5bca0a6df..3741eb873 100644 --- a/plugins/channelrx/demodvorsc/vordemodsc.h +++ b/plugins/channelrx/demodvorsc/vordemodsc.h @@ -65,6 +65,8 @@ public: VORDemodSC(DeviceAPI *deviceAPI); virtual ~VORDemodSC(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodvorsc/vordemodscgui.h b/plugins/channelrx/demodvorsc/vordemodscgui.h index a1534a077..557a2775d 100644 --- a/plugins/channelrx/demodvorsc/vordemodscgui.h +++ b/plugins/channelrx/demodvorsc/vordemodscgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/demodwfm/wfmdemod.cpp b/plugins/channelrx/demodwfm/wfmdemod.cpp index dfda76957..aab213164 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.cpp +++ b/plugins/channelrx/demodwfm/wfmdemod.cpp @@ -99,6 +99,18 @@ WFMDemod::~WFMDemod() delete m_thread; } +void WFMDemod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t WFMDemod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/demodwfm/wfmdemod.h b/plugins/channelrx/demodwfm/wfmdemod.h index beef2586b..9002f6932 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.h +++ b/plugins/channelrx/demodwfm/wfmdemod.h @@ -63,6 +63,8 @@ public: WFMDemod(DeviceAPI *deviceAPI); virtual ~WFMDemod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.h b/plugins/channelrx/demodwfm/wfmdemodgui.h index 3c83d13d8..772b4d6f0 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.h +++ b/plugins/channelrx/demodwfm/wfmdemodgui.h @@ -36,6 +36,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/filesink/filesink.cpp b/plugins/channelrx/filesink/filesink.cpp index f9491275b..96b492628 100644 --- a/plugins/channelrx/filesink/filesink.cpp +++ b/plugins/channelrx/filesink/filesink.cpp @@ -101,6 +101,18 @@ FileSink::~FileSink() delete m_basebandSink; } +void FileSink::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void FileSink::setMessageQueueToGUI(MessageQueue* queue) { ChannelAPI::setMessageQueueToGUI(queue); diff --git a/plugins/channelrx/filesink/filesink.h b/plugins/channelrx/filesink/filesink.h index 679d2a04a..a2b97d9a7 100644 --- a/plugins/channelrx/filesink/filesink.h +++ b/plugins/channelrx/filesink/filesink.h @@ -84,6 +84,8 @@ public: FileSink(DeviceAPI *deviceAPI); virtual ~FileSink(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/filesink/filesinkgui.h b/plugins/channelrx/filesink/filesinkgui.h index 10a8da955..d16d37e0f 100644 --- a/plugins/channelrx/filesink/filesinkgui.h +++ b/plugins/channelrx/filesink/filesinkgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/freqtracker/freqtracker.cpp b/plugins/channelrx/freqtracker/freqtracker.cpp index 934e9f146..dfc6b753f 100644 --- a/plugins/channelrx/freqtracker/freqtracker.cpp +++ b/plugins/channelrx/freqtracker/freqtracker.cpp @@ -101,6 +101,18 @@ FreqTracker::~FreqTracker() delete m_thread; } +void FreqTracker::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t FreqTracker::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/freqtracker/freqtracker.h b/plugins/channelrx/freqtracker/freqtracker.h index e77c60dd5..628cd76cb 100644 --- a/plugins/channelrx/freqtracker/freqtracker.h +++ b/plugins/channelrx/freqtracker/freqtracker.h @@ -63,6 +63,8 @@ public: FreqTracker(DeviceAPI *deviceAPI); virtual ~FreqTracker(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/freqtracker/freqtrackergui.h b/plugins/channelrx/freqtracker/freqtrackergui.h index eb3cac976..702b61c25 100644 --- a/plugins/channelrx/freqtracker/freqtrackergui.h +++ b/plugins/channelrx/freqtracker/freqtrackergui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index abfd2f096..758f9e1fa 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -93,6 +93,18 @@ LocalSink::~LocalSink() delete m_thread; } +void LocalSink::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t LocalSink::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/localsink/localsink.h b/plugins/channelrx/localsink/localsink.h index 9dce4752a..d25a2972a 100644 --- a/plugins/channelrx/localsink/localsink.h +++ b/plugins/channelrx/localsink/localsink.h @@ -64,6 +64,8 @@ public: LocalSink(DeviceAPI *deviceAPI); virtual ~LocalSink(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/localsink/localsinkgui.h b/plugins/channelrx/localsink/localsinkgui.h index a0f8c2b1c..55a7344cd 100644 --- a/plugins/channelrx/localsink/localsinkgui.h +++ b/plugins/channelrx/localsink/localsinkgui.h @@ -56,6 +56,7 @@ public: 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; } private: Ui::LocalSinkGUI* ui; diff --git a/plugins/channelrx/noisefigure/noisefigure.cpp b/plugins/channelrx/noisefigure/noisefigure.cpp index 0953a028c..ff5f3160d 100644 --- a/plugins/channelrx/noisefigure/noisefigure.cpp +++ b/plugins/channelrx/noisefigure/noisefigure.cpp @@ -110,6 +110,18 @@ NoiseFigure::~NoiseFigure() delete m_basebandSink; } +void NoiseFigure::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t NoiseFigure::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/noisefigure/noisefigure.h b/plugins/channelrx/noisefigure/noisefigure.h index 65cbb3c41..f64437436 100644 --- a/plugins/channelrx/noisefigure/noisefigure.h +++ b/plugins/channelrx/noisefigure/noisefigure.h @@ -172,6 +172,8 @@ public: NoiseFigure(DeviceAPI *deviceAPI); virtual ~NoiseFigure(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/noisefigure/noisefiguregui.h b/plugins/channelrx/noisefigure/noisefiguregui.h index c04a7e12e..249697592 100644 --- a/plugins/channelrx/noisefigure/noisefiguregui.h +++ b/plugins/channelrx/noisefigure/noisefiguregui.h @@ -63,6 +63,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/radioastronomy/radioastronomy.cpp b/plugins/channelrx/radioastronomy/radioastronomy.cpp index cf06ca0dd..98c8bf794 100644 --- a/plugins/channelrx/radioastronomy/radioastronomy.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomy.cpp @@ -154,6 +154,18 @@ RadioAstronomy::~RadioAstronomy() delete m_worker; } +void RadioAstronomy::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t RadioAstronomy::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/radioastronomy/radioastronomy.h b/plugins/channelrx/radioastronomy/radioastronomy.h index 59b3a1420..aac4fc559 100644 --- a/plugins/channelrx/radioastronomy/radioastronomy.h +++ b/plugins/channelrx/radioastronomy/radioastronomy.h @@ -346,6 +346,8 @@ public: RadioAstronomy(DeviceAPI *deviceAPI); virtual ~RadioAstronomy(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.h b/plugins/channelrx/radioastronomy/radioastronomygui.h index d82e265d4..2ae11b487 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.h +++ b/plugins/channelrx/radioastronomy/radioastronomygui.h @@ -206,6 +206,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/radioclock/radioclock.cpp b/plugins/channelrx/radioclock/radioclock.cpp index 14b9437ef..bf0859890 100644 --- a/plugins/channelrx/radioclock/radioclock.cpp +++ b/plugins/channelrx/radioclock/radioclock.cpp @@ -99,6 +99,18 @@ RadioClock::~RadioClock() delete m_basebandSink; } +void RadioClock::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t RadioClock::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/radioclock/radioclock.h b/plugins/channelrx/radioclock/radioclock.h index 2a8714b78..af0558895 100644 --- a/plugins/channelrx/radioclock/radioclock.h +++ b/plugins/channelrx/radioclock/radioclock.h @@ -112,6 +112,8 @@ public: RadioClock(DeviceAPI *deviceAPI); virtual ~RadioClock(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/radioclock/radioclockgui.h b/plugins/channelrx/radioclock/radioclockgui.h index 74259e465..73b04177a 100644 --- a/plugins/channelrx/radioclock/radioclockgui.h +++ b/plugins/channelrx/radioclock/radioclockgui.h @@ -58,6 +58,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/remotesink/remotesink.cpp b/plugins/channelrx/remotesink/remotesink.cpp index 00e6ef750..bbba6c7f4 100644 --- a/plugins/channelrx/remotesink/remotesink.cpp +++ b/plugins/channelrx/remotesink/remotesink.cpp @@ -99,6 +99,18 @@ RemoteSink::~RemoteSink() delete m_basebandSink; } +void RemoteSink::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t RemoteSink::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/remotesink/remotesink.h b/plugins/channelrx/remotesink/remotesink.h index 0764449da..476ed6677 100644 --- a/plugins/channelrx/remotesink/remotesink.h +++ b/plugins/channelrx/remotesink/remotesink.h @@ -65,6 +65,8 @@ public: RemoteSink(DeviceAPI *deviceAPI); virtual ~RemoteSink(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/remotesink/remotesinkgui.h b/plugins/channelrx/remotesink/remotesinkgui.h index 84332a6fe..60354c528 100644 --- a/plugins/channelrx/remotesink/remotesinkgui.h +++ b/plugins/channelrx/remotesink/remotesinkgui.h @@ -56,6 +56,7 @@ public: 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; } private: Ui::RemoteSinkGUI* ui; diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp index ffe624604..a2879bead 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp @@ -101,6 +101,18 @@ SigMFFileSink::~SigMFFileSink() delete m_basebandSink; } +void SigMFFileSink::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void SigMFFileSink::setMessageQueueToGUI(MessageQueue* queue) { ChannelAPI::setMessageQueueToGUI(queue); diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.h b/plugins/channelrx/sigmffilesink/sigmffilesink.h index 3d8b4e82c..4923c9fc4 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.h @@ -84,6 +84,8 @@ public: SigMFFileSink(DeviceAPI *deviceAPI); virtual ~SigMFFileSink(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } using BasebandSampleSink::feed; virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po); diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h index 2813e6f44..e97e4d006 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channelrx/udpsink/udpsink.cpp b/plugins/channelrx/udpsink/udpsink.cpp index 4db88391c..81a90f9c3 100644 --- a/plugins/channelrx/udpsink/udpsink.cpp +++ b/plugins/channelrx/udpsink/udpsink.cpp @@ -92,6 +92,18 @@ UDPSink::~UDPSink() delete m_thread; } +void UDPSink::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSinkAPI(this); + m_deviceAPI->removeChannelSink(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSink(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t UDPSink::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSourceStreams(); diff --git a/plugins/channelrx/udpsink/udpsink.h b/plugins/channelrx/udpsink/udpsink.h index c70f6bd43..6a5dac3db 100644 --- a/plugins/channelrx/udpsink/udpsink.h +++ b/plugins/channelrx/udpsink/udpsink.h @@ -63,6 +63,8 @@ public: UDPSink(DeviceAPI *deviceAPI); virtual ~UDPSink(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } SpectrumVis *getSpectrumVis() { return &m_spectrumVis; } void enableSpectrum(bool enable); diff --git a/plugins/channelrx/udpsink/udpsinkgui.h b/plugins/channelrx/udpsink/udpsinkgui.h index cce4e24be..fe476b533 100644 --- a/plugins/channelrx/udpsink/udpsinkgui.h +++ b/plugins/channelrx/udpsink/udpsinkgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/filesource/filesource.cpp b/plugins/channeltx/filesource/filesource.cpp index 2bb39a9b0..fcce597f2 100644 --- a/plugins/channeltx/filesource/filesource.cpp +++ b/plugins/channeltx/filesource/filesource.cpp @@ -92,6 +92,18 @@ FileSource::~FileSource() delete m_thread; } +void FileSource::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void FileSource::start() { qDebug("FileSource::start"); diff --git a/plugins/channeltx/filesource/filesource.h b/plugins/channeltx/filesource/filesource.h index 9b7db6307..6a7de9be0 100644 --- a/plugins/channeltx/filesource/filesource.h +++ b/plugins/channeltx/filesource/filesource.h @@ -147,6 +147,8 @@ public: FileSource(DeviceAPI *deviceAPI); virtual ~FileSource(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/filesource/filesourcegui.h b/plugins/channeltx/filesource/filesourcegui.h index 7f5c227c7..8eec2f10f 100644 --- a/plugins/channeltx/filesource/filesourcegui.h +++ b/plugins/channeltx/filesource/filesourcegui.h @@ -53,6 +53,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/localsource/localsource.cpp b/plugins/channeltx/localsource/localsource.cpp index 7e1bef605..05c3d795f 100644 --- a/plugins/channeltx/localsource/localsource.cpp +++ b/plugins/channeltx/localsource/localsource.cpp @@ -84,6 +84,18 @@ LocalSource::~LocalSource() delete m_thread; } +void LocalSource::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void LocalSource::start() { qDebug("LocalSource::start"); diff --git a/plugins/channeltx/localsource/localsource.h b/plugins/channeltx/localsource/localsource.h index 889ebc125..37963a533 100644 --- a/plugins/channeltx/localsource/localsource.h +++ b/plugins/channeltx/localsource/localsource.h @@ -63,6 +63,8 @@ public: LocalSource(DeviceAPI *deviceAPI); virtual ~LocalSource(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/localsource/localsourcegui.h b/plugins/channeltx/localsource/localsourcegui.h index 3dc9b8908..52f358eed 100644 --- a/plugins/channeltx/localsource/localsourcegui.h +++ b/plugins/channeltx/localsource/localsourcegui.h @@ -56,6 +56,7 @@ public: 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; } private: Ui::LocalSourceGUI* ui; diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp index 029063a44..592e7f94e 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp @@ -97,6 +97,18 @@ IEEE_802_15_4_Mod::~IEEE_802_15_4_Mod() delete m_thread; } +void IEEE_802_15_4_Mod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void IEEE_802_15_4_Mod::start() { qDebug("IEEE_802_15_4_Mod::start"); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h index 8068e7f67..6dd3bd28a 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h @@ -91,6 +91,8 @@ public: IEEE_802_15_4_Mod(DeviceAPI *deviceAPI); ~IEEE_802_15_4_Mod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h index 2071794f8..b8f7ac261 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h @@ -62,6 +62,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui index 6e565edc6..472cb688b 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.ui @@ -6,19 +6,19 @@ 0 0 - 605 + 622 937 - + 0 0 - 0 + 600 0 @@ -40,15 +40,15 @@ - 2 - 2 + 0 + 0 600 151 - 600 + 598 0 @@ -586,14 +586,14 @@ - + 0 0 - 600 + 598 0 @@ -634,9 +634,15 @@ 284 + + + 0 + 0 + + - 600 + 598 0 @@ -661,6 +667,12 @@ + + + 0 + 0 + + 200 @@ -691,7 +703,7 @@ - 600 + 598 0 @@ -716,6 +728,12 @@ + + + 0 + 0 + + 200 @@ -743,29 +761,17 @@
gui/rollupcontents.h
1
+ + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
ValueDialZ QWidget
gui/valuedialz.h
1
- - GLScope - QWidget -
gui/glscope.h
- 1 -
- - GLScopeGUI - QWidget -
gui/glscopegui.h
- 1 -
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
GLSpectrum QWidget @@ -784,6 +790,18 @@
gui/levelmeter.h
1
+ + GLScope + QWidget +
gui/glscope.h
+ 1 +
+ + GLScopeGUI + QWidget +
gui/glscopegui.h
+ 1 +
deltaFrequency diff --git a/plugins/channeltx/modais/aismod.cpp b/plugins/channeltx/modais/aismod.cpp index 40eccd9a4..2de16546e 100644 --- a/plugins/channeltx/modais/aismod.cpp +++ b/plugins/channeltx/modais/aismod.cpp @@ -99,6 +99,18 @@ AISMod::~AISMod() delete m_thread; } +void AISMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void AISMod::start() { qDebug("AISMod::start"); diff --git a/plugins/channeltx/modais/aismod.h b/plugins/channeltx/modais/aismod.h index 1f610be16..3492ec4dc 100644 --- a/plugins/channeltx/modais/aismod.h +++ b/plugins/channeltx/modais/aismod.h @@ -152,6 +152,8 @@ public: AISMod(DeviceAPI *deviceAPI); virtual ~AISMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modais/aismodgui.h b/plugins/channeltx/modais/aismodgui.h index 502d5eb0b..c327f5cbb 100644 --- a/plugins/channeltx/modais/aismodgui.h +++ b/plugins/channeltx/modais/aismodgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index e50093b66..c1742d396 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -97,6 +97,18 @@ AMMod::~AMMod() delete m_thread; } +void AMMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t AMMod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSinkStreams(); diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index 46001df0b..66658c438 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -174,6 +174,8 @@ public: AMMod(DeviceAPI *deviceAPI); virtual ~AMMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modam/ammodgui.h b/plugins/channeltx/modam/ammodgui.h index c9ec32652..7e4c9595f 100644 --- a/plugins/channeltx/modam/ammodgui.h +++ b/plugins/channeltx/modam/ammodgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modam/ammodgui.ui b/plugins/channeltx/modam/ammodgui.ui index 0e57ea350..b1f136cf0 100644 --- a/plugins/channeltx/modam/ammodgui.ui +++ b/plugins/channeltx/modam/ammodgui.ui @@ -6,19 +6,19 @@ 0 0 - 342 - 363 + 360 + 347 - + 0 0 - 0 + 360 0 @@ -37,15 +37,21 @@ - 10 - 10 - 320 + 0 + 0 + 358 341 + + + 0 + 0 + + - 280 + 358 0 @@ -730,29 +736,29 @@
gui/rollupcontents.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
LevelMeterVU QWidget
gui/levelmeter.h
1
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
CWKeyerGUI QWidget
gui/cwkeyergui.h
1
- - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 -
diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index c39f1723c..0eb8dad6d 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -94,6 +94,18 @@ ATVMod::~ATVMod() delete m_thread; } +void ATVMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t ATVMod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSinkStreams(); diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 4c2cc4daf..185e11fd0 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -246,6 +246,8 @@ public: ATVMod(DeviceAPI *deviceAPI); virtual ~ATVMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modatv/atvmodgui.h b/plugins/channeltx/modatv/atvmodgui.h index b6fbd5af3..a146ff4b4 100644 --- a/plugins/channeltx/modatv/atvmodgui.h +++ b/plugins/channeltx/modatv/atvmodgui.h @@ -55,6 +55,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.cpp b/plugins/channeltx/modchirpchat/chirpchatmod.cpp index 4ed11d89b..c2d3412fa 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmod.cpp @@ -93,6 +93,18 @@ ChirpChatMod::~ChirpChatMod() delete m_thread; } +void ChirpChatMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void ChirpChatMod::start() { qDebug("ChirpChatMod::start"); diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.h b/plugins/channeltx/modchirpchat/chirpchatmod.h index 09c0c0b22..cfbc82d89 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.h +++ b/plugins/channeltx/modchirpchat/chirpchatmod.h @@ -89,6 +89,8 @@ public: ChirpChatMod(DeviceAPI *deviceAPI); virtual ~ChirpChatMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modchirpchat/chirpchatmodgui.h b/plugins/channeltx/modchirpchat/chirpchatmodgui.h index ce012587b..bfb017afb 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodgui.h +++ b/plugins/channeltx/modchirpchat/chirpchatmodgui.h @@ -54,6 +54,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/moddatv/datvmod.cpp b/plugins/channeltx/moddatv/datvmod.cpp index 796ebd9b9..83b429850 100644 --- a/plugins/channeltx/moddatv/datvmod.cpp +++ b/plugins/channeltx/moddatv/datvmod.cpp @@ -97,6 +97,18 @@ DATVMod::~DATVMod() delete m_thread; } +void DATVMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + uint32_t DATVMod::getNumberOfDeviceStreams() const { return m_deviceAPI->getNbSinkStreams(); diff --git a/plugins/channeltx/moddatv/datvmod.h b/plugins/channeltx/moddatv/datvmod.h index 0cd939f2e..c4d1a3764 100644 --- a/plugins/channeltx/moddatv/datvmod.h +++ b/plugins/channeltx/moddatv/datvmod.h @@ -202,6 +202,8 @@ public: DATVMod(DeviceAPI *deviceAPI); virtual ~DATVMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/moddatv/datvmodgui.h b/plugins/channeltx/moddatv/datvmodgui.h index f0aba1bb8..4982fa555 100644 --- a/plugins/channeltx/moddatv/datvmodgui.h +++ b/plugins/channeltx/moddatv/datvmodgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modfreedv/freedvmod.cpp b/plugins/channeltx/modfreedv/freedvmod.cpp index bee8aa146..9667d4e8b 100644 --- a/plugins/channeltx/modfreedv/freedvmod.cpp +++ b/plugins/channeltx/modfreedv/freedvmod.cpp @@ -97,6 +97,18 @@ FreeDVMod::~FreeDVMod() delete m_thread; } +void FreeDVMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void FreeDVMod::start() { qDebug("FreeDVMod::start"); diff --git a/plugins/channeltx/modfreedv/freedvmod.h b/plugins/channeltx/modfreedv/freedvmod.h index 49f2cc6d8..41660950f 100644 --- a/plugins/channeltx/modfreedv/freedvmod.h +++ b/plugins/channeltx/modfreedv/freedvmod.h @@ -178,6 +178,8 @@ public: FreeDVMod(DeviceAPI *deviceAPI); virtual ~FreeDVMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modfreedv/freedvmodgui.h b/plugins/channeltx/modfreedv/freedvmodgui.h index ad79495de..0275e17ef 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.h +++ b/plugins/channeltx/modfreedv/freedvmodgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 0f5457afc..faaf386da 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -98,6 +98,18 @@ NFMMod::~NFMMod() delete m_thread; } +void NFMMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void NFMMod::start() { qDebug("NFMMod::start"); diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 121b1a9a1..90a4ce786 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -174,6 +174,8 @@ public: NFMMod(DeviceAPI *deviceAPI); virtual ~NFMMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modnfm/nfmmodgui.h b/plugins/channeltx/modnfm/nfmmodgui.h index 2343874b4..e4dbd25a0 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.h +++ b/plugins/channeltx/modnfm/nfmmodgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modnfm/nfmmodgui.ui b/plugins/channeltx/modnfm/nfmmodgui.ui index 925309b4d..ec293e1c7 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.ui +++ b/plugins/channeltx/modnfm/nfmmodgui.ui @@ -6,19 +6,19 @@ 0 0 - 363 - 300 + 360 + 278 - + 0 0 - 0 + 360 0 @@ -37,15 +37,15 @@ - 2 - 2 - 341 + 0 + 0 + 358 271 - 280 + 358 0 diff --git a/plugins/channeltx/modpacket/packetmod.cpp b/plugins/channeltx/modpacket/packetmod.cpp index c08f28d3c..d3f086bba 100644 --- a/plugins/channeltx/modpacket/packetmod.cpp +++ b/plugins/channeltx/modpacket/packetmod.cpp @@ -103,6 +103,18 @@ PacketMod::~PacketMod() delete m_thread; } +void PacketMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void PacketMod::start() { qDebug("PacketMod::start"); diff --git a/plugins/channeltx/modpacket/packetmod.h b/plugins/channeltx/modpacket/packetmod.h index 7a9bd95d6..ebb7ebf78 100644 --- a/plugins/channeltx/modpacket/packetmod.h +++ b/plugins/channeltx/modpacket/packetmod.h @@ -142,6 +142,8 @@ public: PacketMod(DeviceAPI *deviceAPI); virtual ~PacketMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modpacket/packetmodgui.h b/plugins/channeltx/modpacket/packetmodgui.h index 4c5fba36d..644cbdea6 100644 --- a/plugins/channeltx/modpacket/packetmodgui.h +++ b/plugins/channeltx/modpacket/packetmodgui.h @@ -56,6 +56,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 44ad84076..51860e1fe 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -99,6 +99,18 @@ SSBMod::~SSBMod() delete m_thread; } +void SSBMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void SSBMod::start() { qDebug("SSBMod::start"); diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index 77afa532f..6603f9ac0 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -176,6 +176,8 @@ public: SSBMod(DeviceAPI *deviceAPI); virtual ~SSBMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modssb/ssbmodgui.h b/plugins/channeltx/modssb/ssbmodgui.h index 74e95c05a..5a132e8e6 100644 --- a/plugins/channeltx/modssb/ssbmodgui.h +++ b/plugins/channeltx/modssb/ssbmodgui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/modssb/ssbmodgui.ui b/plugins/channeltx/modssb/ssbmodgui.ui index 0465fac0a..06b6eb17f 100644 --- a/plugins/channeltx/modssb/ssbmodgui.ui +++ b/plugins/channeltx/modssb/ssbmodgui.ui @@ -6,19 +6,19 @@ 0 0 - 430 - 643 + 414 + 331 - + 0 0 - 430 + 414 0 @@ -36,13 +36,13 @@ 0 0 - 430 + 412 331 - 385 + 412 0 @@ -503,6 +503,7 @@ + Liberation Sans 8 @@ -524,6 +525,7 @@ + Liberation Sans 8 @@ -536,6 +538,7 @@ + Liberation Sans 8 @@ -557,6 +560,7 @@ + Liberation Sans 8 @@ -572,6 +576,7 @@ + Liberation Sans 8 @@ -593,6 +598,7 @@ + Liberation Sans 8 @@ -1202,6 +1208,12 @@ 284 + + + 0 + 0 + + Channel Spectrum @@ -1250,6 +1262,17 @@
gui/rollupcontents.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
GLSpectrum QWidget @@ -1262,34 +1285,23 @@
gui/glspectrumgui.h
1
+ + TickedSlider + QSlider +
gui/tickedslider.h
+
LevelMeterVU QWidget
gui/levelmeter.h
1
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
CWKeyerGUI QWidget
gui/cwkeyergui.h
1
- - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 -
- - TickedSlider - QSlider -
gui/tickedslider.h
-
diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index ae83b93a3..c0859f4f5 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -96,6 +96,18 @@ WFMMod::~WFMMod() delete m_thread; } +void WFMMod::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void WFMMod::start() { qDebug("WFMMod::start"); diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 0f05972bb..625164ef9 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -174,6 +174,8 @@ public: WFMMod(DeviceAPI *deviceAPI); virtual ~WFMMod(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/modwfm/wfmmodgui.h b/plugins/channeltx/modwfm/wfmmodgui.h index 3c14d722e..26ef490c7 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.h +++ b/plugins/channeltx/modwfm/wfmmodgui.h @@ -54,6 +54,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/remotesource/remotesource.cpp b/plugins/channeltx/remotesource/remotesource.cpp index 89af2e0db..5458f7294 100644 --- a/plugins/channeltx/remotesource/remotesource.cpp +++ b/plugins/channeltx/remotesource/remotesource.cpp @@ -88,6 +88,18 @@ RemoteSource::~RemoteSource() delete m_thread; } +void RemoteSource::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void RemoteSource::start() { qDebug("RemoteSource::start"); diff --git a/plugins/channeltx/remotesource/remotesource.h b/plugins/channeltx/remotesource/remotesource.h index ec9f27a11..6b3f831f5 100644 --- a/plugins/channeltx/remotesource/remotesource.h +++ b/plugins/channeltx/remotesource/remotesource.h @@ -155,8 +155,9 @@ public: RemoteSource(DeviceAPI *deviceAPI); virtual ~RemoteSource(); - virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/remotesource/remotesourcegui.h b/plugins/channeltx/remotesource/remotesourcegui.h index 6a095e0ee..6f8cd729e 100644 --- a/plugins/channeltx/remotesource/remotesourcegui.h +++ b/plugins/channeltx/remotesource/remotesourcegui.h @@ -55,6 +55,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/udpsource/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp index 68f9e9b91..f9a96d86f 100644 --- a/plugins/channeltx/udpsource/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -82,6 +82,18 @@ UDPSource::~UDPSource() delete m_thread; } +void UDPSource::setDeviceAPI(DeviceAPI *deviceAPI) +{ + if (deviceAPI != m_deviceAPI) + { + m_deviceAPI->removeChannelSourceAPI(this); + m_deviceAPI->removeChannelSource(this); + m_deviceAPI = deviceAPI; + m_deviceAPI->addChannelSource(this); + m_deviceAPI->addChannelSinkAPI(this); + } +} + void UDPSource::start() { qDebug("UDPSource::start"); diff --git a/plugins/channeltx/udpsource/udpsource.h b/plugins/channeltx/udpsource/udpsource.h index 4d9cb6297..4a4fe6caf 100644 --- a/plugins/channeltx/udpsource/udpsource.h +++ b/plugins/channeltx/udpsource/udpsource.h @@ -95,6 +95,8 @@ public: UDPSource(DeviceAPI *deviceAPI); virtual ~UDPSource(); virtual void destroy() { delete this; } + virtual void setDeviceAPI(DeviceAPI *deviceAPI); + virtual DeviceAPI *getDeviceAPI() { return m_deviceAPI; } virtual void start(); virtual void stop(); diff --git a/plugins/channeltx/udpsource/udpsourcegui.h b/plugins/channeltx/udpsource/udpsourcegui.h index f9cfdecf0..aa8afa1d8 100644 --- a/plugins/channeltx/udpsource/udpsourcegui.h +++ b/plugins/channeltx/udpsource/udpsourcegui.h @@ -57,6 +57,7 @@ public: 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; } public slots: void channelMarkerChangedByCursor(); diff --git a/plugins/channeltx/udpsource/udpsourcegui.ui b/plugins/channeltx/udpsource/udpsourcegui.ui index ee3d3a970..dcc1dc6d8 100644 --- a/plugins/channeltx/udpsource/udpsourcegui.ui +++ b/plugins/channeltx/udpsource/udpsourcegui.ui @@ -6,10 +6,16 @@ 0 0 - 395 - 403 + 414 + 400 + + + 0 + 0 + + 395 @@ -18,7 +24,7 @@ - 400 + 414 16777215 @@ -39,13 +45,13 @@ 2 2 - 390 + 412 221 - 390 + 412 0 @@ -190,6 +196,15 @@ + + + + 26 + 26 + 26 + + + @@ -210,6 +225,15 @@ + + + + 26 + 26 + 26 + + + @@ -230,11 +254,21 @@ + + + + 26 + 26 + 26 + + + + Liberation Sans 8 @@ -1003,6 +1037,12 @@ 156 + + + 0 + 0 + + Channel Spectrum @@ -1024,6 +1064,12 @@ + + + 0 + 0 + + Liberation Mono @@ -1045,6 +1091,17 @@
gui/rollupcontents.h
1 + + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
GLSpectrum QWidget @@ -1057,23 +1114,12 @@
gui/glspectrumgui.h
1
- - ValueDialZ - QWidget -
gui/valuedialz.h
- 1 -
LevelMeterVU QWidget
gui/levelmeter.h
1
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
diff --git a/plugins/samplesink/testsink/testsinkgui.ui b/plugins/samplesink/testsink/testsinkgui.ui index 545630c60..267f0a318 100644 --- a/plugins/samplesink/testsink/testsinkgui.ui +++ b/plugins/samplesink/testsink/testsinkgui.ui @@ -7,7 +7,7 @@ 0 0 360 - 320 + 350
@@ -293,9 +293,15 @@ + + + 0 + 0 + + - 200 + 354 200 @@ -308,24 +314,37 @@ - + + + + 0 + 0 + + + + + 354 + 30 + + +
+ + ButtonSwitch + QToolButton +
gui/buttonswitch.h
+
ValueDial QWidget
gui/valuedial.h
1
- - ButtonSwitch - QToolButton -
gui/buttonswitch.h
-
GLSpectrum QWidget diff --git a/sdrbase/channel/channelapi.cpp b/sdrbase/channel/channelapi.cpp index 557359d4a..861507547 100644 --- a/sdrbase/channel/channelapi.cpp +++ b/sdrbase/channel/channelapi.cpp @@ -28,7 +28,6 @@ ChannelAPI::ChannelAPI(const QString& uri, StreamType streamType) : m_uri(uri), m_indexInDeviceSet(-1), m_deviceSetIndex(0), - m_deviceAPI(0), m_uid(UidCalculator::getNewObjectId()) { connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); diff --git a/sdrbase/channel/channelapi.h b/sdrbase/channel/channelapi.h index dd284db0a..b7168d1b8 100644 --- a/sdrbase/channel/channelapi.h +++ b/sdrbase/channel/channelapi.h @@ -52,6 +52,8 @@ public: ChannelAPI(const QString& name, StreamType streamType); virtual ~ChannelAPI() {} virtual void destroy() = 0; + virtual void setDeviceAPI(DeviceAPI*) = 0; + virtual DeviceAPI *getDeviceAPI() = 0; virtual void getIdentifier(QString& id) = 0; virtual QString getIdentifier() const = 0; @@ -129,8 +131,6 @@ public: int getDeviceSetIndex() const { return m_deviceSetIndex; } void setDeviceSetIndex(int deviceSetIndex) { m_deviceSetIndex = deviceSetIndex; } - DeviceAPI *getDeviceAPI() { return m_deviceAPI; } - void setDeviceAPI(DeviceAPI *deviceAPI) { m_deviceAPI = deviceAPI; } uint64_t getUID() const { return m_uid; } // MIMO support @@ -167,7 +167,6 @@ private: int m_indexInDeviceSet; int m_deviceSetIndex; - DeviceAPI *m_deviceAPI; uint64_t m_uid; signals: diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index 95842d5aa..d83e53ec2 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -27,6 +27,7 @@ set(sdrgui_SOURCES gui/cwkeyergui.cpp gui/datetimedelegate.cpp gui/decimaldelegate.cpp + gui/devicesetselectiondialog.cpp gui/devicesetpresetsdialog.cpp gui/devicestreamselectiondialog.cpp gui/deviceuserargsdialog.cpp @@ -124,6 +125,7 @@ set(sdrgui_HEADERS gui/cwkeyergui.h gui/datetimedelegate.h gui/decimaldelegate.h + gui/devicesetselectiondialog.h gui/devicesetpresetsdialog.h gui/devicestreamselectiondialog.h gui/deviceuserargsdialog.h diff --git a/sdrgui/channel/channelgui.cpp b/sdrgui/channel/channelgui.cpp index 89f008f96..1ad76e619 100644 --- a/sdrgui/channel/channelgui.cpp +++ b/sdrgui/channel/channelgui.cpp @@ -28,6 +28,7 @@ #include "mainwindow.h" #include "gui/workspaceselectiondialog.h" +#include "gui/devicesetselectiondialog.h" #include "gui/rollupcontents.h" #include "channelgui.h" @@ -97,6 +98,12 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_duplicateButton->setIcon(m_duplicateIcon); m_duplicateButton->setToolTip("Duplicate channel"); + m_moveToDeviceButton = new QPushButton(); + m_moveToDeviceButton->setFixedSize(20, 20); + QIcon moveRoundIcon(":/exit_round.png"); + m_moveToDeviceButton->setIcon(moveRoundIcon); + m_moveToDeviceButton->setToolTip("Move to another device"); + m_statusFrequency = new QLabel(); // QFont font = m_statusFrequency->font(); // font.setPointSize(8); @@ -142,6 +149,7 @@ ChannelGUI::ChannelGUI(QWidget *parent) : m_bottomLayout = new QHBoxLayout(); m_bottomLayout->setContentsMargins(0, 0, 0, 0); m_bottomLayout->addWidget(m_duplicateButton); + m_bottomLayout->addWidget(m_moveToDeviceButton); m_bottomLayout->addWidget(m_statusFrequency); m_bottomLayout->addWidget(m_statusLabel); m_sizeGripBottomRight = new QSizeGrip(this); @@ -165,6 +173,7 @@ ChannelGUI::ChannelGUI(QWidget *parent) : connect(m_hideButton, SIGNAL(clicked()), this, SLOT(hide())); connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close())); connect(m_duplicateButton, SIGNAL(clicked()), this, SLOT(duplicateChannel())); + connect(m_moveToDeviceButton, SIGNAL(clicked()), this, SLOT(openMoveToDeviceSetDialog())); connect( m_rollupContents, @@ -185,6 +194,8 @@ ChannelGUI::~ChannelGUI() delete m_layouts; delete m_statusLabel; delete m_statusFrequency; + delete m_moveToDeviceButton; + delete m_duplicateButton; delete m_closeButton; delete m_hideButton; delete m_shrinkButton; @@ -280,10 +291,19 @@ void ChannelGUI::onWidgetRolled(QWidget *widget, bool show) void ChannelGUI::duplicateChannel() { - qDebug("ChannelGUI::duplicateChannel"); emit duplicateChannelEmitted(); } +void ChannelGUI::openMoveToDeviceSetDialog() +{ + DeviceSetSelectionDialog dialog(MainWindow::getInstance()->getDeviceUISets(), m_deviceSetIndex, this); + dialog.exec(); + + if (dialog.hasChanged() && (dialog.getSelectedIndex() != m_deviceSetIndex)) { + emit moveToDeviceSet(dialog.getSelectedIndex()); + } +} + void ChannelGUI::shrinkWindow() { qDebug("ChannelGUI::shrinkWindow"); diff --git a/sdrgui/channel/channelgui.h b/sdrgui/channel/channelgui.h index 7ab78dc6d..28a8b7434 100644 --- a/sdrgui/channel/channelgui.h +++ b/sdrgui/channel/channelgui.h @@ -31,6 +31,7 @@ class QVBoxLayout; class QHBoxLayout; class QSizeGrip; class RollupContents; +class ChannelMarker; class SDRGUI_API ChannelGUI : public QMdiSubWindow { @@ -66,6 +67,7 @@ public: virtual QColor getTitleColor() const = 0; virtual void zetHidden(bool hidden) = 0; virtual bool getHidden() const = 0; + virtual ChannelMarker& getChannelMarker() = 0; virtual MessageQueue* getInputMessageQueue() = 0; @@ -114,6 +116,7 @@ private: QPushButton *m_hideButton; QPushButton *m_closeButton; QPushButton *m_duplicateButton; + QPushButton *m_moveToDeviceButton; QLabel *m_statusFrequency; QLabel *m_statusLabel; QVBoxLayout *m_layouts; @@ -132,12 +135,14 @@ private slots: void openMoveToWorkspaceDialog(); void onWidgetRolled(QWidget *widget, bool show); void duplicateChannel(); + void openMoveToDeviceSetDialog(); signals: void closing(); void moveToWorkspace(int workspaceIndex); void forceShrink(); void duplicateChannelEmitted(); + void moveToDeviceSet(int deviceSetIndex); }; #endif // SDRGUI_CHANNEL_CHANNELGUI_H_ diff --git a/sdrgui/device/deviceuiset.cpp b/sdrgui/device/deviceuiset.cpp index 90a8dd5f9..1adb6df0f 100644 --- a/sdrgui/device/deviceuiset.cpp +++ b/sdrgui/device/deviceuiset.cpp @@ -97,6 +97,11 @@ void DeviceUISet::addChannelMarker(ChannelMarker* channelMarker) m_spectrum->addChannelMarker(channelMarker); } +void DeviceUISet::removeChannelMarker(ChannelMarker* channelMarker) +{ + m_spectrum->removeChannelMarker(channelMarker); +} + void DeviceUISet::registerRxChannelInstance(ChannelAPI *channelAPI, ChannelGUI* channelGUI) { m_channelInstanceRegistrations.append(ChannelInstanceRegistration(channelAPI, channelGUI, 0)); @@ -136,6 +141,20 @@ void DeviceUISet::registerChannelInstance(ChannelAPI *channelAPI, ChannelGUI* ch ); } +void DeviceUISet::unregisterChannelInstanceAt(int channelIndex) +{ + if ((channelIndex >= 0) && (channelIndex < m_channelInstanceRegistrations.count())) + { + m_channelInstanceRegistrations.removeAt(channelIndex); + m_deviceSet->removeChannelInstanceAt(channelIndex); + + // Renumerate + for (int i = 0; i < m_channelInstanceRegistrations.count(); i++) { + m_channelInstanceRegistrations.at(i).m_gui->setIndex(i); + } + } +} + void DeviceUISet::freeChannels() { for(int i = 0; i < m_channelInstanceRegistrations.count(); i++) @@ -331,6 +350,12 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA this, [=](){ MainWindow::getInstance()->channelDuplicate(rxChannelGUI); } ); + QObject::connect( + rxChannelGUI, + &ChannelGUI::moveToDeviceSet, + this, + [=](int dsIndexDest){ MainWindow::getInstance()->channelMoveToDeviceSet(rxChannelGUI, dsIndexDest); } + ); } } } @@ -451,6 +476,12 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA this, [=](){ MainWindow::getInstance()->channelDuplicate(txChannelGUI); } ); + QObject::connect( + txChannelGUI, + &ChannelGUI::moveToDeviceSet, + this, + [=](int dsIndexDest){ MainWindow::getInstance()->channelMoveToDeviceSet(txChannelGUI, dsIndexDest); } + ); } } } @@ -573,6 +604,12 @@ void DeviceUISet::loadMIMOChannelSettings(const Preset *preset, PluginAPI *plugi this, [=](){ MainWindow::getInstance()->channelDuplicate(mimoChannelGUI); } ); + QObject::connect( + mimoChannelGUI, + &ChannelGUI::moveToDeviceSet, + this, + [=](int dsIndexDest){ MainWindow::getInstance()->channelMoveToDeviceSet(mimoChannelGUI, dsIndexDest); } + ); } } } diff --git a/sdrgui/device/deviceuiset.h b/sdrgui/device/deviceuiset.h index 397944c25..f7572f790 100644 --- a/sdrgui/device/deviceuiset.h +++ b/sdrgui/device/deviceuiset.h @@ -73,9 +73,10 @@ public: void setIndex(int deviceSetIndex); int getIndex() const { return m_deviceSetIndex; } - GLSpectrum *getSpectrum() { return m_spectrum; } //!< Direct spectrum getter + GLSpectrum *getSpectrum() { return m_spectrum; } //!< Direct spectrum getter void setSpectrumScalingFactor(float scalef); - void addChannelMarker(ChannelMarker* channelMarker); //!< Add channel marker to spectrum + void addChannelMarker(ChannelMarker* channelMarker); //!< Add channel marker to spectrum + void removeChannelMarker(ChannelMarker* channelMarker); //!< Remove channel marker from spectrum int getNumberOfChannels() const { return m_channelInstanceRegistrations.size(); } void freeChannels(); @@ -94,6 +95,7 @@ public: void registerRxChannelInstance(ChannelAPI *channelAPI, ChannelGUI* channelGUI); void registerTxChannelInstance(ChannelAPI *channelAPI, ChannelGUI* channelGUI); void registerChannelInstance(ChannelAPI *channelAPI, ChannelGUI* channelGUI); + void unregisterChannelInstanceAt(int channelIndex); // These are the number of channel types available for selection void setNumberOfAvailableRxChannels(int number) { m_nbAvailableRxChannels = number; } diff --git a/sdrgui/gui/devicesetselectiondialog.cpp b/sdrgui/gui/devicesetselectiondialog.cpp new file mode 100644 index 000000000..dc836cfbf --- /dev/null +++ b/sdrgui/gui/devicesetselectiondialog.cpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2022 F4EXB // +// written by Edouard Griffiths // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// (at your option) any later version. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#include "device/deviceuiset.h" +#include "device/devicegui.h" +#include "device/deviceapi.h" +#include "devicesetselectiondialog.h" + +#include "ui_workspaceselectiondialog.h" + +DeviceSetSelectionDialog::DeviceSetSelectionDialog(std::vector& deviceUIs, int channelDeviceSetIndex, QWidget *parent) : + QDialog(parent), + ui(new Ui::WorkspaceSelectionDialog), + m_deviceUIs(deviceUIs), + m_channelDeviceSetIndex(channelDeviceSetIndex), + m_hasChanged(false) +{ + ui->setupUi(this); + setWindowTitle("Device"); // Change window title + + DeviceUISet *originDeviceUISet = deviceUIs[channelDeviceSetIndex]; + int originDeviceType = (int) originDeviceUISet->m_deviceGUI->getDeviceType(); + + for (int i = 0; i < (int) m_deviceUIs.size(); i++) + { + DeviceUISet *deviceUISet = m_deviceUIs[i]; + + if ((int) deviceUISet->m_deviceGUI->getDeviceType() == originDeviceType) + { + ui->workspaceList->addItem(tr("%1:%2 %3") + .arg(getDeviceTypeChar(originDeviceType)) + .arg(i) + .arg(deviceUISet->m_deviceAPI->getSamplingDeviceDisplayName().split(" ")[0]) + ); + m_deviceSetIndexes.push_back(i); + } + } +} + +DeviceSetSelectionDialog::~DeviceSetSelectionDialog() +{ + delete ui; +} + +void DeviceSetSelectionDialog::accept() +{ + m_selectedDeviceSetIndex = m_deviceSetIndexes[ui->workspaceList->currentRow()]; + m_hasChanged = true; + QDialog::accept(); +} diff --git a/sdrgui/gui/devicesetselectiondialog.h b/sdrgui/gui/devicesetselectiondialog.h new file mode 100644 index 000000000..b59fd1fee --- /dev/null +++ b/sdrgui/gui/devicesetselectiondialog.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2022 F4EXB // +// written by Edouard Griffiths // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// (at your option) any later version. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef SDRGUI_GUI_DEVICESETSELECTIONDIALOG_H_ +#define SDRGUI_GUI_DEVICESETSELECTIONDIALOG_H_ + +#include + +#include "export.h" + +namespace Ui { + class WorkspaceSelectionDialog; +} + +class DeviceUISet; + +class SDRGUI_API DeviceSetSelectionDialog : public QDialog +{ + Q_OBJECT +public: + explicit DeviceSetSelectionDialog(std::vector& deviceUIs, int channelDeviceSetIndex, QWidget *parent = nullptr); + ~DeviceSetSelectionDialog(); + + bool hasChanged() const { return m_hasChanged; } + int getSelectedIndex() const { return m_selectedDeviceSetIndex; } + +private: + Ui::WorkspaceSelectionDialog *ui; + std::vector& m_deviceUIs; + std::vector m_deviceSetIndexes; + int m_channelDeviceSetIndex; + int m_selectedDeviceSetIndex; + bool m_hasChanged; + + QString getDeviceTypeChar(int deviceType) + { + switch(deviceType) + { + case 0: + return "R"; + break; + case 1: + return "T"; + break; + case 2: + return "M"; + break; + default: + return "X"; + break; + } + } + +private slots: + void accept(); +}; + +#endif // SDRGUI_GUI_WORKSPACESELECTIONDIALOG_H_ diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 44aa30a21..99d0495e2 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -1759,14 +1759,14 @@ void MainWindow::addWorkspace() m_workspaces.back(), &Workspace::addTxDevice, this, - [=](Workspace *inWorkspace, int deviceIndex) { this->sampleSourceAdd(inWorkspace, inWorkspace, deviceIndex); } + [=](Workspace *inWorkspace, int deviceIndex) { this->sampleSinkAdd(inWorkspace, inWorkspace, deviceIndex); } ); QObject::connect( m_workspaces.back(), &Workspace::addMIMODevice, this, - [=](Workspace *inWorkspace, int deviceIndex) { this->sampleSourceAdd(inWorkspace, inWorkspace, deviceIndex); } + [=](Workspace *inWorkspace, int deviceIndex) { this->sampleMIMOAdd(inWorkspace, inWorkspace, deviceIndex); } ); QObject::connect( @@ -2119,22 +2119,64 @@ void MainWindow::sampleMIMOChange(int deviceSetIndex, int newDeviceIndex, Worksp } } -void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) +void MainWindow::channelMoveToDeviceSet(ChannelGUI *gui, int dsIndexDestination) { - int deviceSetIndex = sourceChannelGUI->getDeviceSetIndex(); - int channelIndex = sourceChannelGUI->getIndex(); + int deviceSetIndex = gui->getDeviceSetIndex(); + int channelIndex = gui->getIndex(); + qDebug("MainWindow::channelMoveToDeviceSet: %s at %d:%d to %d", + qPrintable(gui->getTitle()), deviceSetIndex, channelIndex, dsIndexDestination); - qDebug("MainWindow::channelDuplicate: %s at %d:%d in workspace %d", - qPrintable(sourceChannelGUI->getTitle()), deviceSetIndex, channelIndex, sourceChannelGUI->getWorkspaceIndex()); - - if (deviceSetIndex < (int) m_deviceUIs.size()) + if ((deviceSetIndex < (int) m_deviceUIs.size()) && (dsIndexDestination < (int) m_deviceUIs.size())) { DeviceUISet *deviceUI = m_deviceUIs[deviceSetIndex]; - ChannelAPI *sourceChannelAPI = deviceUI->getChannelAt(channelIndex); - DeviceAPI *deviceAPI = deviceUI->m_deviceAPI; - ChannelGUI *gui = nullptr; + DeviceUISet *destDeviceUI = m_deviceUIs[dsIndexDestination]; + ChannelAPI *channelAPI = deviceUI->getChannelAt(channelIndex); + deviceUI->unregisterChannelInstanceAt(channelIndex); - if (deviceUI->m_deviceSourceEngine) // source device => Rx channels + if (deviceUI->m_deviceSourceEngine) // source devices + { + destDeviceUI->registerRxChannelInstance(channelAPI, gui); + } + else if (deviceUI->m_deviceSinkEngine) // sink devices + { + destDeviceUI->registerTxChannelInstance(channelAPI, gui); + } + else if (deviceUI->m_deviceMIMOEngine) // MIMO devices + { + destDeviceUI->registerChannelInstance(channelAPI, gui); + } + + gui->setIndex(channelAPI->getIndexInDeviceSet()); + gui->setDeviceSetIndex(dsIndexDestination); + DeviceAPI *destDeviceAPI = destDeviceUI->m_deviceAPI; + gui->setToolTip(destDeviceAPI->getSamplingDeviceDisplayName()); + channelAPI->setDeviceAPI(destDeviceAPI); + deviceUI->removeChannelMarker(&gui->getChannelMarker()); + destDeviceUI->addChannelMarker(&gui->getChannelMarker()); + } +} + +void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) +{ + channelDuplicateToDeviceSet(sourceChannelGUI, sourceChannelGUI->getDeviceSetIndex()); // Duplicate in same device set +} + +void MainWindow::channelDuplicateToDeviceSet(ChannelGUI *sourceChannelGUI, int dsIndexDestination) +{ + int dsIndexSource = sourceChannelGUI->getDeviceSetIndex(); + int sourceChannelIndex = sourceChannelGUI->getIndex(); + + qDebug("MainWindow::channelDuplicateToDeviceSet: %s at %d:%d to %d in workspace %d", + qPrintable(sourceChannelGUI->getTitle()), dsIndexSource, sourceChannelIndex, dsIndexDestination, sourceChannelGUI->getWorkspaceIndex()); + + if ((dsIndexSource < (int) m_deviceUIs.size()) && (dsIndexDestination < (int) m_deviceUIs.size())) + { + DeviceUISet *sourceDeviceUI = m_deviceUIs[dsIndexSource]; + ChannelAPI *sourceChannelAPI = sourceDeviceUI->getChannelAt(sourceChannelIndex); + ChannelGUI *destChannelGUI = nullptr; + DeviceUISet *destDeviceUI = m_deviceUIs[dsIndexDestination]; + + if (destDeviceUI->m_deviceSourceEngine) // source device => Rx channels { PluginAPI::ChannelRegistrations *channelRegistrations = m_pluginManager->getRxChannelRegistrations(); PluginInterface *pluginInterface = nullptr; @@ -2152,16 +2194,16 @@ void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) { ChannelAPI *channelAPI; BasebandSampleSink *rxChannel; - pluginInterface->createRxChannel(deviceUI->m_deviceAPI, &rxChannel, &channelAPI); - gui = pluginInterface->createRxChannelGUI(deviceUI, rxChannel); - deviceUI->registerRxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceRx); - gui->setIndex(channelAPI->getIndexInDeviceSet()); + pluginInterface->createRxChannel(destDeviceUI->m_deviceAPI, &rxChannel, &channelAPI); + destChannelGUI = pluginInterface->createRxChannelGUI(destDeviceUI, rxChannel); + destDeviceUI->registerRxChannelInstance(channelAPI, destChannelGUI); + destChannelGUI->setDeviceType(ChannelGUI::DeviceRx); + destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); - gui->deserialize(b); + destChannelGUI->deserialize(b); } } - else if (deviceUI->m_deviceSinkEngine) // sink device => Tx channels + else if (destDeviceUI->m_deviceSinkEngine) // sink device => Tx channels { PluginAPI::ChannelRegistrations *channelRegistrations = m_pluginManager->getTxChannelRegistrations(); // Available channel plugins PluginInterface *pluginInterface = nullptr; @@ -2179,16 +2221,16 @@ void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) { ChannelAPI *channelAPI; BasebandSampleSource *txChannel; - pluginInterface->createTxChannel(deviceUI->m_deviceAPI, &txChannel, &channelAPI); - gui = pluginInterface->createTxChannelGUI(deviceUI, txChannel); - deviceUI->registerTxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceTx); - gui->setIndex(channelAPI->getIndexInDeviceSet()); + pluginInterface->createTxChannel(destDeviceUI->m_deviceAPI, &txChannel, &channelAPI); + destChannelGUI = pluginInterface->createTxChannelGUI(destDeviceUI, txChannel); + destDeviceUI->registerTxChannelInstance(channelAPI, destChannelGUI); + destChannelGUI->setDeviceType(ChannelGUI::DeviceTx); + destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); - gui->deserialize(b); + destChannelGUI->deserialize(b); } } - else if (deviceUI->m_deviceMIMOEngine) // MIMO device => Any type of channel is possible + else if (destDeviceUI->m_deviceMIMOEngine) // MIMO device => Any type of channel is possible { PluginAPI::ChannelRegistrations *rxChannelRegistrations = m_pluginManager->getRxChannelRegistrations(); PluginAPI::ChannelRegistrations *txChannelRegistrations = m_pluginManager->getTxChannelRegistrations(); @@ -2208,13 +2250,13 @@ void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) { ChannelAPI *channelAPI; BasebandSampleSink *rxChannel; - pluginInterface->createRxChannel(deviceUI->m_deviceAPI, &rxChannel, &channelAPI); - gui = pluginInterface->createRxChannelGUI(deviceUI, rxChannel); - deviceUI->registerRxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceMIMO); - gui->setIndex(channelAPI->getIndexInDeviceSet()); + pluginInterface->createRxChannel(destDeviceUI->m_deviceAPI, &rxChannel, &channelAPI); + destChannelGUI = pluginInterface->createRxChannelGUI(destDeviceUI, rxChannel); + destDeviceUI->registerRxChannelInstance(channelAPI, destChannelGUI); + destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); - gui->deserialize(b); + destChannelGUI->deserialize(b); } else { @@ -2231,13 +2273,13 @@ void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) { ChannelAPI *channelAPI; BasebandSampleSource *txChannel; - pluginInterface->createTxChannel(deviceUI->m_deviceAPI, &txChannel, &channelAPI); - gui = pluginInterface->createTxChannelGUI(deviceUI, txChannel); - deviceUI->registerTxChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceMIMO); - gui->setIndex(channelAPI->getIndexInDeviceSet()); + pluginInterface->createTxChannel(destDeviceUI->m_deviceAPI, &txChannel, &channelAPI); + destChannelGUI = pluginInterface->createTxChannelGUI(destDeviceUI, txChannel); + destDeviceUI->registerTxChannelInstance(channelAPI, destChannelGUI); + destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); - gui->deserialize(b); + destChannelGUI->deserialize(b); } else { @@ -2254,42 +2296,49 @@ void MainWindow::channelDuplicate(ChannelGUI *sourceChannelGUI) { ChannelAPI *channelAPI; MIMOChannel *mimoChannel; - pluginInterface->createMIMOChannel(deviceUI->m_deviceAPI, &mimoChannel, &channelAPI); - gui = pluginInterface->createMIMOChannelGUI(deviceUI, mimoChannel); - deviceUI->registerChannelInstance(channelAPI, gui); - gui->setDeviceType(ChannelGUI::DeviceMIMO); - gui->setIndex(channelAPI->getIndexInDeviceSet()); + pluginInterface->createMIMOChannel(destDeviceUI->m_deviceAPI, &mimoChannel, &channelAPI); + destChannelGUI = pluginInterface->createMIMOChannelGUI(destDeviceUI, mimoChannel); + destDeviceUI->registerChannelInstance(channelAPI, destChannelGUI); + destChannelGUI->setDeviceType(ChannelGUI::DeviceMIMO); + destChannelGUI->setIndex(channelAPI->getIndexInDeviceSet()); QByteArray b = sourceChannelGUI->serialize(); - gui->deserialize(b); + destChannelGUI->deserialize(b); } } } } + DeviceAPI *destDeviceAPI = destDeviceUI->m_deviceAPI; int workspaceIndex = sourceChannelGUI->getWorkspaceIndex(); Workspace *workspace = workspaceIndex < m_workspaces.size() ? m_workspaces[sourceChannelGUI->getWorkspaceIndex()] : nullptr; - if (gui && workspace) + if (destChannelGUI && workspace) { QObject::connect( - gui, + destChannelGUI, &ChannelGUI::moveToWorkspace, this, - [=](int wsIndexDest){ this->channelMove(gui, wsIndexDest); } + [=](int wsIndexDest){ this->channelMove(destChannelGUI, wsIndexDest); } ); QObject::connect( - gui, + destChannelGUI, &ChannelGUI::duplicateChannelEmitted, this, - [=](){ this->channelDuplicate(gui); } + [=](){ this->channelDuplicate(destChannelGUI); } + ); + QObject::connect( + destChannelGUI, + &ChannelGUI::moveToDeviceSet, + this, + [=](int dsIndexDest){ this->channelMoveToDeviceSet(destChannelGUI, dsIndexDest); } ); - gui->setDeviceSetIndex(deviceSetIndex); - gui->setToolTip(deviceAPI->getSamplingDeviceDisplayName()); - gui->setWorkspaceIndex(workspace->getIndex()); + destChannelGUI->setDeviceSetIndex(dsIndexDestination); + destChannelGUI->setToolTip(destDeviceAPI->getSamplingDeviceDisplayName()); + destChannelGUI->setWorkspaceIndex(workspace->getIndex()); qDebug("MainWindow::channelDuplicate: adding %s to workspace #%d", - qPrintable(gui->getTitle()), workspace->getIndex()); - workspace->addToMdiArea((QMdiSubWindow*) gui); + qPrintable(destChannelGUI->getTitle()), workspace->getIndex()); + workspace->addToMdiArea((QMdiSubWindow*) destChannelGUI); } } } @@ -2385,6 +2434,12 @@ void MainWindow::channelAddClicked(Workspace *workspace, int deviceSetIndex, int this, [=](){ this->channelDuplicate(gui); } ); + QObject::connect( + gui, + &ChannelGUI::moveToDeviceSet, + this, + [=](int dsIndexDest){ this->channelMoveToDeviceSet(gui, dsIndexDest); } + ); gui->setDeviceSetIndex(deviceSetIndex); gui->setToolTip(deviceAPI->getSamplingDeviceDisplayName()); diff --git a/sdrgui/mainwindow.h b/sdrgui/mainwindow.h index adf825bc3..e49fa6d9c 100644 --- a/sdrgui/mainwindow.h +++ b/sdrgui/mainwindow.h @@ -81,8 +81,9 @@ public: int getNumberOfWorkspaces() const { return m_workspaces.size(); } public slots: - void channelMove(ChannelGUI *gui, int wsIndexDestnation); + void channelMove(ChannelGUI *gui, int wsIndexDestination); void channelDuplicate(ChannelGUI *gui); + void channelMoveToDeviceSet(ChannelGUI *gui, int dsIndexDestination); private: enum { @@ -146,6 +147,7 @@ private: void removeFeatureSet(unsigned int featureSetIndex); void removeAllFeatureSets(); void deleteChannel(int deviceSetIndex, int channelIndex); + void channelDuplicateToDeviceSet(ChannelGUI *sourceChannelGUI, int dsIndexDestination); void sampleDeviceChange(int deviceType, int deviceSetIndex, int newDeviceIndex, Workspace *workspace); void sampleSourceChange(int deviceSetIndex, int newDeviceIndex, Workspace *workspace); void sampleSinkChange(int deviceSetIndex, int newDeviceIndex, Workspace *workspace); diff --git a/sdrgui/resources/exit_round.png b/sdrgui/resources/exit_round.png new file mode 100644 index 000000000..ee6c185f8 Binary files /dev/null and b/sdrgui/resources/exit_round.png differ diff --git a/sdrgui/resources/res.qrc b/sdrgui/resources/res.qrc index 4b39bd761..81fc74a52 100644 --- a/sdrgui/resources/res.qrc +++ b/sdrgui/resources/res.qrc @@ -134,6 +134,7 @@ hide.png channels.png channels_add.png + exit_round.png LiberationMono-Regular.ttf LiberationSans-Regular.ttf