Multi device support: add start/stop buttons to all source plugins GUIs

This commit is contained in:
f4exb 2016-05-11 20:02:45 +02:00
parent 6ef4653d35
commit 7992f3f428
10 changed files with 122 additions and 32 deletions

View File

@ -34,6 +34,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">
@ -557,6 +569,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>300</width>
<height>172</height>
<height>175</height>
</rect>
</property>
<property name="sizePolicy">
@ -34,6 +34,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">
@ -620,6 +632,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -29,20 +29,23 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="layoutFrequency">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -402,6 +405,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -29,20 +29,23 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -309,6 +312,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -23,7 +23,7 @@
</font>
</property>
<property name="windowTitle">
<string>BladeRF</string>
<string>FileSource</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
@ -34,6 +34,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">

View File

@ -40,6 +40,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">
@ -528,6 +540,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>287</width>
<width>298</width>
<height>271</height>
</rect>
</property>
@ -34,6 +34,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -451,6 +463,8 @@
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../../sdrbase/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -34,6 +34,18 @@
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<item>
<widget class="ButtonSwitch" name="startStopButton">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">

View File

@ -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;

View File

@ -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;