mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-11 10:18:38 -04:00
Renamed channel plugin directories
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
#include <QtPlugin>
|
||||
#include <QAction>
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "loraplugin.h"
|
||||
#include "lorademodgui.h"
|
||||
|
||||
const PluginDescriptor LoRaPlugin::m_pluginDescriptor = {
|
||||
QString("LoRa Demodulator"),
|
||||
QString("0.1"),
|
||||
QString("(c) 2015 John Greb"),
|
||||
QString("http://www.maintech.de"),
|
||||
true,
|
||||
QString("github.com/hexameron/rtl-sdrangelove")
|
||||
};
|
||||
|
||||
LoRaPlugin::LoRaPlugin(QObject* parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
const PluginDescriptor& LoRaPlugin::getPluginDescriptor() const
|
||||
{
|
||||
return m_pluginDescriptor;
|
||||
}
|
||||
|
||||
void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
{
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// register demodulator
|
||||
QAction* action = new QAction(tr("&LoRa Demodulator"), this);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceLoRa()));
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this, action);
|
||||
}
|
||||
|
||||
PluginGUI* LoRaPlugin::createChannel(const QString& channelName)
|
||||
{
|
||||
if(channelName == "de.maintech.sdrangelove.channel.lora") {
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI);
|
||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
m_pluginAPI->addChannelRollup(gui);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void LoRaPlugin::createInstanceLoRa()
|
||||
{
|
||||
LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI);
|
||||
m_pluginAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui);
|
||||
m_pluginAPI->addChannelRollup(gui);
|
||||
}
|
||||
Reference in New Issue
Block a user