mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 01:39:05 -05:00
Plugin manager: neutralize QComboBox
This commit is contained in:
parent
467e87730b
commit
0e1cc647cd
@ -229,6 +229,7 @@ void MainWindow::addSourceDevice()
|
||||
|
||||
bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true);
|
||||
m_pluginManager->duplicateLocalSampleSourceDevices(dspDeviceSourceEngineUID);
|
||||
// FIXME: replace with the device selection dialog based on static enumeration
|
||||
m_pluginManager->fillSampleSourceSelector(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector(), dspDeviceSourceEngineUID);
|
||||
|
||||
connect(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelectionConfirm(), SIGNAL(clicked(bool)), this, SLOT(on_sampleSource_confirmClicked(bool)));
|
||||
@ -294,6 +295,7 @@ void MainWindow::addSinkDevice()
|
||||
|
||||
bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true);
|
||||
m_pluginManager->duplicateLocalSampleSinkDevices(dspDeviceSinkEngineUID);
|
||||
// FIXME: replace with the device selection dialog based on static enumeration
|
||||
m_pluginManager->fillSampleSinkSelector(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector(), dspDeviceSinkEngineUID);
|
||||
|
||||
connect(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelectionConfirm(), SIGNAL(clicked(bool)), this, SLOT(on_sampleSink_confirmClicked(bool)));
|
||||
|
@ -14,9 +14,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QPluginLoader>
|
||||
#include <QComboBox>
|
||||
//#include <QComboBox>
|
||||
#include <QDebug>
|
||||
|
||||
#include <cstdio>
|
||||
@ -54,7 +54,7 @@ PluginManager::~PluginManager()
|
||||
|
||||
void PluginManager::loadPlugins()
|
||||
{
|
||||
QString applicationDirPath = QApplication::instance()->applicationDirPath();
|
||||
QString applicationDirPath = QCoreApplication::instance()->applicationDirPath();
|
||||
QString applicationLibPath = applicationDirPath + "/../lib";
|
||||
qDebug() << "PluginManager::loadPlugins: " << qPrintable(applicationDirPath) << ", " << qPrintable(applicationLibPath);
|
||||
|
||||
@ -263,41 +263,45 @@ void PluginManager::duplicateLocalSampleSinkDevices(uint deviceUID)
|
||||
}
|
||||
}
|
||||
|
||||
void PluginManager::fillSampleSourceSelector(QComboBox* comboBox, uint deviceUID)
|
||||
void PluginManager::fillSampleSourceSelector(
|
||||
QComboBox* comboBox __attribute__((unused)),
|
||||
uint deviceUID __attribute__((unused)))
|
||||
{
|
||||
comboBox->clear();
|
||||
|
||||
for(int i = 0; i < m_sampleSourceDevices.count(); i++)
|
||||
{
|
||||
// For "local" devices show only ones that concern this device set
|
||||
if ((m_sampleSourceDevices[i].m_deviceId == m_sdrDaemonSourceDeviceTypeID)
|
||||
|| (m_sampleSourceDevices[i].m_deviceId == m_fileSourceDeviceTypeID))
|
||||
{
|
||||
if (deviceUID != m_sampleSourceDevices[i].m_deviceSequence) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
comboBox->addItem(m_sampleSourceDevices[i].m_displayName, qVariantFromValue((void *) &m_sampleSourceDevices[i]));
|
||||
}
|
||||
// comboBox->clear();
|
||||
//
|
||||
// for(int i = 0; i < m_sampleSourceDevices.count(); i++)
|
||||
// {
|
||||
// // For "local" devices show only ones that concern this device set
|
||||
// if ((m_sampleSourceDevices[i].m_deviceId == m_sdrDaemonSourceDeviceTypeID)
|
||||
// || (m_sampleSourceDevices[i].m_deviceId == m_fileSourceDeviceTypeID))
|
||||
// {
|
||||
// if (deviceUID != m_sampleSourceDevices[i].m_deviceSequence) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// comboBox->addItem(m_sampleSourceDevices[i].m_displayName, qVariantFromValue((void *) &m_sampleSourceDevices[i]));
|
||||
// }
|
||||
}
|
||||
|
||||
void PluginManager::fillSampleSinkSelector(QComboBox* comboBox, uint deviceUID)
|
||||
void PluginManager::fillSampleSinkSelector(
|
||||
QComboBox* comboBox __attribute__((unused)),
|
||||
uint deviceUID __attribute__((unused)))
|
||||
{
|
||||
comboBox->clear();
|
||||
|
||||
for(int i = 0; i < m_sampleSinkDevices.count(); i++)
|
||||
{
|
||||
// For "local" devices show only ones that concern this device set
|
||||
if (m_sampleSinkDevices[i].m_deviceId == m_fileSinkDeviceTypeID)
|
||||
{
|
||||
if (deviceUID != m_sampleSinkDevices[i].m_deviceSequence) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
comboBox->addItem(m_sampleSinkDevices[i].m_displayName, qVariantFromValue((void *) &m_sampleSinkDevices[i]));
|
||||
}
|
||||
// comboBox->clear();
|
||||
//
|
||||
// for(int i = 0; i < m_sampleSinkDevices.count(); i++)
|
||||
// {
|
||||
// // For "local" devices show only ones that concern this device set
|
||||
// if (m_sampleSinkDevices[i].m_deviceId == m_fileSinkDeviceTypeID)
|
||||
// {
|
||||
// if (deviceUID != m_sampleSinkDevices[i].m_deviceSequence) {
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// comboBox->addItem(m_sampleSinkDevices[i].m_displayName, qVariantFromValue((void *) &m_sampleSinkDevices[i]));
|
||||
// }
|
||||
}
|
||||
|
||||
int PluginManager::selectSampleSourceByIndex(int index, DeviceSourceAPI *deviceAPI)
|
||||
|
Loading…
Reference in New Issue
Block a user