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