mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 08:28:36 -05:00
Multi device support: moved loaded plugins dialog to devices control
This commit is contained in:
parent
942bd0a733
commit
f2872ae0ed
@ -18,7 +18,6 @@
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QLabel>
|
||||
//#include <QComboBox>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QFileDialog>
|
||||
@ -141,14 +140,6 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
|
||||
if (sampleSourceIndex >= 0)
|
||||
{
|
||||
//bool sampleSourceSignalsBlocked = ui->sampleSource->blockSignals(true);
|
||||
//ui->sampleSource->setCurrentIndex(sampleSourceIndex);
|
||||
//ui->sampleSource->blockSignals(sampleSourceSignalsBlocked);
|
||||
|
||||
// bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_sampleSource->blockSignals(true);
|
||||
// m_deviceUIs.back()->m_sampleSource->setCurrentIndex(sampleSourceIndex);
|
||||
// m_deviceUIs.back()->m_sampleSource->blockSignals(sampleSourceSignalsBlocked);
|
||||
|
||||
bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true);
|
||||
m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->setCurrentIndex(sampleSourceIndex);
|
||||
m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(sampleSourceSignalsBlocked);
|
||||
@ -180,17 +171,6 @@ MainWindow::~MainWindow()
|
||||
removeLastDevice();
|
||||
}
|
||||
|
||||
// m_dspEngine->stopAllAcquisitions(); // FIXME: also present in m_pluginManager->freeAll()
|
||||
// //m_pluginManager->freeAll();
|
||||
// for (int i = 0; i < m_deviceUIs.size(); i++)
|
||||
// {
|
||||
// m_deviceUIs[i]->m_pluginManager->freeAll();
|
||||
// delete m_deviceUIs[i];
|
||||
// }
|
||||
//
|
||||
// m_dspEngine->stopAllDeviceEngines();
|
||||
//
|
||||
// //delete m_pluginManager;
|
||||
delete m_dateTimeWidget;
|
||||
delete m_showSystemWidget;
|
||||
|
||||
@ -211,6 +191,7 @@ void MainWindow::addDevice()
|
||||
|
||||
PluginManager *pluginManager = new PluginManager(this, m_deviceUIs.size()-1, dspDeviceEngine, m_deviceUIs.back()->m_spectrum);
|
||||
m_deviceUIs.back()->m_pluginManager = pluginManager;
|
||||
m_deviceUIs.back()->m_samplingDeviceControl->setPluginManager(pluginManager);
|
||||
pluginManager->loadPlugins();
|
||||
|
||||
dspDeviceEngine->addSink(m_deviceUIs.back()->m_spectrumVis);
|
||||
@ -218,23 +199,11 @@ void MainWindow::addDevice()
|
||||
ui->tabSpectraGUI->addTab(m_deviceUIs.back()->m_spectrumGUI, tabNameCStr);
|
||||
ui->tabChannels->addTab(m_deviceUIs.back()->m_channelWindow, tabNameCStr);
|
||||
|
||||
// bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_sampleSource->blockSignals(true);
|
||||
// pluginManager->fillSampleSourceSelector(m_deviceUIs.back()->m_sampleSource);
|
||||
// connect(m_deviceUIs.back()->m_sampleSource, SIGNAL(currentIndexChanged(int)), this, SLOT(on_sampleSource_currentIndexChanged(int)));
|
||||
// m_deviceUIs.back()->m_sampleSource->blockSignals(sampleSourceSignalsBlocked);
|
||||
// int tabInputsSelectIndex = ui->tabInputsSelect->addTab(m_deviceUIs.back()->m_sampleSource, tabNameCStr);
|
||||
|
||||
bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true);
|
||||
pluginManager->fillSampleSourceSelector(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector());
|
||||
connect(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector(), SIGNAL(currentIndexChanged(int)), this, SLOT(on_sampleSource_currentIndexChanged(int)));
|
||||
m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(sampleSourceSignalsBlocked);
|
||||
// ui->tabInputsSelect->addTab(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector(), tabNameCStr);
|
||||
ui->tabInputsSelect->addTab(m_deviceUIs.back()->m_samplingDeviceControl, tabNameCStr);
|
||||
|
||||
// if (dspDeviceEngineUID == 0)
|
||||
// {
|
||||
// m_pluginManager = pluginManager;
|
||||
// }
|
||||
}
|
||||
|
||||
void MainWindow::removeLastDevice()
|
||||
@ -345,9 +314,6 @@ void MainWindow::loadPresetSettings(const Preset* preset)
|
||||
deviceUI->m_pluginManager->loadSettings(preset);
|
||||
}
|
||||
|
||||
// m_deviceUIs.back()->m_spectrumGUI->deserialize(preset->getSpectrumConfig());
|
||||
// m_pluginManager->loadSettings(preset);
|
||||
|
||||
// has to be last step
|
||||
restoreState(preset->getLayout());
|
||||
}
|
||||
@ -658,16 +624,6 @@ void MainWindow::on_presetTree_itemActivated(QTreeWidgetItem *item, int column)
|
||||
on_presetLoad_clicked();
|
||||
}
|
||||
|
||||
void MainWindow::on_action_Loaded_Plugins_triggered() // TODO: to be moved to a tabbed UI
|
||||
{
|
||||
if (m_deviceUIs.size() > 0)
|
||||
{
|
||||
DeviceUISet *deviceUISet = m_deviceUIs[0];
|
||||
PluginsDialog pluginsDialog(deviceUISet->m_pluginManager, this);
|
||||
pluginsDialog.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_action_Audio_triggered()
|
||||
{
|
||||
AudioDialog audioDialog(m_audioDeviceInfo, this);
|
||||
@ -716,10 +672,6 @@ void MainWindow::on_sampleSource_currentIndexChanged(int index)
|
||||
{
|
||||
DeviceUISet *deviceUI = m_deviceUIs[currentSourceTabIndex];
|
||||
deviceUI->m_pluginManager->saveSourceSettings(m_settings.getWorkingPreset());
|
||||
|
||||
// deviceUI->m_pluginManager->selectSampleSourceByIndex(m_deviceUIs.back()->m_sampleSource->currentIndex());
|
||||
// m_settings.setSourceIndex(deviceUI->m_sampleSource->currentIndex());
|
||||
|
||||
deviceUI->m_pluginManager->selectSampleSourceByIndex(m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->currentIndex());
|
||||
m_settings.setSourceIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex());
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
class QLabel;
|
||||
class QTreeWidgetItem;
|
||||
class QDir;
|
||||
//class QComboBox;
|
||||
class SamplingDeviceControl;
|
||||
|
||||
class AudioDeviceInfo;
|
||||
@ -59,7 +58,6 @@ public:
|
||||
GLSpectrum *m_spectrum;
|
||||
GLSpectrumGUI *m_spectrumGUI;
|
||||
ChannelWindow *m_channelWindow;
|
||||
// QComboBox *m_sampleSource;
|
||||
SamplingDeviceControl *m_samplingDeviceControl;
|
||||
DSPDeviceEngine *m_deviceEngine;
|
||||
PluginManager *m_pluginManager;
|
||||
@ -114,8 +112,6 @@ private:
|
||||
quint64 m_centerFrequency;
|
||||
std::string m_sampleFileName;
|
||||
|
||||
// PluginManager* m_pluginManager;
|
||||
|
||||
void loadSettings();
|
||||
void loadPresetSettings(const Preset* preset);
|
||||
void savePresetSettings(Preset* preset);
|
||||
@ -143,7 +139,6 @@ private slots:
|
||||
void on_presetDelete_clicked();
|
||||
void on_presetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||
void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
|
||||
void on_action_Loaded_Plugins_triggered(); // TODO: to be moved to a tabbed UI
|
||||
void on_action_Audio_triggered();
|
||||
void on_action_DV_Serial_triggered(bool checked);
|
||||
void on_sampleSource_currentIndexChanged(int index);
|
||||
|
@ -116,8 +116,6 @@
|
||||
<property name="title">
|
||||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="action_Loaded_Plugins"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_About"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Channels">
|
||||
|
Loading…
Reference in New Issue
Block a user