mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-17 23:28:50 -05:00
Multi device support: implement input source details in device API
This commit is contained in:
parent
500e809cba
commit
bb8c3a305f
@ -15,6 +15,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "device/deviceapi.h"
|
||||
#include "plugin/plugingui.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "gui/channelwindow.h"
|
||||
#include "mainwindow.h"
|
||||
@ -28,7 +29,9 @@ DeviceAPI::DeviceAPI(MainWindow *mainWindow,
|
||||
m_deviceTabIndex(deviceTabIndex),
|
||||
m_deviceEngine(deviceEngine),
|
||||
m_spectrum(glSpectrum),
|
||||
m_channelWindow(channelWindow)
|
||||
m_channelWindow(channelWindow),
|
||||
m_sampleSourceSequence(0),
|
||||
m_sampleSourcePluginGUI(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -135,3 +138,36 @@ void DeviceAPI::setInputGUI(QWidget* inputGUI, const QString& sourceDisplayName)
|
||||
{
|
||||
m_mainWindow->setInputGUI(m_deviceTabIndex, inputGUI, sourceDisplayName);
|
||||
}
|
||||
|
||||
void DeviceAPI::setSampleSourceId(const QString& id)
|
||||
{
|
||||
m_sampleSourceId = id;
|
||||
}
|
||||
|
||||
void DeviceAPI::setSampleSourceSerial(const QString& serial)
|
||||
{
|
||||
m_sampleSourceSerial = serial;
|
||||
}
|
||||
|
||||
void DeviceAPI::setSampleSourceSequence(int sequence)
|
||||
{
|
||||
m_sampleSourceSequence = sequence;
|
||||
}
|
||||
|
||||
void DeviceAPI::setSampleSourcePluginGUI(PluginGUI *gui)
|
||||
{
|
||||
m_sampleSourcePluginGUI = gui;
|
||||
}
|
||||
|
||||
void DeviceAPI::freeAll()
|
||||
{
|
||||
m_deviceEngine->stopAcquistion();
|
||||
|
||||
if(m_sampleSourcePluginGUI != 0)
|
||||
{
|
||||
m_deviceEngine->setSource(0);
|
||||
m_sampleSourcePluginGUI->destroy();
|
||||
m_sampleSourcePluginGUI = 0;
|
||||
m_sampleSourceId.clear();
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,13 @@ public:
|
||||
void addRollupWidget(QWidget *widget); //!< Add rollup widget to channel window
|
||||
void setInputGUI(QWidget* inputGUI, const QString& sourceDisplayName);
|
||||
|
||||
void setSampleSourceId(const QString& id);
|
||||
void setSampleSourceSerial(const QString& serial);
|
||||
void setSampleSourceSequence(int sequence);
|
||||
void setSampleSourcePluginGUI(PluginGUI *gui);
|
||||
|
||||
void freeAll();
|
||||
|
||||
protected:
|
||||
DeviceAPI(MainWindow *mainWindow,
|
||||
int deviceTabIndex,
|
||||
@ -79,6 +86,11 @@ protected:
|
||||
GLSpectrum *m_spectrum;
|
||||
ChannelWindow *m_channelWindow;
|
||||
|
||||
QString m_sampleSourceId;
|
||||
QString m_sampleSourceSerial;
|
||||
int m_sampleSourceSequence;
|
||||
PluginGUI* m_sampleSourcePluginGUI;
|
||||
|
||||
friend class MainWindow;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user