mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Tx Channel plugins now handled via DeviceUISet
This commit is contained in:
parent
e206fc84a8
commit
d5d7d40102
@ -23,6 +23,7 @@
|
|||||||
#include "ammodgui.h"
|
#include "ammodgui.h"
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/upchannelizer.h"
|
#include "dsp/upchannelizer.h"
|
||||||
|
|
||||||
#include "ui_ammodgui.h"
|
#include "ui_ammodgui.h"
|
||||||
@ -35,9 +36,9 @@
|
|||||||
|
|
||||||
const QString AMModGUI::m_channelID = "sdrangel.channeltx.modam";
|
const QString AMModGUI::m_channelID = "sdrangel.channeltx.modam";
|
||||||
|
|
||||||
AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
AMModGUI* gui = new AMModGUI(pluginAPI, deviceAPI);
|
AMModGUI* gui = new AMModGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,11 +268,11 @@ void AMModGUI::onMenuDoubleClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::AMModGUI),
|
ui(new Ui::AMModGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
@ -288,7 +289,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_amMod = new AMMod(m_deviceAPI);
|
m_amMod = new AMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||||
m_amMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_amMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
@ -305,9 +306,9 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
ui->play->setEnabled(false);
|
ui->play->setEnabled(false);
|
||||||
ui->play->setChecked(false);
|
ui->play->setChecked(false);
|
||||||
@ -326,7 +327,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
|
|||||||
|
|
||||||
AMModGUI::~AMModGUI()
|
AMModGUI::~AMModGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_amMod;
|
delete m_amMod;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "ammodsettings.h"
|
#include "ammodsettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class AMMod;
|
class AMMod;
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ class AMModGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static AMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static AMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -83,7 +83,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::AMModGUI* ui;
|
Ui::AMModGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
AMModSettings m_settings;
|
AMModSettings m_settings;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
@ -101,7 +101,7 @@ private:
|
|||||||
AMMod::AMModInputAF m_modAFInput;
|
AMMod::AMModInputAF m_modAFInput;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||||
virtual ~AMModGUI();
|
virtual ~AMModGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
||||||
QString("AM Modulator"),
|
QString("AM Modulator"),
|
||||||
QString("3.5.4"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -49,18 +49,18 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(AMModGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(AMModGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* AMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* AMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == AMModGUI::m_channelID)
|
if(channelName == AMModGUI::m_channelID)
|
||||||
{
|
{
|
||||||
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceAPI);
|
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AMModPlugin::createInstanceModAM(DeviceSinkAPI *deviceAPI)
|
void AMModPlugin::createInstanceModAM(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
AMModGUI::create(m_pluginAPI, deviceAPI);
|
AMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class AMModPlugin : public QObject, PluginInterface {
|
class AMModPlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -28,12 +28,12 @@ class AMModPlugin : public QObject, PluginInterface {
|
|||||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ammod")
|
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ammod")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AMModPlugin(QObject* parent = NULL);
|
explicit AMModPlugin(QObject* parent = 0);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceModAM(DeviceSinkAPI *deviceAPI);
|
void createInstanceModAM(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_AMMODPLUGIN_H
|
#endif // INCLUDE_AMMODPLUGIN_H
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "gui/basicchannelsettingswidget.h"
|
#include "gui/basicchannelsettingswidget.h"
|
||||||
@ -36,9 +37,9 @@
|
|||||||
|
|
||||||
const QString ATVModGUI::m_channelID = "sdrangel.channeltx.modatv";
|
const QString ATVModGUI::m_channelID = "sdrangel.channeltx.modatv";
|
||||||
|
|
||||||
ATVModGUI* ATVModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
ATVModGUI* ATVModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
ATVModGUI* gui = new ATVModGUI(pluginAPI, deviceAPI);
|
ATVModGUI* gui = new ATVModGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -586,11 +587,11 @@ void ATVModGUI::onMenuDoubleClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::ATVModGUI),
|
ui(new Ui::ATVModGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
@ -608,7 +609,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_atvMod = new ATVMod(m_deviceAPI);
|
m_atvMod = new ATVMod(m_deviceUISet->m_deviceSinkAPI);
|
||||||
m_atvMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_atvMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
@ -624,9 +625,9 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
resetToDefaults();
|
resetToDefaults();
|
||||||
|
|
||||||
@ -649,7 +650,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
ATVModGUI::~ATVModGUI()
|
ATVModGUI::~ATVModGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_atvMod;
|
delete m_atvMod;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "atvmodsettings.h"
|
#include "atvmodsettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class ATVMod;
|
class ATVMod;
|
||||||
class QMessageBox;
|
class QMessageBox;
|
||||||
@ -40,7 +40,7 @@ class ATVModGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -99,7 +99,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::ATVModGUI* ui;
|
Ui::ATVModGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
ATVModSettings m_settings;
|
ATVModSettings m_settings;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
@ -119,7 +119,7 @@ private:
|
|||||||
int m_rfSliderDivisor;
|
int m_rfSliderDivisor;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||||
virtual ~ATVModGUI();
|
virtual ~ATVModGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
|
||||||
QString("ATV Modulator"),
|
QString("ATV Modulator"),
|
||||||
QString("3.7.5"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -49,20 +49,20 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(ATVModGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(ATVModGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* ATVModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* ATVModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == ATVModGUI::m_channelID)
|
if(channelName == ATVModGUI::m_channelID)
|
||||||
{
|
{
|
||||||
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceAPI);
|
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ATVModPlugin::createInstanceModATV(DeviceSinkAPI *deviceAPI)
|
void ATVModPlugin::createInstanceModATV(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
ATVModGUI::create(m_pluginAPI, deviceAPI);
|
ATVModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,12 +28,12 @@ class ATVModPlugin : public QObject, PluginInterface {
|
|||||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.atvmod")
|
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.atvmod")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ATVModPlugin(QObject* parent = NULL);
|
explicit ATVModPlugin(QObject* parent = 0);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceModATV(DeviceSinkAPI *deviceAPI);
|
void createInstanceModATV(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_MODATV_ATVMODPLUGIN_H_ */
|
#endif /* PLUGINS_CHANNELTX_MODATV_ATVMODPLUGIN_H_ */
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "util/db.h"
|
#include "util/db.h"
|
||||||
@ -34,9 +35,9 @@
|
|||||||
const QString NFMModGUI::m_channelID = "sdrangel.channeltx.modnfm";
|
const QString NFMModGUI::m_channelID = "sdrangel.channeltx.modnfm";
|
||||||
|
|
||||||
|
|
||||||
NFMModGUI* NFMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
NFMModGUI* NFMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
NFMModGUI* gui = new NFMModGUI(pluginAPI, deviceAPI);
|
NFMModGUI* gui = new NFMModGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,11 +285,11 @@ void NFMModGUI::onMenuDoubleClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::NFMModGUI),
|
ui(new Ui::NFMModGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
@ -316,7 +317,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_nfmMod = new NFMMod(m_deviceAPI);
|
m_nfmMod = new NFMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||||
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
@ -330,9 +331,9 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
ui->play->setEnabled(false);
|
ui->play->setEnabled(false);
|
||||||
ui->play->setChecked(false);
|
ui->play->setChecked(false);
|
||||||
@ -358,7 +359,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
NFMModGUI::~NFMModGUI()
|
NFMModGUI::~NFMModGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_nfmMod;
|
delete m_nfmMod;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "nfmmodsettings.h"
|
#include "nfmmodsettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
class NFMMod;
|
class NFMMod;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@ -38,7 +38,7 @@ class NFMModGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -86,7 +86,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::NFMModGUI* ui;
|
Ui::NFMModGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
NFMModSettings m_settings;
|
NFMModSettings m_settings;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
@ -104,7 +104,7 @@ private:
|
|||||||
NFMMod::NFMModInputAF m_modAFInput;
|
NFMMod::NFMModInputAF m_modAFInput;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||||
virtual ~NFMModGUI();
|
virtual ~NFMModGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
|
||||||
QString("NFM Modulator"),
|
QString("NFM Modulator"),
|
||||||
QString("3.7.4"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -49,18 +49,18 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(NFMModGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(NFMModGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* NFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* NFMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == NFMModGUI::m_channelID)
|
if(channelName == NFMModGUI::m_channelID)
|
||||||
{
|
{
|
||||||
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceAPI);
|
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NFMModPlugin::createInstanceModNFM(DeviceSinkAPI *deviceAPI)
|
void NFMModPlugin::createInstanceModNFM(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
NFMModGUI::create(m_pluginAPI, deviceAPI);
|
NFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class NFMModPlugin : public QObject, PluginInterface {
|
class NFMModPlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -28,12 +28,12 @@ class NFMModPlugin : public QObject, PluginInterface {
|
|||||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.nfmmod")
|
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.nfmmod")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit NFMModPlugin(QObject* parent = NULL);
|
explicit NFMModPlugin(QObject* parent = 0);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceModNFM(DeviceSinkAPI *deviceAPI);
|
void createInstanceModNFM(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_NFMMODPLUGIN_H
|
#endif // INCLUDE_NFMMODPLUGIN_H
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "ssbmodgui.h"
|
#include "ssbmodgui.h"
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "ui_ssbmodgui.h"
|
#include "ui_ssbmodgui.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
@ -34,9 +35,9 @@
|
|||||||
|
|
||||||
const QString SSBModGUI::m_channelID = "sdrangel.channeltx.modssb";
|
const QString SSBModGUI::m_channelID = "sdrangel.channeltx.modssb";
|
||||||
|
|
||||||
SSBModGUI* SSBModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
SSBModGUI* SSBModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
SSBModGUI* gui = new SSBModGUI(pluginAPI, deviceAPI);
|
SSBModGUI* gui = new SSBModGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,11 +440,11 @@ void SSBModGUI::onMenuDoubleClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::SSBModGUI),
|
ui(new Ui::SSBModGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
@ -462,7 +463,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||||
m_ssbMod = new SSBMod(m_deviceAPI, m_spectrumVis);
|
m_ssbMod = new SSBMod(m_deviceUISet->m_deviceSinkAPI, m_spectrumVis);
|
||||||
m_ssbMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_ssbMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
resetToDefaults();
|
resetToDefaults();
|
||||||
@ -488,9 +489,9 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
ui->cwKeyerGUI->setBuddies(m_ssbMod->getInputMessageQueue(), m_ssbMod->getCWKeyer());
|
ui->cwKeyerGUI->setBuddies(m_ssbMod->getInputMessageQueue(), m_ssbMod->getCWKeyer());
|
||||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||||
@ -509,7 +510,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
SSBModGUI::~SSBModGUI()
|
SSBModGUI::~SSBModGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeRxChannelInstance(this);
|
||||||
delete m_ssbMod;
|
delete m_ssbMod;
|
||||||
delete m_spectrumVis;
|
delete m_spectrumVis;
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "ssbmodsettings.h"
|
#include "ssbmodsettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class SSBMod;
|
class SSBMod;
|
||||||
class SpectrumVis;
|
class SpectrumVis;
|
||||||
@ -40,7 +40,7 @@ class SSBModGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -93,7 +93,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::SSBModGUI* ui;
|
Ui::SSBModGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
SSBModSettings m_settings;
|
SSBModSettings m_settings;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
@ -113,7 +113,7 @@ private:
|
|||||||
SSBMod::SSBModInputAF m_modAFInput;
|
SSBMod::SSBModInputAF m_modAFInput;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||||
virtual ~SSBModGUI();
|
virtual ~SSBModGUI();
|
||||||
|
|
||||||
int getEffectiveLowCutoff(int lowCutoff);
|
int getEffectiveLowCutoff(int lowCutoff);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
||||||
QString("SSB Modulator"),
|
QString("SSB Modulator"),
|
||||||
QString("3.7.5"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -49,18 +49,18 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(SSBModGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(SSBModGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* SSBModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* SSBModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == SSBModGUI::m_channelID)
|
if(channelName == SSBModGUI::m_channelID)
|
||||||
{
|
{
|
||||||
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceAPI);
|
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModPlugin::createInstanceModSSB(DeviceSinkAPI *deviceAPI)
|
void SSBModPlugin::createInstanceModSSB(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
SSBModGUI::create(m_pluginAPI, deviceAPI);
|
SSBModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class SSBModPlugin : public QObject, PluginInterface {
|
class SSBModPlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -28,12 +28,12 @@ class SSBModPlugin : public QObject, PluginInterface {
|
|||||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ssbmod")
|
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ssbmod")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SSBModPlugin(QObject* parent = NULL);
|
explicit SSBModPlugin(QObject* parent = 0);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceModSSB(DeviceSinkAPI *deviceAPI);
|
void createInstanceModSSB(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_SSBMODPLUGIN_H
|
#endif // INCLUDE_SSBMODPLUGIN_H
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/upchannelizer.h"
|
#include "dsp/upchannelizer.h"
|
||||||
#include "dsp/threadedbasebandsamplesource.h"
|
#include "dsp/threadedbasebandsamplesource.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
@ -35,9 +36,9 @@
|
|||||||
|
|
||||||
const QString WFMModGUI::m_channelID = "sdrangel.channeltx.modwfm";
|
const QString WFMModGUI::m_channelID = "sdrangel.channeltx.modwfm";
|
||||||
|
|
||||||
WFMModGUI* WFMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
WFMModGUI* WFMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
WFMModGUI* gui = new WFMModGUI(pluginAPI, deviceAPI);
|
WFMModGUI* gui = new WFMModGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,11 +274,11 @@ void WFMModGUI::onMenuDoubleClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::WFMModGUI),
|
ui(new Ui::WFMModGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelMarker(this),
|
m_channelMarker(this),
|
||||||
m_basicSettingsShown(false),
|
m_basicSettingsShown(false),
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
@ -305,7 +306,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_wfmMod = new WFMMod(m_deviceAPI);
|
m_wfmMod = new WFMMod(m_deviceUISet->m_deviceSinkAPI);
|
||||||
m_wfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
m_wfmMod->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
@ -319,9 +320,9 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
ui->play->setEnabled(false);
|
ui->play->setEnabled(false);
|
||||||
ui->play->setChecked(false);
|
ui->play->setChecked(false);
|
||||||
@ -342,7 +343,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
|||||||
|
|
||||||
WFMModGUI::~WFMModGUI()
|
WFMModGUI::~WFMModGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_wfmMod;
|
delete m_wfmMod;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "wfmmodsettings.h"
|
#include "wfmmodsettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class ThreadedBasebandSampleSource;
|
class ThreadedBasebandSampleSource;
|
||||||
class UpChannelizer;
|
class UpChannelizer;
|
||||||
@ -41,7 +41,7 @@ class WFMModGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -86,7 +86,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::WFMModGUI* ui;
|
Ui::WFMModGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
WFMModSettings m_settings;
|
WFMModSettings m_settings;
|
||||||
bool m_basicSettingsShown;
|
bool m_basicSettingsShown;
|
||||||
@ -106,7 +106,7 @@ private:
|
|||||||
WFMMod::WFMModInputAF m_modAFInput;
|
WFMMod::WFMModInputAF m_modAFInput;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||||
virtual ~WFMModGUI();
|
virtual ~WFMModGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
||||||
QString("WFM Modulator"),
|
QString("WFM Modulator"),
|
||||||
QString("3.7.4"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -49,18 +49,18 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(WFMModGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(WFMModGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* WFMModPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* WFMModPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == WFMModGUI::m_channelID)
|
if(channelName == WFMModGUI::m_channelID)
|
||||||
{
|
{
|
||||||
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceAPI);
|
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WFMModPlugin::createInstanceModWFM(DeviceSinkAPI *deviceAPI)
|
void WFMModPlugin::createInstanceModWFM(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
WFMModGUI::create(m_pluginAPI, deviceAPI);
|
WFMModGUI::create(m_pluginAPI, deviceUISet);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceModWFM(DeviceSinkAPI *deviceAPI);
|
void createInstanceModWFM(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_NFMMODPLUGIN_H
|
#endif // INCLUDE_NFMMODPLUGIN_H
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
@ -28,9 +29,9 @@
|
|||||||
|
|
||||||
const QString UDPSinkGUI::m_channelID = "sdrangel.channeltx.udpsink";
|
const QString UDPSinkGUI::m_channelID = "sdrangel.channeltx.udpsink";
|
||||||
|
|
||||||
UDPSinkGUI* UDPSinkGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI)
|
UDPSinkGUI* UDPSinkGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
UDPSinkGUI* gui = new UDPSinkGUI(pluginAPI, deviceAPI);
|
UDPSinkGUI* gui = new UDPSinkGUI(pluginAPI, deviceUISet);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,11 +103,11 @@ void UDPSinkGUI::handleSourceMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent) :
|
UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::UDPSinkGUI),
|
ui(new Ui::UDPSinkGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceUISet(deviceUISet),
|
||||||
m_channelPowerAvg(4, 1e-10),
|
m_channelPowerAvg(4, 1e-10),
|
||||||
m_inPowerAvg(4, 1e-10),
|
m_inPowerAvg(4, 1e-10),
|
||||||
m_tickCount(0),
|
m_tickCount(0),
|
||||||
@ -120,7 +121,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
|||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
m_spectrumVis = new SpectrumVis(ui->glSpectrum);
|
||||||
m_udpSink = new UDPSink(m_deviceAPI, m_spectrumVis);
|
m_udpSink = new UDPSink(m_deviceUISet->m_deviceSinkAPI, m_spectrumVis);
|
||||||
m_udpSink->setMessageQueueToGUI(getInputMessageQueue());
|
m_udpSink->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
ui->fmDeviation->setEnabled(false);
|
ui->fmDeviation->setEnabled(false);
|
||||||
@ -146,9 +147,9 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
|||||||
|
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
||||||
|
|
||||||
m_deviceAPI->registerChannelInstance(m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
|
||||||
m_deviceAPI->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceAPI->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
|
||||||
|
|
||||||
@ -161,7 +162,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
|
|||||||
|
|
||||||
UDPSinkGUI::~UDPSinkGUI()
|
UDPSinkGUI::~UDPSinkGUI()
|
||||||
{
|
{
|
||||||
m_deviceAPI->removeChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_udpSink;
|
delete m_udpSink;
|
||||||
delete m_spectrumVis;
|
delete m_spectrumVis;
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "udpsinksettings.h"
|
#include "udpsinksettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
class UDPSink;
|
class UDPSink;
|
||||||
class SpectrumVis;
|
class SpectrumVis;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ class UDPSinkGUI : public RollupWidget, public PluginInstanceGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
|
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -80,7 +80,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
Ui::UDPSinkGUI* ui;
|
Ui::UDPSinkGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceSinkAPI* m_deviceAPI;
|
DeviceUISet* m_deviceUISet;
|
||||||
SpectrumVis* m_spectrumVis;
|
SpectrumVis* m_spectrumVis;
|
||||||
UDPSink* m_udpSink;
|
UDPSink* m_udpSink;
|
||||||
MovingAverage<double> m_channelPowerAvg;
|
MovingAverage<double> m_channelPowerAvg;
|
||||||
@ -94,7 +94,7 @@ private:
|
|||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
|
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = NULL);
|
||||||
virtual ~UDPSinkGUI();
|
virtual ~UDPSinkGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
|
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
|
||||||
QString("UDP Channel Sink"),
|
QString("UDP Channel Sink"),
|
||||||
QString("3.7.5"),
|
QString("3.7.9"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
@ -50,11 +50,11 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI->registerTxChannel(UDPSinkGUI::m_channelID, this);
|
m_pluginAPI->registerTxChannel(UDPSinkGUI::m_channelID, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI)
|
PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if(channelName == UDPSinkGUI::m_channelID)
|
if(channelName == UDPSinkGUI::m_channelID)
|
||||||
{
|
{
|
||||||
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceAPI);
|
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceUISet);
|
||||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
return gui;
|
return gui;
|
||||||
@ -63,9 +63,9 @@ PluginInstanceGUI* UDPSinkPlugin::createTxChannel(const QString& channelName, De
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDPSinkPlugin::createInstanceUDPSink(DeviceSinkAPI *deviceAPI)
|
void UDPSinkPlugin::createInstanceUDPSink(DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
UDPSinkGUI::create(m_pluginAPI, deviceAPI);
|
UDPSinkGUI::create(m_pluginAPI, deviceUISet);
|
||||||
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
|
||||||
// m_pluginAPI->addChannelRollup(gui);
|
// m_pluginAPI->addChannelRollup(gui);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
class DeviceSinkAPI;
|
class DeviceUISet;
|
||||||
|
|
||||||
class UDPSinkPlugin : public QObject, PluginInterface {
|
class UDPSinkPlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -34,7 +34,7 @@ public:
|
|||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
|
|
||||||
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
|
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
@ -42,7 +42,7 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createInstanceUDPSink(DeviceSinkAPI *deviceAPI);
|
void createInstanceUDPSink(DeviceUISet *deviceUISet);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_UDPSINKPLUGIN_H
|
#endif // INCLUDE_UDPSINKPLUGIN_H
|
||||||
|
@ -319,7 +319,7 @@ void DeviceSinkAPI::loadChannelSettings(const Preset *preset, PluginAPI *pluginA
|
|||||||
if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel)
|
if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel)
|
||||||
{
|
{
|
||||||
qDebug("DeviceSinkAPI::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
qDebug("DeviceSinkAPI::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
||||||
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createTxChannel(channelConfig.m_channel, this));
|
//reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createTxChannel(channelConfig.m_channel, this));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,8 +273,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA
|
|||||||
if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel)
|
if((*channelRegistrations)[i].m_channelName == channelConfig.m_channel)
|
||||||
{
|
{
|
||||||
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
qDebug("DeviceUISet::loadChannelSettings: creating new channel [%s]", qPrintable(channelConfig.m_channel));
|
||||||
// TODO: replace m_deviceSinkAPI by this
|
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createTxChannel(channelConfig.m_channel, this));
|
||||||
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createTxChannel(channelConfig.m_channel, m_deviceSinkAPI));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,7 +485,7 @@ void MainWindow::loadPresetSettings(const Preset* preset, int tabIndex)
|
|||||||
{
|
{
|
||||||
deviceUI->m_spectrumGUI->deserialize(preset->getSpectrumConfig());
|
deviceUI->m_spectrumGUI->deserialize(preset->getSpectrumConfig());
|
||||||
deviceUI->m_deviceSinkAPI->loadSinkSettings(preset);
|
deviceUI->m_deviceSinkAPI->loadSinkSettings(preset);
|
||||||
deviceUI->m_deviceSinkAPI->loadChannelSettings(preset, m_pluginManager->getPluginAPI());
|
deviceUI->loadTxChannelSettings(preset, m_pluginManager->getPluginAPI());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ void MainWindow::savePresetSettings(Preset* preset, int tabIndex)
|
|||||||
preset->setSpectrumConfig(deviceUI->m_spectrumGUI->serialize());
|
preset->setSpectrumConfig(deviceUI->m_spectrumGUI->serialize());
|
||||||
preset->clearChannels();
|
preset->clearChannels();
|
||||||
preset->setSourcePreset(false);
|
preset->setSourcePreset(false);
|
||||||
deviceUI->m_deviceSinkAPI->saveChannelSettings(preset);
|
deviceUI->saveTxChannelSettings(preset);
|
||||||
deviceUI->m_deviceSinkAPI->saveSinkSettings(preset);
|
deviceUI->m_deviceSinkAPI->saveSinkSettings(preset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1034,7 +1034,7 @@ void MainWindow::on_channel_addClicked(bool checked __attribute__((unused)))
|
|||||||
QMessageBox::information(this, tr("Message"), tr("%1 channel(s) already in use. Multiple transmission channels is experimental. You may experience performance problems").arg(nbSources));
|
QMessageBox::information(this, tr("Message"), tr("%1 channel(s) already in use. Multiple transmission channels is experimental. You may experience performance problems").arg(nbSources));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI->m_deviceSinkAPI);
|
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,12 +61,15 @@ public:
|
|||||||
{ return 0; }
|
{ return 0; }
|
||||||
virtual PluginInstanceGUI* createRxChannel(
|
virtual PluginInstanceGUI* createRxChannel(
|
||||||
const QString& channelName __attribute__((unused)),
|
const QString& channelName __attribute__((unused)),
|
||||||
DeviceUISet *deviceAPI __attribute__((unused)) )
|
DeviceUISet *deviceUISet __attribute__((unused)) )
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
// channel Tx plugins
|
// channel Tx plugins
|
||||||
|
|
||||||
virtual PluginInstanceGUI* createTxChannel(const QString& channelName __attribute__((unused)), DeviceSinkAPI *deviceAPI __attribute__((unused)) ) { return 0; }
|
virtual PluginInstanceGUI* createTxChannel(
|
||||||
|
const QString& channelName __attribute__((unused)),
|
||||||
|
DeviceUISet *deviceUISet __attribute__((unused)) )
|
||||||
|
{ return 0; }
|
||||||
|
|
||||||
// device source plugins only
|
// device source plugins only
|
||||||
|
|
||||||
|
@ -627,11 +627,11 @@ void PluginManager::createRxChannelInstance(int channelPluginIndex, DeviceUISet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceSinkAPI *deviceAPI)
|
void PluginManager::createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet)
|
||||||
{
|
{
|
||||||
if (channelPluginIndex < m_txChannelRegistrations.size())
|
if (channelPluginIndex < m_txChannelRegistrations.size())
|
||||||
{
|
{
|
||||||
PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin;
|
PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin;
|
||||||
pluginInterface->createTxChannel(m_txChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI);
|
pluginInterface->createTxChannel(m_txChannelRegistrations[channelPluginIndex].m_channelName, deviceUISet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
|
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
void populateTxChannelComboBox(QComboBox *channels);
|
void populateTxChannelComboBox(QComboBox *channels);
|
||||||
void createTxChannelInstance(int channelPluginIndex, DeviceSinkAPI *deviceAPI);
|
void createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct SamplingDeviceRegistration {
|
struct SamplingDeviceRegistration {
|
||||||
|
Loading…
Reference in New Issue
Block a user