Tx Channel plugins now handled via DeviceUISet

pull/127/head
f4exb 2017-11-01 00:00:03 +01:00
rodzic e206fc84a8
commit d5d7d40102
30 zmienionych plików z 147 dodań i 139 usunięć

Wyświetl plik

@ -23,6 +23,7 @@
#include "ammodgui.h"
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "dsp/upchannelizer.h"
#include "ui_ammodgui.h"
@ -35,9 +36,9 @@
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;
}
@ -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),
ui(new Ui::AMModGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_basicSettingsShown(false),
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(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
m_amMod = new AMMod(m_deviceAPI);
m_amMod = new AMMod(m_deviceUISet->m_deviceSinkAPI);
m_amMod->setMessageQueueToGUI(getInputMessageQueue());
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()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
ui->play->setEnabled(false);
ui->play->setChecked(false);
@ -326,7 +327,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pare
AMModGUI::~AMModGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeTxChannelInstance(this);
delete m_amMod;
delete ui;
}

Wyświetl plik

@ -27,7 +27,7 @@
#include "ammodsettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class AMMod;
@ -39,7 +39,7 @@ class AMModGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static AMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static AMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -83,7 +83,7 @@ private slots:
private:
Ui::AMModGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
AMModSettings m_settings;
bool m_basicSettingsShown;
@ -101,7 +101,7 @@ private:
AMMod::AMModInputAF m_modAFInput;
MessageQueue m_inputMessageQueue;
explicit AMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~AMModGUI();
void blockApplySettings(bool block);

Wyświetl plik

@ -23,7 +23,7 @@
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
QString("AM Modulator"),
QString("3.5.4"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -49,18 +49,18 @@ void AMModPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceAPI);
AMModGUI* gui = AMModGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return 0;
}
}
void AMModPlugin::createInstanceModAM(DeviceSinkAPI *deviceAPI)
void AMModPlugin::createInstanceModAM(DeviceUISet *deviceUISet)
{
AMModGUI::create(m_pluginAPI, deviceAPI);
AMModGUI::create(m_pluginAPI, deviceUISet);
}

Wyświetl plik

@ -20,7 +20,7 @@
#include <QObject>
#include "plugin/plugininterface.h"
class DeviceSinkAPI;
class DeviceUISet;
class AMModPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -28,12 +28,12 @@ class AMModPlugin : public QObject, PluginInterface {
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ammod")
public:
explicit AMModPlugin(QObject* parent = NULL);
explicit AMModPlugin(QObject* parent = 0);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -41,7 +41,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceModAM(DeviceSinkAPI *deviceAPI);
void createInstanceModAM(DeviceUISet *deviceUISet);
};
#endif // INCLUDE_AMMODPLUGIN_H

Wyświetl plik

@ -24,6 +24,7 @@
#include <cmath>
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
#include "gui/basicchannelsettingswidget.h"
@ -36,9 +37,9 @@
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;
}
@ -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),
ui(new Ui::ATVModGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_basicSettingsShown(false),
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(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
m_atvMod = new ATVMod(m_deviceAPI);
m_atvMod = new ATVMod(m_deviceUISet->m_deviceSinkAPI);
m_atvMod->setMessageQueueToGUI(getInputMessageQueue());
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()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
resetToDefaults();
@ -649,7 +650,7 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
ATVModGUI::~ATVModGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeTxChannelInstance(this);
delete m_atvMod;
delete ui;
}

Wyświetl plik

@ -27,7 +27,7 @@
#include "atvmodsettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class ATVMod;
class QMessageBox;
@ -40,7 +40,7 @@ class ATVModGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static ATVModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -99,7 +99,7 @@ private slots:
private:
Ui::ATVModGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
ATVModSettings m_settings;
bool m_basicSettingsShown;
@ -119,7 +119,7 @@ private:
int m_rfSliderDivisor;
MessageQueue m_inputMessageQueue;
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~ATVModGUI();
void blockApplySettings(bool block);

Wyświetl plik

@ -23,7 +23,7 @@
const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
QString("ATV Modulator"),
QString("3.7.5"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -49,20 +49,20 @@ void ATVModPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceAPI);
ATVModGUI* gui = ATVModGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return 0;
}
}
void ATVModPlugin::createInstanceModATV(DeviceSinkAPI *deviceAPI)
void ATVModPlugin::createInstanceModATV(DeviceUISet *deviceUISet)
{
ATVModGUI::create(m_pluginAPI, deviceAPI);
ATVModGUI::create(m_pluginAPI, deviceUISet);
}

Wyświetl plik

@ -28,12 +28,12 @@ class ATVModPlugin : public QObject, PluginInterface {
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.atvmod")
public:
explicit ATVModPlugin(QObject* parent = NULL);
explicit ATVModPlugin(QObject* parent = 0);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -41,7 +41,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceModATV(DeviceSinkAPI *deviceAPI);
void createInstanceModATV(DeviceUISet *deviceUISet);
};
#endif /* PLUGINS_CHANNELTX_MODATV_ATVMODPLUGIN_H_ */

Wyświetl plik

@ -21,6 +21,7 @@
#include <QDebug>
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
#include "util/db.h"
@ -34,9 +35,9 @@
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;
}
@ -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),
ui(new Ui::NFMModGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_basicSettingsShown(false),
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(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
m_nfmMod = new NFMMod(m_deviceAPI);
m_nfmMod = new NFMMod(m_deviceUISet->m_deviceSinkAPI);
m_nfmMod->setMessageQueueToGUI(getInputMessageQueue());
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()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
ui->play->setEnabled(false);
ui->play->setChecked(false);
@ -358,7 +359,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
NFMModGUI::~NFMModGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeTxChannelInstance(this);
delete m_nfmMod;
delete ui;
}

Wyświetl plik

@ -27,7 +27,7 @@
#include "nfmmodsettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class NFMMod;
namespace Ui {
@ -38,7 +38,7 @@ class NFMModGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static NFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -86,7 +86,7 @@ private slots:
private:
Ui::NFMModGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
NFMModSettings m_settings;
bool m_basicSettingsShown;
@ -104,7 +104,7 @@ private:
NFMMod::NFMModInputAF m_modAFInput;
MessageQueue m_inputMessageQueue;
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~NFMModGUI();
void blockApplySettings(bool block);

Wyświetl plik

@ -23,7 +23,7 @@
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
QString("NFM Modulator"),
QString("3.7.4"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -49,18 +49,18 @@ void NFMModPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceAPI);
NFMModGUI* gui = NFMModGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return 0;
}
}
void NFMModPlugin::createInstanceModNFM(DeviceSinkAPI *deviceAPI)
void NFMModPlugin::createInstanceModNFM(DeviceUISet *deviceUISet)
{
NFMModGUI::create(m_pluginAPI, deviceAPI);
NFMModGUI::create(m_pluginAPI, deviceUISet);
}

Wyświetl plik

@ -20,7 +20,7 @@
#include <QObject>
#include "plugin/plugininterface.h"
class DeviceSinkAPI;
class DeviceUISet;
class NFMModPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -28,12 +28,12 @@ class NFMModPlugin : public QObject, PluginInterface {
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.nfmmod")
public:
explicit NFMModPlugin(QObject* parent = NULL);
explicit NFMModPlugin(QObject* parent = 0);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -41,7 +41,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceModNFM(DeviceSinkAPI *deviceAPI);
void createInstanceModNFM(DeviceUISet *deviceUISet);
};
#endif // INCLUDE_NFMMODPLUGIN_H

Wyświetl plik

@ -23,6 +23,7 @@
#include "ssbmodgui.h"
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "dsp/spectrumvis.h"
#include "ui_ssbmodgui.h"
#include "plugin/pluginapi.h"
@ -34,9 +35,9 @@
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;
}
@ -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),
ui(new Ui::SSBModGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_basicSettingsShown(false),
m_doApplySettings(true),
@ -462,7 +463,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
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());
resetToDefaults();
@ -488,9 +489,9 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerRxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
ui->cwKeyerGUI->setBuddies(m_ssbMod->getInputMessageQueue(), m_ssbMod->getCWKeyer());
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
@ -509,7 +510,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
SSBModGUI::~SSBModGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeRxChannelInstance(this);
delete m_ssbMod;
delete m_spectrumVis;
delete ui;

Wyświetl plik

@ -27,7 +27,7 @@
#include "ssbmodsettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class SSBMod;
class SpectrumVis;
@ -40,7 +40,7 @@ class SSBModGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static SSBModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -93,7 +93,7 @@ private slots:
private:
Ui::SSBModGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
SSBModSettings m_settings;
bool m_basicSettingsShown;
@ -113,7 +113,7 @@ private:
SSBMod::SSBModInputAF m_modAFInput;
MessageQueue m_inputMessageQueue;
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~SSBModGUI();
int getEffectiveLowCutoff(int lowCutoff);

Wyświetl plik

@ -23,7 +23,7 @@
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
QString("SSB Modulator"),
QString("3.7.5"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -49,18 +49,18 @@ void SSBModPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceAPI);
SSBModGUI* gui = SSBModGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return 0;
}
}
void SSBModPlugin::createInstanceModSSB(DeviceSinkAPI *deviceAPI)
void SSBModPlugin::createInstanceModSSB(DeviceUISet *deviceUISet)
{
SSBModGUI::create(m_pluginAPI, deviceAPI);
SSBModGUI::create(m_pluginAPI, deviceUISet);
}

Wyświetl plik

@ -20,7 +20,7 @@
#include <QObject>
#include "plugin/plugininterface.h"
class DeviceSinkAPI;
class DeviceUISet;
class SSBModPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -28,12 +28,12 @@ class SSBModPlugin : public QObject, PluginInterface {
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.ssbmod")
public:
explicit SSBModPlugin(QObject* parent = NULL);
explicit SSBModPlugin(QObject* parent = 0);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -41,7 +41,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceModSSB(DeviceSinkAPI *deviceAPI);
void createInstanceModSSB(DeviceUISet *deviceUISet);
};
#endif // INCLUDE_SSBMODPLUGIN_H

Wyświetl plik

@ -21,6 +21,7 @@
#include <QDebug>
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "dsp/upchannelizer.h"
#include "dsp/threadedbasebandsamplesource.h"
#include "plugin/pluginapi.h"
@ -35,9 +36,9 @@
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;
}
@ -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),
ui(new Ui::WFMModGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelMarker(this),
m_basicSettingsShown(false),
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(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
m_wfmMod = new WFMMod(m_deviceAPI);
m_wfmMod = new WFMMod(m_deviceUISet->m_deviceSinkAPI);
m_wfmMod->setMessageQueueToGUI(getInputMessageQueue());
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()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
ui->play->setEnabled(false);
ui->play->setChecked(false);
@ -342,7 +343,7 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
WFMModGUI::~WFMModGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeTxChannelInstance(this);
delete m_wfmMod;
delete ui;
}

Wyświetl plik

@ -27,7 +27,7 @@
#include "wfmmodsettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class ThreadedBasebandSampleSource;
class UpChannelizer;
@ -41,7 +41,7 @@ class WFMModGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static WFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -86,7 +86,7 @@ private slots:
private:
Ui::WFMModGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
WFMModSettings m_settings;
bool m_basicSettingsShown;
@ -106,7 +106,7 @@ private:
WFMMod::WFMModInputAF m_modAFInput;
MessageQueue m_inputMessageQueue;
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~WFMModGUI();
void blockApplySettings(bool block);

Wyświetl plik

@ -23,7 +23,7 @@
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
QString("WFM Modulator"),
QString("3.7.4"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -49,18 +49,18 @@ void WFMModPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceAPI);
WFMModGUI* gui = WFMModGUI::create(m_pluginAPI, deviceUISet);
return gui;
} else {
return 0;
}
}
void WFMModPlugin::createInstanceModWFM(DeviceSinkAPI *deviceAPI)
void WFMModPlugin::createInstanceModWFM(DeviceUISet *deviceUISet)
{
WFMModGUI::create(m_pluginAPI, deviceAPI);
WFMModGUI::create(m_pluginAPI, deviceUISet);
}

Wyświetl plik

@ -33,7 +33,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -41,7 +41,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceModWFM(DeviceSinkAPI *deviceAPI);
void createInstanceModWFM(DeviceUISet *deviceUISet);
};
#endif // INCLUDE_NFMMODPLUGIN_H

Wyświetl plik

@ -15,6 +15,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include "device/devicesinkapi.h"
#include "device/deviceuiset.h"
#include "dsp/spectrumvis.h"
#include "dsp/dspengine.h"
#include "util/simpleserializer.h"
@ -28,9 +29,9 @@
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;
}
@ -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),
ui(new Ui::UDPSinkGUI),
m_pluginAPI(pluginAPI),
m_deviceAPI(deviceAPI),
m_deviceUISet(deviceUISet),
m_channelPowerAvg(4, 1e-10),
m_inPowerAvg(4, 1e-10),
m_tickCount(0),
@ -120,7 +121,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
setAttribute(Qt::WA_DeleteOnClose, true);
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());
ui->fmDeviation->setEnabled(false);
@ -146,9 +147,9 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
m_deviceAPI->registerChannelInstance(m_channelID, this);
m_deviceAPI->addChannelMarker(&m_channelMarker);
m_deviceAPI->addRollupWidget(this);
m_deviceUISet->registerTxChannelInstance(m_channelID, this);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
@ -161,7 +162,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
UDPSinkGUI::~UDPSinkGUI()
{
m_deviceAPI->removeChannelInstance(this);
m_deviceUISet->removeTxChannelInstance(this);
delete m_udpSink;
delete m_spectrumVis;
delete ui;

Wyświetl plik

@ -28,7 +28,7 @@
#include "udpsinksettings.h"
class PluginAPI;
class DeviceSinkAPI;
class DeviceUISet;
class UDPSink;
class SpectrumVis;
@ -40,7 +40,7 @@ class UDPSinkGUI : public RollupWidget, public PluginInstanceGUI {
Q_OBJECT
public:
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI);
static UDPSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet);
virtual void destroy();
void setName(const QString& name);
@ -80,7 +80,7 @@ private slots:
private:
Ui::UDPSinkGUI* ui;
PluginAPI* m_pluginAPI;
DeviceSinkAPI* m_deviceAPI;
DeviceUISet* m_deviceUISet;
SpectrumVis* m_spectrumVis;
UDPSink* m_udpSink;
MovingAverage<double> m_channelPowerAvg;
@ -94,7 +94,7 @@ private:
bool m_doApplySettings;
MessageQueue m_inputMessageQueue;
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, QWidget* parent = NULL);
virtual ~UDPSinkGUI();
void blockApplySettings(bool block);

Wyświetl plik

@ -24,7 +24,7 @@
const PluginDescriptor UDPSinkPlugin::m_pluginDescriptor = {
QString("UDP Channel Sink"),
QString("3.7.5"),
QString("3.7.9"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,
@ -50,11 +50,11 @@ void UDPSinkPlugin::initPlugin(PluginAPI* pluginAPI)
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)
{
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceAPI);
UDPSinkGUI* gui = UDPSinkGUI::create(m_pluginAPI, deviceUISet);
// deviceAPI->registerChannelInstance("sdrangel.channel.udpsrc", gui);
// m_pluginAPI->addChannelRollup(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);
// m_pluginAPI->addChannelRollup(gui);
}

Wyświetl plik

@ -21,7 +21,7 @@
#include <QObject>
#include "plugin/plugininterface.h"
class DeviceSinkAPI;
class DeviceUISet;
class UDPSinkPlugin : public QObject, PluginInterface {
Q_OBJECT
@ -34,7 +34,7 @@ public:
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceSinkAPI *deviceAPI);
PluginInstanceGUI* createTxChannel(const QString& channelName, DeviceUISet *deviceUISet);
private:
static const PluginDescriptor m_pluginDescriptor;
@ -42,7 +42,7 @@ private:
PluginAPI* m_pluginAPI;
private slots:
void createInstanceUDPSink(DeviceSinkAPI *deviceAPI);
void createInstanceUDPSink(DeviceUISet *deviceUISet);
};
#endif // INCLUDE_UDPSINKPLUGIN_H

Wyświetl plik

@ -319,7 +319,7 @@ void DeviceSinkAPI::loadChannelSettings(const Preset *preset, PluginAPI *pluginA
if((*channelRegistrations)[i].m_channelName == 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;
}
}

Wyświetl plik

@ -273,8 +273,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA
if((*channelRegistrations)[i].m_channelName == 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, m_deviceSinkAPI));
reg = ChannelInstanceRegistration(channelConfig.m_channel, (*channelRegistrations)[i].m_plugin->createTxChannel(channelConfig.m_channel, this));
break;
}
}

Wyświetl plik

@ -485,7 +485,7 @@ void MainWindow::loadPresetSettings(const Preset* preset, int tabIndex)
{
deviceUI->m_spectrumGUI->deserialize(preset->getSpectrumConfig());
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->clearChannels();
preset->setSourcePreset(false);
deviceUI->m_deviceSinkAPI->saveChannelSettings(preset);
deviceUI->saveTxChannelSettings(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));
}
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI->m_deviceSinkAPI);
m_pluginManager->createTxChannelInstance(deviceUI->m_samplingDeviceControl->getChannelSelector()->currentIndex(), deviceUI);
}
}

Wyświetl plik

@ -61,12 +61,15 @@ public:
{ return 0; }
virtual PluginInstanceGUI* createRxChannel(
const QString& channelName __attribute__((unused)),
DeviceUISet *deviceAPI __attribute__((unused)) )
DeviceUISet *deviceUISet __attribute__((unused)) )
{ return 0; }
// 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

Wyświetl plik

@ -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())
{
PluginInterface *pluginInterface = m_txChannelRegistrations[channelPluginIndex].m_plugin;
pluginInterface->createTxChannel(m_txChannelRegistrations[channelPluginIndex].m_channelName, deviceAPI);
pluginInterface->createTxChannel(m_txChannelRegistrations[channelPluginIndex].m_channelName, deviceUISet);
}
}

Wyświetl plik

@ -74,7 +74,7 @@ public:
void createRxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
void populateTxChannelComboBox(QComboBox *channels);
void createTxChannelInstance(int channelPluginIndex, DeviceSinkAPI *deviceAPI);
void createTxChannelInstance(int channelPluginIndex, DeviceUISet *deviceUISet);
private:
struct SamplingDeviceRegistration {