2014-05-18 11:52:39 -04:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
|
|
|
#include "nfmplugin.h"
|
|
|
|
#include "nfmdemodgui.h"
|
|
|
|
|
|
|
|
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
|
|
|
|
QString("NFM Demodulator"),
|
|
|
|
QString("---"),
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("(c) Edouard Griffiths, F4EXB"),
|
|
|
|
QString("https://github.com/f4exb/sdrangel"),
|
2014-05-18 11:52:39 -04:00
|
|
|
true,
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("https://github.com/f4exb/sdrangel")
|
2014-05-18 11:52:39 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
NFMPlugin::NFMPlugin(QObject* parent) :
|
|
|
|
QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& NFMPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register NFM demodulator
|
2016-05-14 14:57:43 -04:00
|
|
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this);
|
2014-05-18 11:52:39 -04:00
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
2014-05-18 11:52:39 -04:00
|
|
|
{
|
|
|
|
if(channelName == "de.maintech.sdrangelove.channel.nfm") {
|
2016-05-16 04:05:09 -04:00
|
|
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
2014-05-18 11:52:39 -04:00
|
|
|
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
2016-05-16 04:05:09 -04:00
|
|
|
// m_pluginAPI->addChannelRollup(gui);
|
2014-05-18 11:52:39 -04:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-16 04:05:09 -04:00
|
|
|
void NFMPlugin::createInstanceNFM(DeviceAPI *deviceAPI)
|
2014-05-18 11:52:39 -04:00
|
|
|
{
|
2016-05-16 04:05:09 -04:00
|
|
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI);
|
2014-05-18 11:52:39 -04:00
|
|
|
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
2016-05-16 04:05:09 -04:00
|
|
|
// m_pluginAPI->addChannelRollup(gui);
|
2014-05-18 11:52:39 -04:00
|
|
|
}
|