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"),
|
2017-11-01 09:58:36 -04:00
|
|
|
QString("3.8.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
|
|
|
}
|
|
|
|
|
2017-10-30 19:07:55 -04:00
|
|
|
PluginInstanceGUI* ChannelAnalyzerPlugin::createRxChannel(const QString& channelName, DeviceUISet *deviceUISet)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
2016-05-16 13:37:53 -04:00
|
|
|
if(channelName == ChannelAnalyzerGUI::m_channelID)
|
|
|
|
{
|
2017-10-30 19:07:55 -04:00
|
|
|
ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
|
2015-06-21 06:46:47 -04:00
|
|
|
return gui;
|
|
|
|
} else {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-30 19:07:55 -04:00
|
|
|
void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceUISet *deviceUISet)
|
2015-06-21 06:46:47 -04:00
|
|
|
{
|
2017-10-30 19:07:55 -04:00
|
|
|
ChannelAnalyzerGUI::create(m_pluginAPI, deviceUISet);
|
2015-06-21 06:46:47 -04:00
|
|
|
}
|