2014-05-21 13:31:14 -04:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-05-16 04:05:09 -04:00
|
|
|
#include "device/deviceapi.h"
|
2014-05-21 13:31:14 -04:00
|
|
|
#include "ssbplugin.h"
|
|
|
|
#include "ssbdemodgui.h"
|
|
|
|
|
|
|
|
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
|
|
|
|
QString("SSB Demodulator"),
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("---"),
|
|
|
|
QString("(c) Edouard Griffiths, F4EXB"),
|
|
|
|
QString("https://github.com/f4exb/sdrangel"),
|
2014-05-21 13:31:14 -04:00
|
|
|
true,
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("https://github.com/f4exb/sdrangel")
|
2014-05-21 13:31:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
SSBPlugin::SSBPlugin(QObject* parent) :
|
|
|
|
QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& SSBPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-05-16 13:37:53 -04:00
|
|
|
m_pluginAPI->registerChannel(SSBDemodGUI::m_channelID, this);
|
2014-05-21 13:31:14 -04:00
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
2014-05-21 13:31:14 -04:00
|
|
|
{
|
2016-05-16 13:37:53 -04:00
|
|
|
if(channelName == SSBDemodGUI::m_channelID)
|
|
|
|
{
|
2016-05-16 04:05:09 -04:00
|
|
|
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
2016-05-16 13:37:53 -04:00
|
|
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
2016-05-16 04:05:09 -04:00
|
|
|
// m_pluginAPI->addChannelRollup(gui);
|
2014-05-21 13:31:14 -04:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
void SSBPlugin::createInstanceSSB(DeviceAPI *deviceAPI)
|
2014-05-21 13:31:14 -04:00
|
|
|
{
|
2016-05-16 04:05:09 -04:00
|
|
|
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
|
2016-05-16 13:37:53 -04:00
|
|
|
// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui);
|
2016-05-16 04:05:09 -04:00
|
|
|
// m_pluginAPI->addChannelRollup(gui);
|
2014-05-21 13:31:14 -04:00
|
|
|
}
|