mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 11:12:27 -04:00
Multi device support: RTL-SDR plugin removed useless dependencies on plugin API
This commit is contained in:
parent
08a6554c4e
commit
1974b375ee
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "rtlsdrgui.h"
|
#include "rtlsdrgui.h"
|
||||||
#include "ui_rtlsdrgui.h"
|
#include "ui_rtlsdrgui.h"
|
||||||
#include "plugin/pluginapi.h"
|
|
||||||
#include "device/deviceapi.h"
|
#include "device/deviceapi.h"
|
||||||
#include "gui/colormapper.h"
|
#include "gui/colormapper.h"
|
||||||
#include "gui/glspectrum.h"
|
#include "gui/glspectrum.h"
|
||||||
@ -27,10 +26,9 @@
|
|||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
#include "dsp/filesink.h"
|
#include "dsp/filesink.h"
|
||||||
|
|
||||||
RTLSDRGui::RTLSDRGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent) :
|
RTLSDRGui::RTLSDRGui(DeviceAPI *deviceAPI, QWidget* parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::RTLSDRGui),
|
ui(new Ui::RTLSDRGui),
|
||||||
m_pluginAPI(pluginAPI),
|
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(0),
|
m_sampleSource(0),
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "plugin/plugingui.h"
|
#include "plugin/plugingui.h"
|
||||||
#include "rtlsdrinput.h"
|
#include "rtlsdrinput.h"
|
||||||
|
|
||||||
class PluginAPI;
|
|
||||||
class DeviceAPI;
|
class DeviceAPI;
|
||||||
class FileSink;
|
class FileSink;
|
||||||
|
|
||||||
@ -34,7 +33,7 @@ class RTLSDRGui : public QWidget, public PluginGUI {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RTLSDRGui(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent = NULL);
|
explicit RTLSDRGui(DeviceAPI *deviceAPI, QWidget* parent = NULL);
|
||||||
virtual ~RTLSDRGui();
|
virtual ~RTLSDRGui();
|
||||||
void destroy();
|
void destroy();
|
||||||
|
|
||||||
@ -51,7 +50,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
Ui::RTLSDRGui* ui;
|
Ui::RTLSDRGui* ui;
|
||||||
|
|
||||||
PluginAPI* m_pluginAPI;
|
|
||||||
DeviceAPI* m_deviceAPI;
|
DeviceAPI* m_deviceAPI;
|
||||||
RTLSDRSettings m_settings;
|
RTLSDRSettings m_settings;
|
||||||
QTimer m_updateTimer;
|
QTimer m_updateTimer;
|
||||||
|
@ -30,9 +30,7 @@ const PluginDescriptor& RTLSDRPlugin::getPluginDescriptor() const
|
|||||||
|
|
||||||
void RTLSDRPlugin::initPlugin(PluginAPI* pluginAPI)
|
void RTLSDRPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||||
{
|
{
|
||||||
m_pluginAPI = pluginAPI;
|
pluginAPI->registerSampleSource(m_deviceTypeID, this);
|
||||||
|
|
||||||
m_pluginAPI->registerSampleSource(m_deviceTypeID, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginInterface::SampleSourceDevices RTLSDRPlugin::enumSampleSources()
|
PluginInterface::SampleSourceDevices RTLSDRPlugin::enumSampleSources()
|
||||||
@ -63,7 +61,7 @@ PluginInterface::SampleSourceDevices RTLSDRPlugin::enumSampleSources()
|
|||||||
PluginGUI* RTLSDRPlugin::createSampleSourcePluginGUI(const QString& sourceId, QWidget **widget, DeviceAPI *deviceAPI)
|
PluginGUI* RTLSDRPlugin::createSampleSourcePluginGUI(const QString& sourceId, QWidget **widget, DeviceAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
if(sourceId == m_deviceTypeID) {
|
if(sourceId == m_deviceTypeID) {
|
||||||
RTLSDRGui* gui = new RTLSDRGui(m_pluginAPI, deviceAPI);
|
RTLSDRGui* gui = new RTLSDRGui(deviceAPI);
|
||||||
*widget = gui;
|
*widget = gui;
|
||||||
return gui;
|
return gui;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
|
|
||||||
|
class PluginAPI;
|
||||||
|
|
||||||
#define RTLSDR_DEVICE_TYPE_ID "sdrangel.samplesource.rtlsdr"
|
#define RTLSDR_DEVICE_TYPE_ID "sdrangel.samplesource.rtlsdr"
|
||||||
|
|
||||||
class RTLSDRPlugin : public QObject, public PluginInterface {
|
class RTLSDRPlugin : public QObject, public PluginInterface {
|
||||||
@ -24,8 +26,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static const PluginDescriptor m_pluginDescriptor;
|
static const PluginDescriptor m_pluginDescriptor;
|
||||||
|
|
||||||
PluginAPI* m_pluginAPI;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_RTLSDRPLUGIN_H
|
#endif // INCLUDE_RTLSDRPLUGIN_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user