sdrangel/plugins/channelrx/demodssb/ssbplugin.cpp

51 wiersze
1.1 KiB
C++
Czysty Zwykły widok Historia

#include "../../channelrx/demodssb/ssbplugin.h"
#include <device/devicesourceapi.h>
2014-05-21 17:31:14 +00:00
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "../../channelrx/demodssb/ssbdemodgui.h"
2014-05-21 17:31:14 +00:00
const PluginDescriptor SSBPlugin::m_pluginDescriptor = {
QString("SSB Demodulator"),
2017-05-16 16:38:39 +00:00
QString("3.5.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
2014-05-21 17:31:14 +00:00
true,
QString("https://github.com/f4exb/sdrangel")
2014-05-21 17:31:14 +00:00
};
SSBPlugin::SSBPlugin(QObject* parent) :
2017-05-05 08:40:45 +00:00
QObject(parent),
m_pluginAPI(0)
2014-05-21 17:31:14 +00:00
{
}
const PluginDescriptor& SSBPlugin::getPluginDescriptor() const
{
return m_pluginDescriptor;
}
void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
{
m_pluginAPI = pluginAPI;
// register demodulator
2016-10-13 20:23:43 +00:00
m_pluginAPI->registerRxChannel(SSBDemodGUI::m_channelID, this);
2014-05-21 17:31:14 +00:00
}
2016-10-13 21:42:08 +00:00
PluginGUI* SSBPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI)
2014-05-21 17:31:14 +00:00
{
if(channelName == SSBDemodGUI::m_channelID)
{
SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI);
2014-05-21 17:31:14 +00:00
return gui;
} else {
return NULL;
}
}
void SSBPlugin::createInstanceSSB(DeviceSourceAPI *deviceAPI)
2014-05-21 17:31:14 +00:00
{
2017-05-25 18:13:34 +00:00
SSBDemodGUI::create(m_pluginAPI, deviceAPI);
2014-05-21 17:31:14 +00:00
}