From 1c9f11a5dcbd240ff760fc35c7309626bec08630 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 15 Sep 2017 08:24:39 +0200 Subject: [PATCH] On the device source API use more meaningful name for GUI interface --- sdrbase/device/devicesourceapi.cpp | 2 +- sdrbase/device/devicesourceapi.h | 4 ++-- sdrbase/mainwindow.cpp | 8 ++++---- sdrbase/plugin/pluginmanager.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdrbase/device/devicesourceapi.cpp b/sdrbase/device/devicesourceapi.cpp index 2f16fd140..798770d64 100644 --- a/sdrbase/device/devicesourceapi.cpp +++ b/sdrbase/device/devicesourceapi.cpp @@ -179,7 +179,7 @@ void DeviceSourceAPI::setSampleSourcePluginInterface(PluginInterface *interface) m_pluginInterface = interface; } -void DeviceSourceAPI::setSampleSourcePluginInstanceUI(PluginInstanceUI *gui) +void DeviceSourceAPI::setSampleSourcePluginInstanceGUI(PluginInstanceUI *gui) { m_sampleSourcePluginInstanceUI = gui; } diff --git a/sdrbase/device/devicesourceapi.h b/sdrbase/device/devicesourceapi.h index f3d44dcb4..b472ea183 100644 --- a/sdrbase/device/devicesourceapi.h +++ b/sdrbase/device/devicesourceapi.h @@ -74,7 +74,7 @@ public: void setSampleSourceDisplayName(const QString& serial); void setSampleSourceSequence(int sequence); void setSampleSourcePluginInterface(PluginInterface *interface); - void setSampleSourcePluginInstanceUI(PluginInstanceUI *gui); + void setSampleSourcePluginInstanceGUI(PluginInstanceUI *gui); const QString& getHardwareId() const { return m_hardwareId; } const QString& getSampleSourceId() const { return m_sampleSourceId; } @@ -82,7 +82,7 @@ public: const QString& getSampleSourceDisplayName() const { return m_sampleSourceDisplayName; } PluginInterface *getPluginInterface() { return m_pluginInterface; } uint32_t getSampleSourceSequence() const { return m_sampleSourceSequence; } - PluginInstanceUI *getSampleSourcePluginInstanceUI() { return m_sampleSourcePluginInstanceUI; } + PluginInstanceUI *getSampleSourcePluginInstanceGUI() { return m_sampleSourcePluginInstanceUI; } void registerChannelInstance(const QString& channelName, PluginInstanceUI* pluginGUI); void removeChannelInstance(PluginInstanceUI* pluginGUI); diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 2a10a0330..aa4e44361 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -143,7 +143,7 @@ MainWindow::MainWindow(QWidget* parent) : QWidget *gui; PluginInstanceUI *pluginGUI = m_deviceUIs.back()->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI( m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(), &gui, m_deviceUIs.back()->m_deviceSourceAPI); - m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceUI(pluginGUI); + m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginGUI); setDeviceGUI(0, gui, m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceDisplayName()); m_deviceUIs.back()->m_deviceSourceAPI->setBuddyLeader(true); // the first device is always the leader @@ -223,7 +223,7 @@ void MainWindow::addSourceDevice() QWidget *gui; PluginInstanceUI *pluginGUI = m_deviceUIs.back()->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI( m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(), &gui, m_deviceUIs.back()->m_deviceSourceAPI); - m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceUI(pluginGUI); + m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginGUI); setDeviceGUI(deviceTabIndex, gui, m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceDisplayName()); } @@ -818,7 +818,7 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked __attribute__((unus deviceUI->m_deviceSourceAPI->stopAcquisition(); // deletes old UI and input object - deviceUI->m_deviceSourceAPI->getPluginInterface()->deleteSampleSourcePluginInstanceGUI(deviceUI->m_deviceSourceAPI->getSampleSourcePluginInstanceUI()); + deviceUI->m_deviceSourceAPI->getPluginInterface()->deleteSampleSourcePluginInstanceGUI(deviceUI->m_deviceSourceAPI->getSampleSourcePluginInstanceGUI()); deviceUI->m_deviceSourceAPI->resetSampleSourceId(); deviceUI->m_deviceSourceAPI->clearBuddiesLists(); // clear old API buddies lists @@ -861,7 +861,7 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked __attribute__((unus // constructs new GUI and input object QWidget *gui; PluginInstanceUI *pluginUI = deviceUI->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI(deviceUI->m_deviceSourceAPI->getSampleSourceId(), &gui, deviceUI->m_deviceSourceAPI); - deviceUI->m_deviceSourceAPI->setSampleSourcePluginInstanceUI(pluginUI); + deviceUI->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginUI); setDeviceGUI(currentSourceTabIndex, gui, deviceUI->m_deviceSourceAPI->getSampleSourceDisplayName()); deviceUI->m_deviceSourceAPI->loadSourceSettings(m_settings.getWorkingPreset()); // load new API settings diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index 85aa6e3f1..24083218d 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -384,7 +384,7 @@ int PluginManager::selectSampleSourceByIndex(int index, DeviceSourceAPI *deviceA << " seq: " << m_sampleSourceDevices[index].m_deviceSequence; deviceAPI->stopAcquisition(); - deviceAPI->setSampleSourcePluginInstanceUI(0); // this effectively destroys the previous GUI if it exists + deviceAPI->setSampleSourcePluginInstanceGUI(0); // this effectively destroys the previous GUI if it exists deviceAPI->setSampleSourceSequence(m_sampleSourceDevices[index].m_deviceSequence); deviceAPI->setHardwareId(m_sampleSourceDevices[index].m_hadrwareId); @@ -456,7 +456,7 @@ int PluginManager::selectSampleSourceBySerialOrSequence(const QString& sourceId, << " seq: " << m_sampleSourceDevices[index].m_deviceSequence; deviceAPI->stopAcquisition(); - deviceAPI->setSampleSourcePluginInstanceUI(0); // this effectively destroys the previous GUI if it exists + deviceAPI->setSampleSourcePluginInstanceGUI(0); // this effectively destroys the previous GUI if it exists // m_sampleSourcePluginGUI = pluginGUI; deviceAPI->setSampleSourceSequence(m_sampleSourceDevices[index].m_deviceSequence);