diff --git a/plugins/channelrx/demodam/CMakeLists.txt b/plugins/channelrx/demodam/CMakeLists.txt index 6e349d1d1..6eae7ea2d 100644 --- a/plugins/channelrx/demodam/CMakeLists.txt +++ b/plugins/channelrx/demodam/CMakeLists.txt @@ -3,13 +3,13 @@ project(am) set(am_SOURCES amdemod.cpp amdemodgui.cpp - amplugin.cpp + amdemodplugin.cpp ) set(am_HEADERS amdemod.h amdemodgui.h - amplugin.h + amdemodplugin.h ) set(am_FORMS diff --git a/plugins/channelrx/demodam/amplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp similarity index 61% rename from plugins/channelrx/demodam/amplugin.cpp rename to plugins/channelrx/demodam/amdemodplugin.cpp index b5d309675..c4aaa8809 100644 --- a/plugins/channelrx/demodam/amplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -1,31 +1,30 @@ -#include "../../channelrx/demodam/amplugin.h" - #include #include #include "plugin/pluginapi.h" #include "../../channelrx/demodam/amdemodgui.h" +#include "amdemodplugin.h" -const PluginDescriptor AMPlugin::m_pluginDescriptor = { +const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { QString("AM Demodulator"), - QString("2.0.0"), + QString("2.2.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, QString("https://github.com/f4exb/sdrangel") }; -AMPlugin::AMPlugin(QObject* parent) : +AMDemodPlugin::AMDemodPlugin(QObject* parent) : QObject(parent) { } -const PluginDescriptor& AMPlugin::getPluginDescriptor() const +const PluginDescriptor& AMDemodPlugin::getPluginDescriptor() const { return m_pluginDescriptor; } -void AMPlugin::initPlugin(PluginAPI* pluginAPI) +void AMDemodPlugin::initPlugin(PluginAPI* pluginAPI) { m_pluginAPI = pluginAPI; @@ -33,7 +32,7 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(AMDemodGUI::m_channelID, this); } -PluginGUI* AMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) +PluginGUI* AMDemodPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI) { if(channelName == AMDemodGUI::m_channelID) { @@ -44,7 +43,7 @@ PluginGUI* AMPlugin::createRxChannel(const QString& channelName, DeviceSourceAPI } } -void AMPlugin::createInstanceAM(DeviceSourceAPI *deviceAPI) +void AMDemodPlugin::createInstanceDemodAM(DeviceSourceAPI *deviceAPI) { AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI); } diff --git a/plugins/channelrx/demodam/amdemodplugin.h b/plugins/channelrx/demodam/amdemodplugin.h new file mode 100644 index 000000000..547fa17f2 --- /dev/null +++ b/plugins/channelrx/demodam/amdemodplugin.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2016 Edouard Griffiths, F4EXB // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDE_AMPLUGIN_H +#define INCLUDE_AMPLUGIN_H + +#include +#include "plugin/plugininterface.h" + +class DeviceSourceAPI; + +class AMDemodPlugin : public QObject, PluginInterface { + Q_OBJECT + Q_INTERFACES(PluginInterface) + Q_PLUGIN_METADATA(IID "de.maintech.sdrangelove.channel.am") + +public: + explicit AMDemodPlugin(QObject* parent = NULL); + + const PluginDescriptor& getPluginDescriptor() const; + void initPlugin(PluginAPI* pluginAPI); + + PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); + +private: + static const PluginDescriptor m_pluginDescriptor; + + PluginAPI* m_pluginAPI; + +private slots: + void createInstanceDemodAM(DeviceSourceAPI *deviceAPI); +}; + +#endif // INCLUDE_AMPLUGIN_H diff --git a/plugins/channelrx/demodam/amplugin.h b/plugins/channelrx/demodam/amplugin.h deleted file mode 100644 index 083215499..000000000 --- a/plugins/channelrx/demodam/amplugin.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef INCLUDE_AMPLUGIN_H -#define INCLUDE_AMPLUGIN_H - -#include -#include "plugin/plugininterface.h" - -class DeviceSourceAPI; - -class AMPlugin : public QObject, PluginInterface { - Q_OBJECT - Q_INTERFACES(PluginInterface) - Q_PLUGIN_METADATA(IID "de.maintech.sdrangelove.channel.am") - -public: - explicit AMPlugin(QObject* parent = NULL); - - const PluginDescriptor& getPluginDescriptor() const; - void initPlugin(PluginAPI* pluginAPI); - - PluginGUI* createRxChannel(const QString& channelName, DeviceSourceAPI *deviceAPI); - -private: - static const PluginDescriptor m_pluginDescriptor; - - PluginAPI* m_pluginAPI; - -private slots: - void createInstanceAM(DeviceSourceAPI *deviceAPI); -}; - -#endif // INCLUDE_AMPLUGIN_H diff --git a/plugins/channelrx/demodam/demodam.pro b/plugins/channelrx/demodam/demodam.pro index 8cf7a09c0..a912de5fa 100644 --- a/plugins/channelrx/demodam/demodam.pro +++ b/plugins/channelrx/demodam/demodam.pro @@ -18,11 +18,11 @@ CONFIG(Debug):build_subdir = debug SOURCES += amdemod.cpp\ amdemodgui.cpp\ - amplugin.cpp + amdemodplugin.cpp HEADERS += amdemod.h\ amdemodgui.h\ - amplugin.h + amdemodplugin.h FORMS += amdemodgui.ui