2017-05-05 04:40:45 -04:00
|
|
|
#include "chanalyzerplugin.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2015-06-21 06:46:47 -04:00
|
|
|
#include <QtPlugin>
|
|
|
|
#include "plugin/pluginapi.h"
|
2016-10-02 07:18:07 -04:00
|
|
|
|
2017-05-05 04:40:45 -04:00
|
|
|
#include "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) :
|
2017-05-05 04:40:45 -04:00
|
|
|
QObject(parent),
|
|
|
|
m_pluginAPI(0)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const PluginDescriptor& ChannelAnalyzerPlugin::getPluginDescriptor() const
|
|
|
|
{
|
|
|
|
return m_pluginDescriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|
|
|
{
|
|
|
|
m_pluginAPI = pluginAPI;
|
|
|
|
|
|
|
|
// register demodulator
|
2016-10-13 16:23:43 -04:00
|
|
|
m_pluginAPI->registerRxChannel(ChannelAnalyzerGUI::m_channelID, this);
|
2015-06-21 06:46:47 -04:00
|
|
|
}
|
|
|
|
|
2016-10-13 17:42:08 -04:00
|
|
|
PluginGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *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-10-10 19:17:55 -04:00
|
|
|
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceSourceAPI *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
|
|
|
}
|