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
|
|
|
}
|
|
|
|
|
|
|
|
PluginGUI* NFMPlugin::createChannel(const QString& channelName)
|
|
|
|
{
|
|
|
|
if(channelName == "de.maintech.sdrangelove.channel.nfm") {
|
|
|
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI);
|
|
|
|
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
|
|
|
m_pluginAPI->addChannelRollup(gui);
|
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void NFMPlugin::createInstanceNFM()
|
|
|
|
{
|
|
|
|
NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI);
|
|
|
|
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.nfm", gui);
|
|
|
|
m_pluginAPI->addChannelRollup(gui);
|
|
|
|
}
|