mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 03:02:29 -04:00
Multi device support: removed main window channel acion dependency
This commit is contained in:
parent
58709e0bae
commit
3cba9014b6
@ -28,9 +28,9 @@ void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
QAction* action = new QAction(tr("&ChannelAnalyzer"), this);
|
// QAction* action = new QAction(tr("&ChannelAnalyzer"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceChannelAnalyzer()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceChannelAnalyzer()));
|
||||||
m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this, action);
|
m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName)
|
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -29,9 +29,9 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register AM demodulator
|
// register AM demodulator
|
||||||
QAction* action = new QAction(tr("&AM Demodulator"), this);
|
// QAction* action = new QAction(tr("&AM Demodulator"), this);
|
||||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceAM()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceAM()));
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.am", this, action);
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.am", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* AMPlugin::createChannel(const QString& channelName)
|
PluginGUI* AMPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -47,9 +47,9 @@ void BFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register BFM demodulator
|
// register BFM demodulator
|
||||||
QAction* action = new QAction(tr("&Broadcast FM Demodulator"), this);
|
// QAction* action = new QAction(tr("&Broadcast FM Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceBFM()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceBFM()));
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.bfm", this, action);
|
m_pluginAPI->registerChannel("sdrangel.channel.bfm", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* BFMPlugin::createChannel(const QString& channelName)
|
PluginGUI* BFMPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -45,9 +45,9 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register DSD demodulator
|
// register DSD demodulator
|
||||||
QAction* action = new QAction(tr("&DSD Demodulator"), this);
|
// QAction* action = new QAction(tr("&DSD Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceDSDDemod()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceDSDDemod()));
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this, action);
|
m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName)
|
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -28,9 +28,9 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
QAction* action = new QAction(tr("&LoRa Demodulator"), this);
|
// QAction* action = new QAction(tr("&LoRa Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceLoRa()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceLoRa()));
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this, action);
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* LoRaPlugin::createChannel(const QString& channelName)
|
PluginGUI* LoRaPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -28,9 +28,9 @@ void NFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register NFM demodulator
|
// register NFM demodulator
|
||||||
QAction* action = new QAction(tr("&NFM Demodulator"), this);
|
// QAction* action = new QAction(tr("&NFM Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceNFM()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceNFM()));
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this, action);
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* NFMPlugin::createChannel(const QString& channelName)
|
PluginGUI* NFMPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -28,9 +28,9 @@ void SSBPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register demodulator
|
// register demodulator
|
||||||
QAction* action = new QAction(tr("&SSB Demodulator"), this);
|
// QAction* action = new QAction(tr("&SSB Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceSSB()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceSSB()));
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.ssb", this, action);
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.ssb", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* SSBPlugin::createChannel(const QString& channelName)
|
PluginGUI* SSBPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -29,9 +29,9 @@ void WFMPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register WFM demodulator
|
// register WFM demodulator
|
||||||
QAction* action = new QAction(tr("&WFM Demodulator"), this);
|
// QAction* action = new QAction(tr("&WFM Demodulator"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceWFM()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceWFM()));
|
||||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.wfm", this, action);
|
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.wfm", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* WFMPlugin::createChannel(const QString& channelName)
|
PluginGUI* WFMPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -28,9 +28,9 @@ void TCPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register TCP Channel Source
|
// register TCP Channel Source
|
||||||
QAction* action = new QAction(tr("&TCP Source"), this);
|
// QAction* action = new QAction(tr("&TCP Source"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceTCPSrc()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceTCPSrc()));
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.tcpsrc", this, action);
|
m_pluginAPI->registerChannel("sdrangel.channel.tcpsrc", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName)
|
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -47,9 +47,9 @@ void UDPSrcPlugin::initPlugin(PluginAPI* pluginAPI)
|
|||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register TCP Channel Source
|
// register TCP Channel Source
|
||||||
QAction* action = new QAction(tr("&UDP Source"), this);
|
// QAction* action = new QAction(tr("&UDP Source"), this);
|
||||||
connect(action, SIGNAL(triggered()), this, SLOT(createInstanceUDPSrc()));
|
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceUDPSrc()));
|
||||||
m_pluginAPI->registerChannel("sdrangel.channel.udpsrc", this, action);
|
m_pluginAPI->registerChannel("sdrangel.channel.udpsrc", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName)
|
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName)
|
||||||
|
@ -238,10 +238,10 @@ void MainWindow::removeLastDevice()
|
|||||||
m_deviceUIs.pop_back();
|
m_deviceUIs.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::addChannelCreateAction(QAction* action) // TODO: move to some tabbed UI
|
//void MainWindow::addChannelCreateAction(QAction* action) // TODO: move to some tabbed UI
|
||||||
{
|
//{
|
||||||
ui->menu_Channels->addAction(action);
|
// ui->menu_Channels->addAction(action);
|
||||||
}
|
//}
|
||||||
|
|
||||||
void MainWindow::addChannelRollup(QWidget* widget)
|
void MainWindow::addChannelRollup(QWidget* widget)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
|
|
||||||
void addChannelCreateAction(QAction* action);
|
// void addChannelCreateAction(QAction* action);
|
||||||
void addChannelRollup(QWidget* widget);
|
void addChannelRollup(QWidget* widget);
|
||||||
void addViewAction(QAction* action);
|
void addViewAction(QAction* action);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
void setInputGUI(QWidget* inputGUI);
|
void setInputGUI(QWidget* inputGUI);
|
||||||
|
|
||||||
// Channel stuff
|
// Channel stuff
|
||||||
void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action);
|
void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action = 0);
|
||||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||||
void addChannelRollup(QWidget* pluginGUI);
|
void addChannelRollup(QWidget* pluginGUI);
|
||||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
void removeChannelInstance(PluginGUI* pluginGUI);
|
||||||
|
@ -54,7 +54,7 @@ void PluginManager::loadPlugins()
|
|||||||
void PluginManager::registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action)
|
void PluginManager::registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action)
|
||||||
{
|
{
|
||||||
m_channelRegistrations.append(ChannelRegistration(channelName, plugin));
|
m_channelRegistrations.append(ChannelRegistration(channelName, plugin));
|
||||||
m_mainWindow->addChannelCreateAction(action);
|
// m_mainWindow->addChannelCreateAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
const Plugins& getPlugins() const { return m_plugins; }
|
const Plugins& getPlugins() const { return m_plugins; }
|
||||||
|
|
||||||
// Callbacks from the plugins
|
// Callbacks from the plugins
|
||||||
void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action);
|
void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action = 0);
|
||||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||||
void addChannelRollup(QWidget* pluginGUI);
|
void addChannelRollup(QWidget* pluginGUI);
|
||||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
void removeChannelInstance(PluginGUI* pluginGUI);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user