1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 05:41:56 -05:00

On the device source API use more meaningful name for GUI interface

This commit is contained in:
f4exb 2017-09-15 08:24:39 +02:00
parent e2f15792ad
commit 1c9f11a5dc
4 changed files with 9 additions and 9 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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

View File

@ -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);