1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 15:33:34 -04:00

Multi device support: use device API for channel registrations

This commit is contained in:
f4exb
2016-05-16 19:37:53 +02:00
parent e1e3df466f
commit 2f1c9eac6e
34 changed files with 155 additions and 82 deletions
+6 -1
View File
@@ -30,6 +30,8 @@
#include "mainwindow.h"
#include "udpsrc.h"
const QString UDPSrcGUI::m_channelID = "sdrangel.channel.udpsrc";
UDPSrcGUI* UDPSrcGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
{
UDPSrcGUI* gui = new UDPSrcGUI(pluginAPI, deviceAPI);
@@ -260,7 +262,10 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setColor(Qt::green);
m_channelMarker.setVisible(true);
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
@@ -272,7 +277,7 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent
UDPSrcGUI::~UDPSrcGUI()
{
m_pluginAPI->removeChannelInstance(this);
m_deviceAPI->removeChannelInstance(this);
m_deviceAPI->removeThreadedSink(m_threadedChannelizer);
delete m_threadedChannelizer;
delete m_channelizer;