2016-10-02 07:18:07 -04:00
|
|
|
#include "../../channelrx/chanalyzer/chanalyzerplugin.h"
|
|
|
|
|
2015-06-21 06:46:47 -04:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
|
|
|
#include "../../channelrx/chanalyzer/chanalyzergui.h"
|
2015-06-21 06:46:47 -04:00
|
|
|
|
|
|
|
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
|
|
|
|
QString("Channel Analyzer"),
|
2016-05-17 09:29:28 -04:00
|
|
|
QString("2.0.0"),
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("(c) Edouard Griffiths, F4EXB"),
|
|
|
|
QString("https://github.com/f4exb/sdrangel"),
|
2015-06-21 06:46:47 -04:00
|
|
|
true,
|
2015-09-01 19:16:40 -04:00
|
|
|
QString("https://github.com/f4exb/sdrangel")
|
2015-06-21 06:46:47 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) :
|
|
|
|
QObject(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& ChannelAnalyzerPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-05-16 13:37:53 -04:00
|
|
|
m_pluginAPI->registerChannel(ChannelAnalyzerGUI::m_channelID, this);
|
2015-06-21 06:46:47 -04:00
|
|
|
}
|
|
|
|
|
2016-05-15 21:21:21 -04:00
|
|
|
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
2016-05-16 13:37:53 -04:00
|
|
|
if(channelName == ChannelAnalyzerGUI::m_channelID)
|
|
|
|
{
|
2016-05-15 21:21:21 -04:00
|
|
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
2015-06-21 06:46:47 -04:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-15 21:21:21 -04:00
|
|
|
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
2016-05-15 21:21:21 -04:00
|
|
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI);
|
2015-06-21 06:46:47 -04:00
|
|
|
}
|