mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -05:00
Removed GLSpectrum getter from DeviceSourceAPI
This commit is contained in:
parent
e8fb70096c
commit
e520ef5aeb
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
sdrangel (3.7.9-1) unstable; urgency=medium
|
||||
|
||||
* Refactoring: Separate DeviceAPI from the GUI
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 05 Nov 2017 18:14:18 +0200
|
||||
|
||||
sdrangel (3.7.8-1) unstable; urgency=medium
|
||||
|
||||
* PlutoSDR: restored and fixed Tx support
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "airspygui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/filerecord.h>
|
||||
|
||||
#include "ui_airspygui.h"
|
||||
@ -30,10 +31,11 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
AirspyGui::AirspyGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
AirspyGui::AirspyGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::AirspyGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(0),
|
||||
@ -150,8 +152,8 @@ void AirspyGui::handleInputMessages()
|
||||
|
||||
void AirspyGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#define AIRSPY_MAX_DEVICE (32)
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class AirspyGui;
|
||||
@ -37,7 +38,7 @@ class AirspyGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AirspyGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit AirspyGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~AirspyGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -58,6 +59,7 @@ private:
|
||||
Ui::AirspyGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
AirspySettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -119,11 +119,15 @@ PluginInterface::SamplingDevices AirspyPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* AirspyPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* AirspyPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if (sourceId == m_deviceTypeID)
|
||||
{
|
||||
AirspyGui* gui = new AirspyGui(deviceAPI);
|
||||
AirspyGui* gui = new AirspyGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -27,11 +27,13 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
|
||||
BladerfInputGui::BladerfInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
BladerfInputGui::BladerfInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::BladerfInputGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
@ -148,8 +150,8 @@ void BladerfInputGui::handleInputMessages()
|
||||
|
||||
void BladerfInputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "bladerfinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class BladerfInputGui;
|
||||
@ -35,7 +36,7 @@ class BladerfInputGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BladerfInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit BladerfInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~BladerfInputGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,6 +55,7 @@ private:
|
||||
Ui::BladerfInputGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
BladeRFInputSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -78,11 +78,15 @@ PluginInterface::SamplingDevices BlderfInputPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId,QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
BladerfInputGui* gui = new BladerfInputGui(deviceAPI);
|
||||
BladerfInputGui* gui = new BladerfInputGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
#define BLADERF_DEVICE_TYPE_ID "sdrangel.samplesource.bladerf"
|
||||
|
||||
@ -37,7 +38,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -24,13 +24,15 @@
|
||||
#include "fcdprogui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include "fcdproconst.h"
|
||||
#include "fcdtraits.h"
|
||||
|
||||
FCDProGui::FCDProGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
FCDProGui::FCDProGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FCDProGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
@ -235,8 +237,8 @@ void FCDProGui::handleInputMessages()
|
||||
|
||||
void FCDProGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class QWidget;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class FCDProGui;
|
||||
@ -36,7 +37,7 @@ class FCDProGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FCDProGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit FCDProGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~FCDProGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -55,6 +56,7 @@ private:
|
||||
Ui::FCDProGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
FCDProSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -74,11 +74,15 @@ PluginInterface::SamplingDevices FCDProPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* FCDProPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* FCDProPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == fcd_traits<Pro>::interfaceIID)
|
||||
{
|
||||
FCDProGui* gui = new FCDProGui(deviceAPI);
|
||||
FCDProGui* gui = new FCDProGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -20,7 +20,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
private:
|
||||
|
@ -25,13 +25,15 @@
|
||||
#include "fcdproplusgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include "fcdproplusconst.h"
|
||||
#include "fcdtraits.h"
|
||||
|
||||
FCDProPlusGui::FCDProPlusGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
FCDProPlusGui::FCDProPlusGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FCDProPlusGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
@ -153,8 +155,8 @@ void FCDProPlusGui::handleInputMessages()
|
||||
|
||||
void FCDProPlusGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "fcdproplusinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class FCDProPlusGui;
|
||||
@ -35,7 +36,7 @@ class FCDProPlusGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FCDProPlusGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit FCDProPlusGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~FCDProPlusGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,6 +55,7 @@ private:
|
||||
Ui::FCDProPlusGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
FCDProPlusSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -76,11 +76,15 @@ PluginInterface::SamplingDevices FCDProPlusPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* FCDProPlusPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* FCDProPlusPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == fcd_traits<ProPlus>::interfaceIID)
|
||||
{
|
||||
FCDProPlusGui* gui = new FCDProPlusGui(deviceAPI);
|
||||
FCDProPlusGui* gui = new FCDProPlusGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -20,7 +20,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_deviceTypeID;
|
||||
|
@ -33,11 +33,13 @@
|
||||
|
||||
#include "filesourcegui.h"
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
|
||||
FileSourceGui::FileSourceGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
FileSourceGui::FileSourceGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FileSourceGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_sampleSource(NULL),
|
||||
m_acquisition(false),
|
||||
@ -186,8 +188,8 @@ bool FileSourceGui::handleMessage(const Message& message)
|
||||
|
||||
void FileSourceGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_deviceSampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "filesourceinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class FileSourceGui;
|
||||
@ -35,7 +36,7 @@ class FileSourceGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileSourceGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit FileSourceGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~FileSourceGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,6 +55,7 @@ private:
|
||||
Ui::FileSourceGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
FileSourceInput::Settings m_settings;
|
||||
QTimer m_statusTimer;
|
||||
std::vector<int> m_gains;
|
||||
|
@ -69,11 +69,15 @@ PluginInterface::SamplingDevices FileSourcePlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* FileSourcePlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* FileSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
FileSourceGui* gui = new FileSourceGui(deviceAPI);
|
||||
FileSourceGui* gui = new FileSourceGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -27,14 +27,16 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "hackrf/devicehackrfvalues.h"
|
||||
|
||||
#include "ui_hackrfinputgui.h"
|
||||
|
||||
HackRFInputGui::HackRFInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
HackRFInputGui::HackRFInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::HackRFInputGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_forceSettings(true),
|
||||
m_sampleSource(NULL),
|
||||
@ -164,8 +166,8 @@ void HackRFInputGui::handleInputMessages()
|
||||
|
||||
void HackRFInputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(QString("%1k").arg(QString::number(m_sampleRate/1000.0, 'g', 5)));
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define HACKRF_MAX_DEVICE (32)
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class HackRFInputGui;
|
||||
@ -45,7 +46,7 @@ public:
|
||||
HACKRF_IMGREJ_NB
|
||||
} HackRFImgRejValue;
|
||||
|
||||
explicit HackRFInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit HackRFInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~HackRFInputGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -64,6 +65,7 @@ private:
|
||||
Ui::HackRFInputGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
HackRFInputSettings m_settings;
|
||||
bool m_forceSettings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -117,11 +117,15 @@ PluginInterface::SamplingDevices HackRFInputPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
HackRFInputGui* gui = new HackRFInputGui(deviceAPI);
|
||||
HackRFInputGui* gui = new HackRFInputGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -27,11 +27,13 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
|
||||
LimeSDRInputGUI::LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
LimeSDRInputGUI::LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::LimeSDRInputGUI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_sampleRate(0),
|
||||
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
|
||||
@ -246,8 +248,8 @@ void LimeSDRInputGUI::updateADCRate()
|
||||
|
||||
void LimeSDRInputGUI::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "limesdrinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class LimeSDRInputGUI;
|
||||
@ -35,7 +36,7 @@ class LimeSDRInputGUI : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, QWidget* parent = 0);
|
||||
explicit LimeSDRInputGUI(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~LimeSDRInputGUI();
|
||||
virtual void destroy();
|
||||
|
||||
@ -54,6 +55,7 @@ private:
|
||||
Ui::LimeSDRInputGUI* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
LimeSDRInput* m_limeSDRInput; //!< Same object as above but gives easy access to LimeSDRInput methods and attributes that are used intensively
|
||||
LimeSDRInputSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -97,11 +97,15 @@ PluginInterface::SamplingDevices LimeSDRInputPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* LimeSDRInputPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId,QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* LimeSDRInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
LimeSDRInputGUI* gui = new LimeSDRInputGUI(deviceAPI);
|
||||
LimeSDRInputGUI* gui = new LimeSDRInputGUI(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -22,15 +22,17 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "plutosdr/deviceplutosdr.h"
|
||||
#include "plutosdrinput.h"
|
||||
#include "ui_plutosdrinputgui.h"
|
||||
#include "plutosdrinputgui.h"
|
||||
|
||||
PlutoSDRInputGui::PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
PlutoSDRInputGui::PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::PlutoSDRInputGUI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_forceSettings(true),
|
||||
m_sampleSource(NULL),
|
||||
@ -464,7 +466,7 @@ void PlutoSDRInputGui::handleInputMessages()
|
||||
|
||||
void PlutoSDRInputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateLabel->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceSampleSource;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class PlutoSDRInputGUI;
|
||||
@ -37,7 +38,7 @@ class PlutoSDRInputGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, QWidget* parent = 0);
|
||||
explicit PlutoSDRInputGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~PlutoSDRInputGui();
|
||||
|
||||
virtual void destroy();
|
||||
@ -54,6 +55,7 @@ public:
|
||||
private:
|
||||
Ui::PlutoSDRInputGUI* ui;
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
PlutoSDRInputSettings m_settings;
|
||||
bool m_forceSettings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -81,11 +81,15 @@ PluginInterface::SamplingDevices PlutoSDRInputPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* PlutoSDRInputPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* PlutoSDRInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
PlutoSDRInputGui* gui = new PlutoSDRInputGui(deviceAPI);
|
||||
PlutoSDRInputGui* gui = new PlutoSDRInputGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "rtlsdrgui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include <dsp/filerecord.h>
|
||||
|
||||
#include "ui_rtlsdrgui.h"
|
||||
@ -29,10 +30,11 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
|
||||
RTLSDRGui::RTLSDRGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
RTLSDRGui::RTLSDRGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::RTLSDRGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true),
|
||||
m_settings(),
|
||||
m_sampleSource(0),
|
||||
@ -173,8 +175,8 @@ void RTLSDRGui::handleInputMessages()
|
||||
|
||||
void RTLSDRGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "rtlsdrinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class RTLSDRGui;
|
||||
@ -36,7 +37,7 @@ class RTLSDRGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RTLSDRGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit RTLSDRGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~RTLSDRGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -55,6 +56,7 @@ private:
|
||||
Ui::RTLSDRGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
RTLSDRSettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -62,10 +62,14 @@ PluginInterface::SamplingDevices RTLSDRPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* RTLSDRPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* RTLSDRPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID) {
|
||||
RTLSDRGui* gui = new RTLSDRGui(deviceAPI);
|
||||
RTLSDRGui* gui = new RTLSDRGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
} else {
|
||||
|
@ -20,7 +20,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -43,12 +43,14 @@
|
||||
#include "util/simpleserializer.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
#include "sdrdaemonsourcegui.h"
|
||||
|
||||
SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SDRdaemonSourceGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_sampleSource(NULL),
|
||||
m_acquisition(false),
|
||||
m_lastEngineState((DSPDeviceSourceEngine::State)-1),
|
||||
@ -284,8 +286,8 @@ void SDRdaemonSourceGui::handleInputMessages()
|
||||
|
||||
void SDRdaemonSourceGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_deviceSampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_deviceSampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "sdrdaemonsourceinput.h"
|
||||
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class SDRdaemonSourceGui;
|
||||
@ -36,7 +37,7 @@ class SDRdaemonSourceGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SDRdaemonSourceGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit SDRdaemonSourceGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~SDRdaemonSourceGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -55,6 +56,7 @@ private:
|
||||
Ui::SDRdaemonSourceGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
SDRdaemonSourceSettings m_settings; //!< current settings
|
||||
SDRdaemonSourceSettings m_controlSettings; //!< settings last sent to device via control port
|
||||
QTimer m_updateTimer;
|
||||
|
@ -70,11 +70,15 @@ PluginInterface::SamplingDevices SDRdaemonSourcePlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
SDRdaemonSourceGui* gui = new SDRdaemonSourceGui(deviceAPI);
|
||||
SDRdaemonSourceGui* gui = new SDRdaemonSourceGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "sdrplaygui.h"
|
||||
|
||||
#include <device/devicesourceapi.h>
|
||||
#include "device/deviceuiset.h"
|
||||
|
||||
#include "ui_sdrplaygui.h"
|
||||
#include "gui/colormapper.h"
|
||||
@ -28,10 +29,11 @@
|
||||
#include "dsp/dspcommands.h"
|
||||
|
||||
|
||||
SDRPlayGui::SDRPlayGui(DeviceSourceAPI *deviceAPI, QWidget* parent) :
|
||||
SDRPlayGui::SDRPlayGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SDRPlayGui),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_forceSettings(true)
|
||||
{
|
||||
m_sampleSource = (SDRPlayInput*) m_deviceAPI->getSampleSource();
|
||||
@ -198,8 +200,8 @@ void SDRPlayGui::handleInputMessages()
|
||||
|
||||
void SDRPlayGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceAPI->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceAPI->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||
ui->deviceRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
class DeviceSampleSource;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
|
||||
namespace Ui {
|
||||
class SDRPlayGui;
|
||||
@ -38,7 +39,7 @@ class SDRPlayGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SDRPlayGui(DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
|
||||
explicit SDRPlayGui(DeviceSourceAPI *deviceAPI, DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~SDRPlayGui();
|
||||
virtual void destroy();
|
||||
|
||||
@ -57,6 +58,7 @@ private:
|
||||
Ui::SDRPlayGui* ui;
|
||||
|
||||
DeviceSourceAPI* m_deviceAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
bool m_forceSettings;
|
||||
SDRPlaySettings m_settings;
|
||||
QTimer m_updateTimer;
|
||||
|
@ -83,11 +83,15 @@ PluginInterface::SamplingDevices SDRPlayPlugin::enumSampleSources()
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginInstanceGUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(const QString& sourceId,QWidget **widget, DeviceSourceAPI *deviceAPI)
|
||||
PluginInstanceGUI* SDRPlayPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
SDRPlayGui* gui = new SDRPlayGui(deviceAPI);
|
||||
SDRPlayGui* gui = new SDRPlayGui(deviceAPI, deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
|
@ -36,7 +36,11 @@ public:
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual SamplingDevices enumSampleSources();
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId, QWidget **widget, DeviceSourceAPI *deviceAPI);
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceSourceAPI *deviceAPI,
|
||||
DeviceUISet *deviceUISet);
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI);
|
||||
|
||||
static const QString m_hardwareID;
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
bool isBuddyLeader() const { return m_isBuddyLeader; }
|
||||
void setBuddyLeader(bool isBuddyLeader) { m_isBuddyLeader = isBuddyLeader; }
|
||||
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; } //!< This is the DSPEngine master timer
|
||||
|
||||
protected:
|
||||
struct ChannelInstanceRegistration
|
||||
@ -156,7 +156,7 @@ protected:
|
||||
std::vector<DeviceSinkAPI*> m_sinkBuddies; //!< Device sink APIs referencing the same physical device
|
||||
void *m_buddySharedPtr;
|
||||
bool m_isBuddyLeader;
|
||||
const QTimer& m_masterTimer;
|
||||
const QTimer& m_masterTimer; //!< This is the DSPEngine master timer
|
||||
|
||||
friend class DeviceSourceAPI;
|
||||
};
|
||||
|
@ -128,11 +128,6 @@ void DeviceSourceAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbal
|
||||
m_deviceSourceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
GLSpectrum *DeviceSourceAPI::getSpectrum()
|
||||
{
|
||||
return m_spectrum;
|
||||
}
|
||||
|
||||
void DeviceSourceAPI::addChannelMarker(ChannelMarker* channelMarker)
|
||||
{
|
||||
m_spectrum->addChannelMarker(channelMarker);
|
||||
|
@ -68,7 +68,6 @@ public:
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
|
||||
|
||||
// device related stuff
|
||||
GLSpectrum *getSpectrum(); //!< Direct spectrum getter
|
||||
void addChannelMarker(ChannelMarker* channelMarker); //!< Add channel marker to spectrum
|
||||
void addRollupWidget(QWidget *widget); //!< Add rollup widget to channel window
|
||||
|
||||
@ -113,7 +112,7 @@ public:
|
||||
bool isBuddyLeader() const { return m_isBuddyLeader; }
|
||||
void setBuddyLeader(bool isBuddyLeader) { m_isBuddyLeader = isBuddyLeader; }
|
||||
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; } //!< This is the DSPEngine master timer
|
||||
|
||||
protected:
|
||||
struct ChannelInstanceRegistration
|
||||
@ -158,7 +157,7 @@ protected:
|
||||
std::vector<DeviceSinkAPI*> m_sinkBuddies; //!< Device sink APIs referencing the same physical device
|
||||
void *m_buddySharedPtr;
|
||||
bool m_isBuddyLeader;
|
||||
const QTimer& m_masterTimer;
|
||||
const QTimer& m_masterTimer; //!< This is the DSPEngine master timer
|
||||
|
||||
friend class DeviceSinkAPI;
|
||||
};
|
||||
|
@ -29,6 +29,7 @@ class DSPDeviceSourceEngine;
|
||||
class DeviceSourceAPI;
|
||||
class DSPDeviceSinkEngine;
|
||||
class DeviceSinkAPI;
|
||||
class ChannelMarker;
|
||||
|
||||
struct DeviceUISet
|
||||
{
|
||||
@ -45,6 +46,10 @@ struct DeviceUISet
|
||||
|
||||
DeviceUISet(QTimer& timer);
|
||||
~DeviceUISet();
|
||||
|
||||
GLSpectrum *getSpectrum() { return m_spectrum; } //!< Direct spectrum getter
|
||||
void addChannelMarker(ChannelMarker* channelMarker); //!< Add channel marker to spectrum
|
||||
void addRollupWidget(QWidget *widget); //!< Add rollup widget to channel window
|
||||
};
|
||||
|
||||
|
||||
|
@ -84,7 +84,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Version 3.7.8 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html></string>
|
||||
<string><html><head/><body><p>Version 3.7.9 - Copyright (C) 2015-2017 Edouard Griffiths, F4EXB. </p><p>Code at <a href="https://github.com/f4exb/sdrangel"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/f4exb/sdrangel</span></a></p><p>Many thanks to the original developers:</p><p>The osmocom developer team - especially horizon, Hoernchen &amp; tnt.</p><p>Christian Daniel from maintech GmbH.</p><p>John Greb (hexameron) for the contributions in <a href="https://github.com/hexameron/rtl-sdrangelove"><span style=" text-decoration: underline; color:#0000ff;">RTL-SDRangelove</span></a></p><p>The following rules apply to the SDRangel main application and libsdrbase:<br/>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>.</p><p>For the license of installed plugins, look into the plugin list.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -152,7 +152,10 @@ MainWindow::MainWindow(QWidget* parent) :
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->setSampleSource(source);
|
||||
QWidget *gui;
|
||||
PluginInstanceGUI *pluginGUI = m_deviceUIs.back()->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI(
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(), &gui, m_deviceUIs.back()->m_deviceSourceAPI);
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(),
|
||||
&gui,
|
||||
m_deviceUIs.back()->m_deviceSourceAPI,
|
||||
m_deviceUIs.back());
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSource()->setMessageQueueToGUI(pluginGUI->getInputMessageQueue());
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginGUI);
|
||||
setDeviceGUI(0, gui, m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceDisplayName());
|
||||
@ -236,7 +239,10 @@ void MainWindow::addSourceDevice()
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->setSampleSource(source);
|
||||
QWidget *gui;
|
||||
PluginInstanceGUI *pluginGUI = m_deviceUIs.back()->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI(
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(), &gui, m_deviceUIs.back()->m_deviceSourceAPI);
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceId(),
|
||||
&gui,
|
||||
m_deviceUIs.back()->m_deviceSourceAPI,
|
||||
m_deviceUIs.back());
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->getSampleSource()->setMessageQueueToGUI(pluginGUI->getInputMessageQueue());
|
||||
m_deviceUIs.back()->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginGUI);
|
||||
setDeviceGUI(deviceTabIndex, gui, m_deviceUIs.back()->m_deviceSourceAPI->getSampleSourceDisplayName());
|
||||
@ -506,9 +512,9 @@ void MainWindow::createStatusBar()
|
||||
{
|
||||
QString qtVersionStr = QString("Qt %1 ").arg(QT_VERSION_STR);
|
||||
#if QT_VERSION >= 0x050400
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.8 " + qtVersionStr + QSysInfo::prettyProductName(), this);
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.9 " + qtVersionStr + QSysInfo::prettyProductName(), this);
|
||||
#else
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.8 " + qtVersionStr, this);
|
||||
m_showSystemWidget = new QLabel("SDRangel v3.7.9 " + qtVersionStr, this);
|
||||
#endif
|
||||
statusBar()->addPermanentWidget(m_showSystemWidget);
|
||||
|
||||
@ -901,7 +907,10 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked __attribute__((unus
|
||||
deviceUI->m_deviceSourceAPI->setSampleSource(source);
|
||||
QWidget *gui;
|
||||
PluginInstanceGUI *pluginUI = deviceUI->m_deviceSourceAPI->getPluginInterface()->createSampleSourcePluginInstanceGUI(
|
||||
deviceUI->m_deviceSourceAPI->getSampleSourceId(), &gui, deviceUI->m_deviceSourceAPI);
|
||||
deviceUI->m_deviceSourceAPI->getSampleSourceId(),
|
||||
&gui,
|
||||
deviceUI->m_deviceSourceAPI,
|
||||
deviceUI);
|
||||
deviceUI->m_deviceSourceAPI->getSampleSource()->setMessageQueueToGUI(pluginUI->getInputMessageQueue());
|
||||
deviceUI->m_deviceSourceAPI->setSampleSourcePluginInstanceGUI(pluginUI);
|
||||
setDeviceGUI(currentSourceTabIndex, gui, deviceUI->m_deviceSourceAPI->getSampleSourceDisplayName());
|
||||
|
@ -16,6 +16,7 @@ struct PluginDescriptor {
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceSourceAPI;
|
||||
class DeviceUISet;
|
||||
class DeviceSinkAPI;
|
||||
class PluginInstanceGUI;
|
||||
class QWidget;
|
||||
@ -59,7 +60,14 @@ public:
|
||||
|
||||
// device source plugins only
|
||||
virtual SamplingDevices enumSampleSources() { return SamplingDevices(); }
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(const QString& sourceId __attribute__((unused)), QWidget **widget __attribute__((unused)), DeviceSourceAPI *deviceAPI __attribute__((unused))) { return 0; }
|
||||
|
||||
virtual PluginInstanceGUI* createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId __attribute__((unused)),
|
||||
QWidget **widget __attribute__((unused)),
|
||||
DeviceSourceAPI *deviceAPI __attribute__((unused)),
|
||||
DeviceUISet *deviceUISet __attribute__((unused)))
|
||||
{ return 0; }
|
||||
|
||||
virtual DeviceSampleSource* createSampleSourcePluginInstanceInput(const QString& sourceId __attribute__((unused)), DeviceSourceAPI *deviceAPI __attribute__((unused))) { return 0; } // creates the input "core"
|
||||
virtual void deleteSampleSourcePluginInstanceGUI(PluginInstanceGUI *ui);
|
||||
virtual void deleteSampleSourcePluginInstanceInput(DeviceSampleSource *source);
|
||||
|
Loading…
Reference in New Issue
Block a user