mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-17 05:41:56 -05:00
On sample source confirm clicked delete old UI with the plugin interface
This commit is contained in:
parent
3606ab2cf2
commit
e2f15792ad
@ -153,6 +153,11 @@ void DeviceSourceAPI::setSampleSourceId(const QString& id)
|
||||
m_sampleSourceId = id;
|
||||
}
|
||||
|
||||
void DeviceSourceAPI::resetSampleSourceId()
|
||||
{
|
||||
m_sampleSourceId.clear();
|
||||
}
|
||||
|
||||
void DeviceSourceAPI::setSampleSourceSerial(const QString& serial)
|
||||
{
|
||||
m_sampleSourceSerial = serial;
|
||||
@ -176,12 +181,6 @@ void DeviceSourceAPI::setSampleSourcePluginInterface(PluginInterface *interface)
|
||||
|
||||
void DeviceSourceAPI::setSampleSourcePluginInstanceUI(PluginInstanceUI *gui)
|
||||
{
|
||||
if (m_sampleSourcePluginInstanceUI != 0)
|
||||
{
|
||||
m_sampleSourcePluginInstanceUI->destroy();
|
||||
m_sampleSourceId.clear();
|
||||
}
|
||||
|
||||
m_sampleSourcePluginInstanceUI = gui;
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ public:
|
||||
|
||||
void setHardwareId(const QString& id);
|
||||
void setSampleSourceId(const QString& id);
|
||||
void resetSampleSourceId();
|
||||
void setSampleSourceSerial(const QString& serial);
|
||||
void setSampleSourceDisplayName(const QString& serial);
|
||||
void setSampleSourceSequence(int sequence);
|
||||
@ -81,6 +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; }
|
||||
|
||||
void registerChannelInstance(const QString& channelName, PluginInstanceUI* pluginGUI);
|
||||
void removeChannelInstance(PluginInstanceUI* pluginGUI);
|
||||
|
@ -817,7 +817,9 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked __attribute__((unus
|
||||
void *devicePtr = deviceUI->m_samplingDeviceControl->getDeviceSelector()->itemData(selectedComboIndex).value<void *>();
|
||||
deviceUI->m_deviceSourceAPI->stopAcquisition();
|
||||
|
||||
deviceUI->m_deviceSourceAPI->setSampleSourcePluginInstanceUI(0); // deletes old UI and input object
|
||||
// deletes old UI and input object
|
||||
deviceUI->m_deviceSourceAPI->getPluginInterface()->deleteSampleSourcePluginInstanceGUI(deviceUI->m_deviceSourceAPI->getSampleSourcePluginInstanceUI());
|
||||
deviceUI->m_deviceSourceAPI->resetSampleSourceId();
|
||||
deviceUI->m_deviceSourceAPI->clearBuddiesLists(); // clear old API buddies lists
|
||||
|
||||
m_pluginManager->selectSampleSourceByDevice(devicePtr, deviceUI->m_deviceSourceAPI); // sets the new API
|
||||
|
Loading…
Reference in New Issue
Block a user