1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 12:51:49 -05:00

Multi device support: store device tab index in plugin manager

This commit is contained in:
f4exb 2016-05-13 17:35:14 +02:00
parent f612327a51
commit ef81b11640
3 changed files with 5 additions and 3 deletions

View File

@ -195,7 +195,7 @@ void MainWindow::addDevice()
m_deviceUIs.push_back(new DeviceUISet(m_masterTimer));
m_deviceUIs.back()->m_deviceEngine = dspDeviceEngine;
PluginManager *pluginManager = new PluginManager(this, dspDeviceEngine, m_deviceUIs.back()->m_spectrum);
PluginManager *pluginManager = new PluginManager(this, m_deviceUIs.size()-1, dspDeviceEngine, m_deviceUIs.back()->m_spectrum);
m_deviceUIs.back()->m_pluginManager = pluginManager;
pluginManager->loadPlugins();

View File

@ -10,10 +10,11 @@
#include <QDebug>
PluginManager::PluginManager(MainWindow* mainWindow, DSPDeviceEngine* dspDeviceEngine, GLSpectrum *spectrum, QObject* parent) :
PluginManager::PluginManager(MainWindow* mainWindow, uint deviceTabIndex, DSPDeviceEngine* dspDeviceEngine, GLSpectrum *spectrum, QObject* parent) :
QObject(parent),
m_pluginAPI(this, mainWindow),
m_mainWindow(mainWindow),
m_deviceTabIndex(deviceTabIndex),
m_dspDeviceEngine(dspDeviceEngine),
m_spectrum(spectrum),
m_sampleSourceId(),

View File

@ -39,7 +39,7 @@ public:
typedef QList<Plugin> Plugins;
explicit PluginManager(MainWindow* mainWindow, DSPDeviceEngine* dspDeviceEngine, GLSpectrum *spectrum, QObject* parent = NULL);
explicit PluginManager(MainWindow* mainWindow, uint deviceTabIndex, DSPDeviceEngine* dspDeviceEngine, GLSpectrum *spectrum, QObject* parent = NULL);
~PluginManager();
void loadPlugins();
@ -147,6 +147,7 @@ private:
PluginAPI m_pluginAPI;
MainWindow* m_mainWindow;
uint m_deviceTabIndex;
DSPDeviceEngine* m_dspDeviceEngine;
GLSpectrum* m_spectrum;
Plugins m_plugins;