From 7452e2fe04d3c4064ca1a8e4ce76c387e2772cd7 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 14 May 2016 21:33:12 +0200 Subject: [PATCH] Multi device support: cleanup after last commit --- plugins/channel/chanalyzer/chanalyzerplugin.cpp | 3 --- plugins/channel/demodam/amplugin.cpp | 3 --- plugins/channel/demodbfm/bfmplugin.cpp | 3 --- plugins/channel/demoddsd/dsddemodplugin.cpp | 3 --- plugins/channel/demodlora/loraplugin.cpp | 3 --- plugins/channel/demodnfm/nfmplugin.cpp | 3 --- plugins/channel/demodssb/ssbplugin.cpp | 3 --- plugins/channel/demodwfm/wfmplugin.cpp | 3 --- plugins/channel/tcpsrc/tcpsrcplugin.cpp | 3 --- plugins/channel/udpsrc/udpsrcplugin.cpp | 3 --- sdrbase/mainwindow.cpp | 5 ----- sdrbase/mainwindow.h | 1 - sdrbase/mainwindow.ui | 12 ------------ sdrbase/plugin/pluginapi.cpp | 4 ++-- sdrbase/plugin/pluginapi.h | 2 +- sdrbase/plugin/pluginmanager.cpp | 3 +-- sdrbase/plugin/pluginmanager.h | 2 +- 17 files changed, 5 insertions(+), 54 deletions(-) diff --git a/plugins/channel/chanalyzer/chanalyzerplugin.cpp b/plugins/channel/chanalyzer/chanalyzerplugin.cpp index 15dd2e4a0..9c3b77625 100644 --- a/plugins/channel/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channel/chanalyzer/chanalyzerplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "chanalyzergui.h" #include "chanalyzerplugin.h" @@ -28,8 +27,6 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator -// QAction* action = new QAction(tr("&ChannelAnalyzer"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceChannelAnalyzer())); m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this); } diff --git a/plugins/channel/demodam/amplugin.cpp b/plugins/channel/demodam/amplugin.cpp index 4acb1ece1..8010fce9d 100644 --- a/plugins/channel/demodam/amplugin.cpp +++ b/plugins/channel/demodam/amplugin.cpp @@ -1,7 +1,6 @@ #include "amplugin.h" #include -#include #include "plugin/pluginapi.h" #include "amdemodgui.h" @@ -29,8 +28,6 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register AM demodulator -// QAction* action = new QAction(tr("&AM Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceAM())); m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.am", this); } diff --git a/plugins/channel/demodbfm/bfmplugin.cpp b/plugins/channel/demodbfm/bfmplugin.cpp index 6f2a7d14b..845c35a78 100644 --- a/plugins/channel/demodbfm/bfmplugin.cpp +++ b/plugins/channel/demodbfm/bfmplugin.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include -#include #include "plugin/pluginapi.h" #include "bfmplugin.h" @@ -47,8 +46,6 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register BFM demodulator -// QAction* action = new QAction(tr("&Broadcast FM Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceBFM())); m_pluginAPI->registerChannel("sdrangel.channel.bfm", this); } diff --git a/plugins/channel/demoddsd/dsddemodplugin.cpp b/plugins/channel/demoddsd/dsddemodplugin.cpp index bc3e2f699..bf77be4cb 100644 --- a/plugins/channel/demoddsd/dsddemodplugin.cpp +++ b/plugins/channel/demoddsd/dsddemodplugin.cpp @@ -16,7 +16,6 @@ /////////////////////////////////////////////////////////////////////////////////// #include -#include #include "plugin/pluginapi.h" #include "dsddemodplugin.h" #include "dsddemodgui.h" @@ -45,8 +44,6 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register DSD demodulator -// QAction* action = new QAction(tr("&DSD Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceDSDDemod())); m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this); } diff --git a/plugins/channel/demodlora/loraplugin.cpp b/plugins/channel/demodlora/loraplugin.cpp index 5a7f60961..d86686460 100644 --- a/plugins/channel/demodlora/loraplugin.cpp +++ b/plugins/channel/demodlora/loraplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "loraplugin.h" #include "lorademodgui.h" @@ -28,8 +27,6 @@ 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); } diff --git a/plugins/channel/demodnfm/nfmplugin.cpp b/plugins/channel/demodnfm/nfmplugin.cpp index d1e07e94a..fe4cb563a 100644 --- a/plugins/channel/demodnfm/nfmplugin.cpp +++ b/plugins/channel/demodnfm/nfmplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "nfmplugin.h" #include "nfmdemodgui.h" @@ -28,8 +27,6 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register NFM demodulator -// QAction* action = new QAction(tr("&NFM Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceNFM())); m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this); } diff --git a/plugins/channel/demodssb/ssbplugin.cpp b/plugins/channel/demodssb/ssbplugin.cpp index a941b53e0..ee5fd2ff9 100644 --- a/plugins/channel/demodssb/ssbplugin.cpp +++ b/plugins/channel/demodssb/ssbplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "ssbplugin.h" #include "ssbdemodgui.h" @@ -28,8 +27,6 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register demodulator -// QAction* action = new QAction(tr("&SSB Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceSSB())); m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.ssb", this); } diff --git a/plugins/channel/demodwfm/wfmplugin.cpp b/plugins/channel/demodwfm/wfmplugin.cpp index 43fa0aee7..c77c18a9e 100644 --- a/plugins/channel/demodwfm/wfmplugin.cpp +++ b/plugins/channel/demodwfm/wfmplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "wfmdemodgui.h" @@ -29,8 +28,6 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register WFM demodulator -// QAction* action = new QAction(tr("&WFM Demodulator"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceWFM())); m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.wfm", this); } diff --git a/plugins/channel/tcpsrc/tcpsrcplugin.cpp b/plugins/channel/tcpsrc/tcpsrcplugin.cpp index 2419beb9e..f01cca4b4 100644 --- a/plugins/channel/tcpsrc/tcpsrcplugin.cpp +++ b/plugins/channel/tcpsrc/tcpsrcplugin.cpp @@ -1,5 +1,4 @@ #include -#include #include "plugin/pluginapi.h" #include "tcpsrcplugin.h" #include "tcpsrcgui.h" @@ -28,8 +27,6 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register TCP Channel Source -// QAction* action = new QAction(tr("&TCP Source"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceTCPSrc())); m_pluginAPI->registerChannel("sdrangel.channel.tcpsrc", this); } diff --git a/plugins/channel/udpsrc/udpsrcplugin.cpp b/plugins/channel/udpsrc/udpsrcplugin.cpp index 6473808f9..003d213b2 100644 --- a/plugins/channel/udpsrc/udpsrcplugin.cpp +++ b/plugins/channel/udpsrc/udpsrcplugin.cpp @@ -18,7 +18,6 @@ #include "udpsrcplugin.h" #include -#include #include "plugin/pluginapi.h" #include "udpsrcgui.h" @@ -47,8 +46,6 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI = pluginAPI; // register TCP Channel Source -// QAction* action = new QAction(tr("&UDP Source"), this); -// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceUDPSrc())); m_pluginAPI->registerChannel("sdrangel.channel.udpsrc", this); } diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 62cb483e7..5447c8d6a 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -238,11 +238,6 @@ void MainWindow::removeLastDevice() m_deviceUIs.pop_back(); } -//void MainWindow::addChannelCreateAction(QAction* action) // TODO: move to some tabbed UI -//{ -// ui->menu_Channels->addAction(action); -//} - void MainWindow::addChannelRollup(QWidget* widget) { m_deviceUIs.back()->m_channelWindow->addRollupWidget(widget); diff --git a/sdrbase/mainwindow.h b/sdrbase/mainwindow.h index ebc21bc65..1ae16df0c 100644 --- a/sdrbase/mainwindow.h +++ b/sdrbase/mainwindow.h @@ -71,7 +71,6 @@ public: MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; } -// void addChannelCreateAction(QAction* action); void addChannelRollup(QWidget* widget); void addViewAction(QAction* action); diff --git a/sdrbase/mainwindow.ui b/sdrbase/mainwindow.ui index b34042944..3e3751d99 100644 --- a/sdrbase/mainwindow.ui +++ b/sdrbase/mainwindow.ui @@ -118,17 +118,6 @@ - - - - Sans Serif - 9 - - - - &Channels - - @@ -150,7 +139,6 @@ - diff --git a/sdrbase/plugin/pluginapi.cpp b/sdrbase/plugin/pluginapi.cpp index 764f072d8..6c2a6b12a 100644 --- a/sdrbase/plugin/pluginapi.cpp +++ b/sdrbase/plugin/pluginapi.cpp @@ -24,9 +24,9 @@ void PluginAPI::setInputGUI(QWidget* inputGUI) m_pluginManager->setInputGUI(inputGUI); } -void PluginAPI::registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action) +void PluginAPI::registerChannel(const QString& channelName, PluginInterface* plugin) { - m_pluginManager->registerChannel(channelName, plugin, action); + m_pluginManager->registerChannel(channelName, plugin); } void PluginAPI::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI) diff --git a/sdrbase/plugin/pluginapi.h b/sdrbase/plugin/pluginapi.h index 212ce3338..391d55695 100644 --- a/sdrbase/plugin/pluginapi.h +++ b/sdrbase/plugin/pluginapi.h @@ -31,7 +31,7 @@ public: void setInputGUI(QWidget* inputGUI); // Channel stuff - void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action = 0); + void registerChannel(const QString& channelName, PluginInterface* plugin); void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI); void addChannelRollup(QWidget* pluginGUI); void removeChannelInstance(PluginGUI* pluginGUI); diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 4527bd877..ea497a607 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -51,10 +51,9 @@ void PluginManager::loadPlugins() updateSampleSourceDevices(); } -void PluginManager::registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action) +void PluginManager::registerChannel(const QString& channelName, PluginInterface* plugin) { m_channelRegistrations.append(ChannelRegistration(channelName, plugin)); -// m_mainWindow->addChannelCreateAction(action); } void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI) diff --git a/sdrbase/plugin/pluginmanager.h b/sdrbase/plugin/pluginmanager.h index fb3453b3c..1a1ebb6a1 100644 --- a/sdrbase/plugin/pluginmanager.h +++ b/sdrbase/plugin/pluginmanager.h @@ -46,7 +46,7 @@ public: const Plugins& getPlugins() const { return m_plugins; } // Callbacks from the plugins - void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action = 0); + void registerChannel(const QString& channelName, PluginInterface* plugin); void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI); void addChannelRollup(QWidget* pluginGUI); void removeChannelInstance(PluginGUI* pluginGUI);