1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

PluginManager: removed useless methods referencing QComboBox

This commit is contained in:
f4exb 2017-11-01 22:02:34 +01:00
parent 9a055c643b
commit 55cc8ed33d
2 changed files with 1 additions and 36 deletions

View File

@ -71,6 +71,7 @@ void PluginManager::loadPlugins()
it->pluginInterface->initPlugin(&m_pluginAPI);
}
// TODO: enumerate with DeviceEnumerator
updateSampleSourceDevices();
updateSampleSinkDevices();
}
@ -281,23 +282,6 @@ void PluginManager::fillSampleSourceSelector(QComboBox* comboBox, uint deviceUID
}
}
int PluginManager::getSampleSourceSelectorIndex(QComboBox* comboBox, DeviceSourceAPI *deviceSourceAPI)
{
for (int i = 0; i < comboBox->count(); i++)
{
SamplingDevice *samplingDevice = (SamplingDevice*) (comboBox->itemData(i)).value<void *>();
if ((samplingDevice->m_deviceId == deviceSourceAPI->getSampleSourceId()) &&
(samplingDevice->m_deviceSerial == deviceSourceAPI->getSampleSourceSerial()) &&
(samplingDevice->m_deviceSequence == deviceSourceAPI->getSampleSourceSequence()))
{
return i;
}
}
return 0; // default to first item
}
void PluginManager::fillSampleSinkSelector(QComboBox* comboBox, uint deviceUID)
{
comboBox->clear();
@ -316,23 +300,6 @@ void PluginManager::fillSampleSinkSelector(QComboBox* comboBox, uint deviceUID)
}
}
int PluginManager::getSampleSinkSelectorIndex(QComboBox* comboBox, DeviceSinkAPI *deviceSinkAPI)
{
for (int i = 0; i < comboBox->count(); i++)
{
SamplingDevice *samplingDevice = (SamplingDevice*) (comboBox->itemData(i)).value<void *>();
if ((samplingDevice->m_deviceId == deviceSinkAPI->getSampleSinkId()) &&
(samplingDevice->m_deviceSerial == deviceSinkAPI->getSampleSinkSerial()) &&
(samplingDevice->m_deviceSequence == deviceSinkAPI->getSampleSinkSequence()))
{
return i;
}
}
return 0; // default to first item
}
int PluginManager::selectSampleSourceByIndex(int index, DeviceSourceAPI *deviceAPI)
{
qDebug("PluginManager::selectSampleSourceByIndex: index: %d", index);

View File

@ -57,12 +57,10 @@ public:
void updateSampleSourceDevices();
void duplicateLocalSampleSourceDevices(uint deviceUID);
void fillSampleSourceSelector(QComboBox* comboBox, uint deviceUID);
int getSampleSourceSelectorIndex(QComboBox* comboBox, DeviceSourceAPI *deviceSourceAPI);
void updateSampleSinkDevices();
void duplicateLocalSampleSinkDevices(uint deviceUID);
void fillSampleSinkSelector(QComboBox* comboBox, uint deviceUID);
int getSampleSinkSelectorIndex(QComboBox* comboBox, DeviceSinkAPI *deviceSinkAPI);
int selectSampleSourceByIndex(int index, DeviceSourceAPI *deviceAPI);
int selectSampleSourceBySerialOrSequence(const QString& sourceId, const QString& sourceSerial, uint32_t sourceSequence, DeviceSourceAPI *deviceAPI);