mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -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;
|
||||
|
||||
// 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, action);
|
||||
// QAction* action = new QAction(tr("&ChannelAnalyzer"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceChannelAnalyzer()));
|
||||
m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this);
|
||||
}
|
||||
|
||||
PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName)
|
||||
|
@ -29,9 +29,9 @@ void AMPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// 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()));
|
||||
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)
|
||||
|
@ -47,9 +47,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&Broadcast FM Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceBFM()));
|
||||
m_pluginAPI->registerChannel("sdrangel.channel.bfm", this);
|
||||
}
|
||||
|
||||
PluginGUI* BFMPlugin::createChannel(const QString& channelName)
|
||||
|
@ -45,9 +45,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&DSD Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceDSDDemod()));
|
||||
m_pluginAPI->registerChannel("sdrangel.channel.dsddemod", this);
|
||||
}
|
||||
|
||||
PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName)
|
||||
|
@ -28,9 +28,9 @@ 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);
|
||||
// QAction* action = new QAction(tr("&LoRa Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceLoRa()));
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.lora", this);
|
||||
}
|
||||
|
||||
PluginGUI* LoRaPlugin::createChannel(const QString& channelName)
|
||||
|
@ -28,9 +28,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&NFM Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceNFM()));
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.nfm", this);
|
||||
}
|
||||
|
||||
PluginGUI* NFMPlugin::createChannel(const QString& channelName)
|
||||
|
@ -28,9 +28,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&SSB Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceSSB()));
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.ssb", this);
|
||||
}
|
||||
|
||||
PluginGUI* SSBPlugin::createChannel(const QString& channelName)
|
||||
|
@ -29,9 +29,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&WFM Demodulator"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceWFM()));
|
||||
m_pluginAPI->registerChannel("de.maintech.sdrangelove.channel.wfm", this);
|
||||
}
|
||||
|
||||
PluginGUI* WFMPlugin::createChannel(const QString& channelName)
|
||||
|
@ -28,9 +28,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&TCP Source"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceTCPSrc()));
|
||||
m_pluginAPI->registerChannel("sdrangel.channel.tcpsrc", this);
|
||||
}
|
||||
|
||||
PluginGUI* TCPSrcPlugin::createChannel(const QString& channelName)
|
||||
|
@ -47,9 +47,9 @@ 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, action);
|
||||
// QAction* action = new QAction(tr("&UDP Source"), this);
|
||||
// connect(action, SIGNAL(triggered()), this, SLOT(createInstanceUDPSrc()));
|
||||
m_pluginAPI->registerChannel("sdrangel.channel.udpsrc", this);
|
||||
}
|
||||
|
||||
PluginGUI* UDPSrcPlugin::createChannel(const QString& channelName)
|
||||
|
@ -238,10 +238,10 @@ 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::addChannelCreateAction(QAction* action) // TODO: move to some tabbed UI
|
||||
//{
|
||||
// ui->menu_Channels->addAction(action);
|
||||
//}
|
||||
|
||||
void MainWindow::addChannelRollup(QWidget* widget)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
|
||||
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
|
||||
void addChannelCreateAction(QAction* action);
|
||||
// void addChannelCreateAction(QAction* action);
|
||||
void addChannelRollup(QWidget* widget);
|
||||
void addViewAction(QAction* action);
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
void setInputGUI(QWidget* inputGUI);
|
||||
|
||||
// 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 addChannelRollup(QWidget* pluginGUI);
|
||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
||||
|
@ -54,7 +54,7 @@ void PluginManager::loadPlugins()
|
||||
void PluginManager::registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action)
|
||||
{
|
||||
m_channelRegistrations.append(ChannelRegistration(channelName, plugin));
|
||||
m_mainWindow->addChannelCreateAction(action);
|
||||
// m_mainWindow->addChannelCreateAction(action);
|
||||
}
|
||||
|
||||
void PluginManager::registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI)
|
||||
|
@ -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);
|
||||
void registerChannel(const QString& channelName, PluginInterface* plugin, QAction* action = 0);
|
||||
void registerChannelInstance(const QString& channelName, PluginGUI* pluginGUI);
|
||||
void addChannelRollup(QWidget* pluginGUI);
|
||||
void removeChannelInstance(PluginGUI* pluginGUI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user