From 7992f3f4281ae85a52d85e7af56841db404ba33a Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 11 May 2016 20:02:45 +0200 Subject: [PATCH] Multi device support: add start/stop buttons to all source plugins GUIs --- plugins/samplesource/airspy/airspygui.ui | 16 ++++++++++- plugins/samplesource/bladerf/bladerfgui.ui | 18 +++++++++++-- plugins/samplesource/fcdpro/fcdprogui.ui | 27 +++++++++++-------- .../samplesource/fcdproplus/fcdproplusgui.ui | 27 +++++++++++-------- .../samplesource/filesource/filesourcegui.ui | 14 +++++++++- plugins/samplesource/hackrf/hackrfgui.ui | 16 ++++++++++- plugins/samplesource/rtlsdr/rtlsdrgui.ui | 18 +++++++++++-- .../samplesource/sdrdaemon/sdrdaemongui.ui | 12 +++++++++ sdrbase/mainwindow.cpp | 2 +- sdrbase/mainwindow.h | 4 +-- 10 files changed, 122 insertions(+), 32 deletions(-) diff --git a/plugins/samplesource/airspy/airspygui.ui b/plugins/samplesource/airspy/airspygui.ui index a1d73bf15..c6fdafffb 100644 --- a/plugins/samplesource/airspy/airspygui.ui +++ b/plugins/samplesource/airspy/airspygui.ui @@ -34,6 +34,18 @@ + + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -557,6 +569,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/bladerf/bladerfgui.ui b/plugins/samplesource/bladerf/bladerfgui.ui index 8d2f38940..8406c1af8 100644 --- a/plugins/samplesource/bladerf/bladerfgui.ui +++ b/plugins/samplesource/bladerf/bladerfgui.ui @@ -7,7 +7,7 @@ 0 0 300 - 172 + 175
@@ -34,6 +34,18 @@ + + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -620,6 +632,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/fcdpro/fcdprogui.ui b/plugins/samplesource/fcdpro/fcdprogui.ui index 7d6f07deb..0622ae87a 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.ui +++ b/plugins/samplesource/fcdpro/fcdprogui.ui @@ -29,20 +29,23 @@ 3 - - 2 - - - 2 - - - 2 - - + 2 + + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -402,6 +405,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.ui b/plugins/samplesource/fcdproplus/fcdproplusgui.ui index 5ea7642d7..9c520a025 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.ui +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.ui @@ -29,20 +29,23 @@ 3 - - 2 - - - 2 - - - 2 - - + 2 + + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -309,6 +312,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/filesource/filesourcegui.ui b/plugins/samplesource/filesource/filesourcegui.ui index 559895dbd..5de29f561 100644 --- a/plugins/samplesource/filesource/filesourcegui.ui +++ b/plugins/samplesource/filesource/filesourcegui.ui @@ -23,7 +23,7 @@
- BladeRF + FileSource @@ -34,6 +34,18 @@ + + + + + + + + :/play.png + :/stop.png:/play.png + + + diff --git a/plugins/samplesource/hackrf/hackrfgui.ui b/plugins/samplesource/hackrf/hackrfgui.ui index 1ed40929f..91b9ee1ce 100644 --- a/plugins/samplesource/hackrf/hackrfgui.ui +++ b/plugins/samplesource/hackrf/hackrfgui.ui @@ -40,6 +40,18 @@ + + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -528,6 +540,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.ui b/plugins/samplesource/rtlsdr/rtlsdrgui.ui index f9b0a36b8..4bf6657fc 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.ui +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.ui @@ -6,7 +6,7 @@ 0 0 - 287 + 298 271
@@ -34,6 +34,18 @@
+ + + + + + + + :/play.png + :/stop.png:/play.png + + + @@ -451,6 +463,8 @@
gui/buttonswitch.h
- + + + diff --git a/plugins/samplesource/sdrdaemon/sdrdaemongui.ui b/plugins/samplesource/sdrdaemon/sdrdaemongui.ui index 04fad676b..7996babbc 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemongui.ui +++ b/plugins/samplesource/sdrdaemon/sdrdaemongui.ui @@ -34,6 +34,18 @@
+ + + + + + + + :/play.png + :/stop.png:/play.png + + + diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index ff2a4a42e..bafe0fcab 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -57,7 +57,6 @@ MainWindow::MainWindow(QWidget* parent) : m_settings(), m_dspEngine(DSPEngine::instance()), m_lastEngineState((DSPDeviceEngine::State)-1), - m_startOsmoSDRUpdateAfterStop(false), m_inputGUI(0), m_sampleRate(0), m_centerFrequency(0), @@ -746,6 +745,7 @@ MainWindow::DeviceUISet::DeviceUISet(QTimer& timer) m_spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, m_spectrum); m_channelWindow = new ChannelWindow; m_sampleSource = new QComboBox; + m_deviceEngine = 0; // m_spectrum needs to have its font to be set since it cannot be inherited from the main window QFont font; diff --git a/sdrbase/mainwindow.h b/sdrbase/mainwindow.h index 374703fad..80e24d044 100644 --- a/sdrbase/mainwindow.h +++ b/sdrbase/mainwindow.h @@ -31,6 +31,7 @@ class QComboBox; class AudioDeviceInfo; class DSPEngine; +class DSPDeviceEngine; class Indicator; class SpectrumVis; class GLSpectrum; @@ -59,6 +60,7 @@ public: GLSpectrumGUI *m_spectrumGUI; ChannelWindow *m_channelWindow; QComboBox *m_sampleSource; + DSPDeviceEngine *m_deviceEngine; DeviceUISet(QTimer& timer); ~DeviceUISet(); @@ -110,8 +112,6 @@ private: Indicator* m_engineRunning; Indicator* m_engineError; - bool m_startOsmoSDRUpdateAfterStop; - QWidget* m_inputGUI; int m_sampleRate;