1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

AirspyHF and BladeRF input server plugins: removed QWidget dependency

This commit is contained in:
f4exb 2018-04-15 19:14:20 +02:00
parent f4b090062d
commit 4df9aa93ab
6 changed files with 31 additions and 7 deletions

View File

@ -28,7 +28,6 @@
#include "airspyhfinput.h" #include "airspyhfinput.h"
#include "airspyhfgui.h"
#include "airspyhfplugin.h" #include "airspyhfplugin.h"
#include "airspyhfsettings.h" #include "airspyhfsettings.h"
#include "airspyhfthread.h" #include "airspyhfthread.h"

View File

@ -15,14 +15,17 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QtPlugin> #include <QtPlugin>
#include <QAction>
#include <libairspyhf/airspyhf.h> #include <libairspyhf/airspyhf.h>
#include <device/devicesourceapi.h> #include <device/devicesourceapi.h>
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
#include "airspyhfplugin.h" #include "airspyhfplugin.h"
#ifdef SERVER_MODE
#include "airspyhfinput.h"
#else
#include "airspyhfgui.h" #include "airspyhfgui.h"
#endif
const PluginDescriptor AirspyHFPlugin::m_pluginDescriptor = { const PluginDescriptor AirspyHFPlugin::m_pluginDescriptor = {
@ -95,6 +98,15 @@ PluginInterface::SamplingDevices AirspyHFPlugin::enumSampleSources()
return result; return result;
} }
#ifdef SERVER_MODE
PluginInstanceGUI* AirspyHFPlugin::createSampleSourcePluginInstanceGUI(
const QString& sourceId __attribute__((unused)),
QWidget **widget __attribute__((unused)),
DeviceUISet *deviceUISet __attribute__((unused)))
{
return 0;
}
#else
PluginInstanceGUI* AirspyHFPlugin::createSampleSourcePluginInstanceGUI( PluginInstanceGUI* AirspyHFPlugin::createSampleSourcePluginInstanceGUI(
const QString& sourceId, const QString& sourceId,
QWidget **widget, QWidget **widget,
@ -111,6 +123,7 @@ PluginInstanceGUI* AirspyHFPlugin::createSampleSourcePluginInstanceGUI(
return 0; return 0;
} }
} }
#endif
DeviceSampleSource *AirspyHFPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI) DeviceSampleSource *AirspyHFPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
{ {

View File

@ -30,7 +30,6 @@
#include "device/devicesourceapi.h" #include "device/devicesourceapi.h"
#include "device/devicesinkapi.h" #include "device/devicesinkapi.h"
#include "bladerfinputgui.h"
#include "bladerfinputthread.h" #include "bladerfinputthread.h"
MESSAGE_CLASS_DEFINITION(BladerfInput::MsgConfigureBladerf, Message) MESSAGE_CLASS_DEFINITION(BladerfInput::MsgConfigureBladerf, Message)

View File

@ -14,16 +14,19 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include "../bladerfinput/bladerfinputplugin.h" #include "bladerfinputplugin.h"
#include <QtPlugin> #include <QtPlugin>
#include <QAction>
#include <libbladeRF.h> #include <libbladeRF.h>
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
#include "util/simpleserializer.h" #include "util/simpleserializer.h"
#include <device/devicesourceapi.h> #include <device/devicesourceapi.h>
#ifdef SERVER_MODE
#include "bladerfinput.h"
#else
#include "bladerfinputgui.h" #include "bladerfinputgui.h"
#endif
const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = { const PluginDescriptor BlderfInputPlugin::m_pluginDescriptor = {
QString("BladeRF Input"), QString("BladeRF Input"),
@ -82,6 +85,15 @@ PluginInterface::SamplingDevices BlderfInputPlugin::enumSampleSources()
return result; return result;
} }
#ifdef SERVER_MODE
PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(
const QString& sourceId __attribute__((unused)),
QWidget **widget __attribute__((unused)),
DeviceUISet *deviceUISet __attribute__((unused)))
{
return 0;
}
#else
PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI( PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(
const QString& sourceId, const QString& sourceId,
QWidget **widget, QWidget **widget,
@ -98,6 +110,7 @@ PluginInstanceGUI* BlderfInputPlugin::createSampleSourcePluginInstanceGUI(
return 0; return 0;
} }
} }
#endif
DeviceSampleSource *BlderfInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI) DeviceSampleSource *BlderfInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
{ {

View File

@ -59,6 +59,6 @@ target_link_libraries(inputairspyhfsrv
) )
endif (BUILD_DEBIAN) endif (BUILD_DEBIAN)
qt5_use_modules(inputairspyhfsrv Core Widgets) qt5_use_modules(inputairspyhfsrv Core)
install(TARGETS inputairspyhfsrv DESTINATION lib/pluginssrv/samplesource) install(TARGETS inputairspyhfsrv DESTINATION lib/pluginssrv/samplesource)

View File

@ -63,6 +63,6 @@ target_link_libraries(inputbladerfsrv
) )
endif (BUILD_DEBIAN) endif (BUILD_DEBIAN)
qt5_use_modules(inputbladerfsrv Core Widgets) qt5_use_modules(inputbladerfsrv Core)
install(TARGETS inputbladerfsrv DESTINATION lib/pluginssrv/samplesource) install(TARGETS inputbladerfsrv DESTINATION lib/pluginssrv/samplesource)