diff --git a/plugins/channel/chanalyzer/chanalyzerplugin.cpp b/plugins/channel/chanalyzer/chanalyzerplugin.cpp index 2012d9dad..c3da23e27 100644 --- a/plugins/channel/chanalyzer/chanalyzerplugin.cpp +++ b/plugins/channel/chanalyzer/chanalyzerplugin.cpp @@ -35,8 +35,6 @@ PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, Devi if(channelName == ChannelAnalyzerGUI::m_channelID) { ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -46,6 +44,4 @@ PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, Devi void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI) { ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodam/amplugin.cpp b/plugins/channel/demodam/amplugin.cpp index 996e8fbcb..5fef98a7f 100644 --- a/plugins/channel/demodam/amplugin.cpp +++ b/plugins/channel/demodam/amplugin.cpp @@ -37,8 +37,6 @@ PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceAPI *device if(channelName == AMDemodGUI::m_channelID) { AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -48,6 +46,4 @@ PluginGUI* AMPlugin::createChannel(const QString& channelName, DeviceAPI *device void AMPlugin::createInstanceAM(DeviceAPI *deviceAPI) { AMDemodGUI* gui = AMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.am", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodbfm/bfmplugin.cpp b/plugins/channel/demodbfm/bfmplugin.cpp index cb6220233..b34d40383 100644 --- a/plugins/channel/demodbfm/bfmplugin.cpp +++ b/plugins/channel/demodbfm/bfmplugin.cpp @@ -54,8 +54,6 @@ PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic if(channelName == BFMDemodGUI::m_channelID) { BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return 0; @@ -65,6 +63,4 @@ PluginGUI* BFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic void BFMPlugin::createInstanceBFM(DeviceAPI *deviceAPI) { BFMDemodGUI* gui = BFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("sdrangel.channel.bfm", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demoddsd/dsddemodplugin.cpp b/plugins/channel/demoddsd/dsddemodplugin.cpp index 0616168fe..9de4c19b1 100644 --- a/plugins/channel/demoddsd/dsddemodplugin.cpp +++ b/plugins/channel/demoddsd/dsddemodplugin.cpp @@ -53,8 +53,6 @@ PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI * if(channelName == DSDDemodGUI::m_channelID) { DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -64,6 +62,4 @@ PluginGUI* DSDDemodPlugin::createChannel(const QString& channelName, DeviceAPI * void DSDDemodPlugin::createInstanceDSDDemod(DeviceAPI *deviceAPI) { DSDDemodGUI* gui = DSDDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("sdrangel.channel.dsddemod", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodlora/loraplugin.cpp b/plugins/channel/demodlora/loraplugin.cpp index 0a08a6bf5..545f5b5d1 100644 --- a/plugins/channel/demodlora/loraplugin.cpp +++ b/plugins/channel/demodlora/loraplugin.cpp @@ -35,8 +35,6 @@ PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *devi if(channelName == LoRaDemodGUI::m_channelID) { LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -46,6 +44,4 @@ PluginGUI* LoRaPlugin::createChannel(const QString& channelName, DeviceAPI *devi void LoRaPlugin::createInstanceLoRa(DeviceAPI *deviceAPI) { LoRaDemodGUI* gui = LoRaDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.lora", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodnfm/nfmplugin.cpp b/plugins/channel/demodnfm/nfmplugin.cpp index 34bb9293f..92d5e9951 100644 --- a/plugins/channel/demodnfm/nfmplugin.cpp +++ b/plugins/channel/demodnfm/nfmplugin.cpp @@ -34,8 +34,6 @@ PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic { if(channelName == NFMDemodGUI::m_channelID) { NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance(NFMDemodGUI::m_channelID, gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -45,6 +43,4 @@ PluginGUI* NFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic void NFMPlugin::createInstanceNFM(DeviceAPI *deviceAPI) { NFMDemodGUI* gui = NFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance(NFMDemodGUI::m_channelID, gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodssb/ssbplugin.cpp b/plugins/channel/demodssb/ssbplugin.cpp index fbf1b2e85..ed826e8df 100644 --- a/plugins/channel/demodssb/ssbplugin.cpp +++ b/plugins/channel/demodssb/ssbplugin.cpp @@ -36,8 +36,6 @@ PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *devic if(channelName == SSBDemodGUI::m_channelID) { SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -47,6 +45,4 @@ PluginGUI* SSBPlugin::createChannel(const QString& channelName, DeviceAPI *devic void SSBPlugin::createInstanceSSB(DeviceAPI *deviceAPI) { SSBDemodGUI* gui = SSBDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.ssb", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/plugins/channel/demodwfm/wfmplugin.cpp b/plugins/channel/demodwfm/wfmplugin.cpp index c1e31720e..33b007c5f 100644 --- a/plugins/channel/demodwfm/wfmplugin.cpp +++ b/plugins/channel/demodwfm/wfmplugin.cpp @@ -36,8 +36,6 @@ PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic if(channelName == WFMDemodGUI::m_channelID) { WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui); -// m_pluginAPI->addChannelRollup(gui); return gui; } else { return NULL; @@ -47,6 +45,4 @@ PluginGUI* WFMPlugin::createChannel(const QString& channelName, DeviceAPI *devic void WFMPlugin::createInstanceWFM(DeviceAPI *deviceAPI) { WFMDemodGUI* gui = WFMDemodGUI::create(m_pluginAPI, deviceAPI); -// deviceAPI->registerChannelInstance("de.maintech.sdrangelove.channel.wfm", gui); -// m_pluginAPI->addChannelRollup(gui); } diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 373e07dd4..e1cf8abe9 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -202,7 +202,6 @@ void MainWindow::addDevice() bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true); m_pluginManager->fillSampleSourceSelector(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()); -// connect(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector(), SIGNAL(currentIndexChanged(int)), this, SLOT(on_sampleSource_currentIndexChanged(int))); connect(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelectionConfirm(), SIGNAL(clicked(bool)), this, SLOT(on_sampleSource_confirmClicked(bool))); m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(sampleSourceSignalsBlocked); @@ -277,21 +276,6 @@ void MainWindow::setInputGUI(int deviceTabIndex, QWidget* gui, const QString& so } ui->tabInputsView->setCurrentIndex(deviceTabIndex); - - -// if (deviceTabIndex < ui->tabInputsView->count()) -// { -// qDebug("MainWindow::setInputGUI: tab device index %d replace", deviceTabIndex); -// ui->tabInputsView->removeTab(deviceTabIndex); -// ui->tabInputsView->insertTab(deviceTabIndex, gui, tabNameCStr); -// } -// else -// { -// qDebug("MainWindow::setInputGUI: tab device index %d add", deviceTabIndex); -// ui->tabInputsView->addTab(gui, tabNameCStr); -// } - -// ui->tabInputsView->setTabToolTip(deviceTabIndex, sourceDisplayName); } void MainWindow::loadSettings() @@ -675,11 +659,8 @@ void MainWindow::on_sampleSource_currentIndexChanged(int index) qDebug("MainWindow::on_sampleSource_currentIndexChanged: tab at %d", currentSourceTabIndex); DeviceUISet *deviceUI = m_deviceUIs[currentSourceTabIndex]; deviceUI->m_deviceAPI->saveSourceSettings(m_settings.getWorkingPreset()); - //deviceUI->m_pluginManager->saveSourceSettings(m_settings.getWorkingPreset()); m_pluginManager->selectSampleSourceByIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex(), deviceUI->m_deviceAPI); m_settings.setSourceIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex()); - - //deviceUI->m_pluginManager->loadSourceSettings(m_settings.getWorkingPreset()); deviceUI->m_deviceAPI->loadSourceSettings(m_settings.getWorkingPreset()); } } @@ -694,11 +675,8 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked) qDebug("MainWindow::on_sampleSource_currentIndexChanged: tab at %d", currentSourceTabIndex); DeviceUISet *deviceUI = m_deviceUIs[currentSourceTabIndex]; deviceUI->m_deviceAPI->saveSourceSettings(m_settings.getWorkingPreset()); - //deviceUI->m_pluginManager->saveSourceSettings(m_settings.getWorkingPreset()); m_pluginManager->selectSampleSourceByIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex(), deviceUI->m_deviceAPI); m_settings.setSourceIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex()); - - //deviceUI->m_pluginManager->loadSourceSettings(m_settings.getWorkingPreset()); deviceUI->m_deviceAPI->loadSourceSettings(m_settings.getWorkingPreset()); } } @@ -748,7 +726,6 @@ MainWindow::DeviceUISet::DeviceUISet(QTimer& timer) m_samplingDeviceControl = new SamplingDeviceControl; m_deviceEngine = 0; m_deviceAPI = 0; -// m_pluginManager = 0; // m_spectrum needs to have its font to be set since it cannot be inherited from the main window QFont font; diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 1b88117d4..dca8c61b9 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -17,11 +17,7 @@ PluginManager::PluginManager(MainWindow* mainWindow, QObject* parent) : QObject(parent), m_pluginAPI(this, mainWindow), - m_mainWindow(mainWindow)//, -// m_sampleSourceId(), -// m_sampleSourceSerial(), -// m_sampleSourceSequence(0), -// m_sampleSourcePluginGUI(NULL) + m_mainWindow(mainWindow) { } @@ -114,20 +110,6 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceAPI *deviceAPI) index = 0; } -// deviceAPI->stopAcquisition(); -// -// if(m_sampleSourcePluginGUI != NULL) { -// deviceAPI->stopAcquisition(); -// deviceAPI->setSource(0); -// m_sampleSourcePluginGUI->destroy(); -// m_sampleSourcePluginGUI = NULL; -// m_sampleSourceId.clear(); -// } -// -// m_sampleSourceId = m_sampleSourceDevices[index].m_sourceId; -// m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; -// m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; - qDebug() << "PluginManager::selectSampleSourceByIndex: m_sampleSource at index " << index << " id: " << m_sampleSourceDevices[index].m_sourceId.toStdString().c_str() << " ser: " << m_sampleSourceDevices[index].m_sourceSerial.toStdString().c_str() @@ -155,16 +137,6 @@ int PluginManager::selectFirstSampleSource(const QString& sourceId, DeviceAPI *d int index = -1; -// deviceAPI->stopAcquisition(); -// -// if(m_sampleSourcePluginGUI != NULL) { -// deviceAPI->stopAcquisition(); -// deviceAPI->setSource(0); -// m_sampleSourcePluginGUI->destroy(); -// m_sampleSourcePluginGUI = NULL; -// m_sampleSourceId.clear(); -// } - for (int i = 0; i < m_sampleSourceDevices.count(); i++) { qDebug("*** %s vs %s", qPrintable(m_sampleSourceDevices[i].m_sourceId), qPrintable(sourceId)); @@ -188,10 +160,6 @@ int PluginManager::selectFirstSampleSource(const QString& sourceId, DeviceAPI *d } } -// m_sampleSourceId = m_sampleSourceDevices[index].m_sourceId; -// m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; -// m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; - qDebug() << "PluginManager::selectFirstSampleSource: m_sampleSource at index " << index << " id: " << m_sampleSourceDevices[index].m_sourceId.toStdString().c_str() << " ser: " << m_sampleSourceDevices[index].m_sourceSerial.toStdString().c_str() @@ -266,10 +234,6 @@ int PluginManager::selectSampleSourceBySerialOrSequence(const QString& sourceId, } } -// m_sampleSourceId = m_sampleSourceDevices[index].m_sourceId; -// m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; -// m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; - qDebug() << "PluginManager::selectSampleSourceBySequence: m_sampleSource at index " << index << " id: " << m_sampleSourceDevices[index].m_sourceId.toStdString().c_str() << " ser: " << m_sampleSourceDevices[index].m_sourceSerial.toStdString().c_str()