SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
sdrplaygui.h
Go to the documentation of this file.
1 // Copyright (C) 2016 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef PLUGINS_SAMPLESOURCE_SDRPLAY_SDRPLAYGUI_H_
19 #define PLUGINS_SAMPLESOURCE_SDRPLAY_SDRPLAYGUI_H_
20 
22 #include <QTimer>
23 #include <QWidget>
24 #include <vector>
25 
26 #include "util/messagequeue.h"
27 
28 #include "sdrplayinput.h"
29 #include "sdrplaysettings.h"
30 
31 class DeviceUISet;
32 
33 namespace Ui {
34  class SDRPlayGui;
35 }
36 
37 class SDRPlayGui : public QWidget, public PluginInstanceGUI {
38  Q_OBJECT
39 
40 public:
41  explicit SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
42  virtual ~SDRPlayGui();
43  virtual void destroy();
44 
45  void setName(const QString& name);
46  QString getName() const;
47 
48  virtual void resetToDefaults();
49  virtual qint64 getCenterFrequency() const;
50  virtual void setCenterFrequency(qint64 centerFrequency);
51  virtual QByteArray serialize() const;
52  virtual bool deserialize(const QByteArray& data);
53  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
54  virtual bool handleMessage(const Message& message);
55 
56 private:
57  Ui::SDRPlayGui* ui;
58 
63  QTimer m_updateTimer;
64  QTimer m_statusTimer;
70 
71  void blockApplySettings(bool block) { m_doApplySettings = !block; }
72  void displaySettings();
73  void sendSettings();
74  void updateSampleRateAndFrequency();
75 
76 private slots:
77  void updateHardware();
78  void updateStatus();
79  void handleInputMessages();
80  void on_centerFrequency_changed(quint64 value);
81  void on_ppm_valueChanged(int value);
82  void on_dcOffset_toggled(bool checked);
83  void on_iqImbalance_toggled(bool checked);
84  void on_fBand_currentIndexChanged(int index);
85  void on_bandwidth_currentIndexChanged(int index);
86  void on_samplerate_currentIndexChanged(int index);
87  void on_ifFrequency_currentIndexChanged(int index);
88  void on_decim_currentIndexChanged(int index);
89  void on_fcPos_currentIndexChanged(int index);
90  void on_gainTunerOn_toggled(bool checked);
91  void on_gainTuner_valueChanged(int value);
92  void on_gainManualOn_toggled(bool checked);
93  void on_gainLNA_toggled(bool checked);
94  void on_gainMixer_toggled(bool checked);
95  void on_gainBaseband_valueChanged(int value);
96  void on_startStop_toggled(bool checked);
97  void on_record_toggled(bool checked);
98  void openDeviceSettingsDialog(const QPoint& p);
99 };
100 
101 #endif /* PLUGINS_SAMPLESOURCE_SDRPLAY_SDRPLAYGUI_H_ */
void blockApplySettings(bool block)
Definition: sdrplaygui.h:71
QTimer m_updateTimer
Definition: sdrplaygui.h:63
bool m_forceSettings
Definition: sdrplaygui.h:61
SDRPlaySettings m_settings
Definition: sdrplaygui.h:62
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: sdrplaygui.h:67
bool m_doApplySettings
Definition: sdrplaygui.h:60
int m_sampleRate
Definition: sdrplaygui.h:66
int m_lastEngineState
Definition: sdrplaygui.h:68
Ui::SDRPlayGui * ui
Definition: sdrplaygui.h:57
MessageQueue m_inputMessageQueue
Definition: sdrplaygui.h:69
DeviceUISet * m_deviceUISet
Definition: sdrplaygui.h:59
DeviceSampleSource * m_sampleSource
Definition: sdrplaygui.h:65
QTimer m_statusTimer
Definition: sdrplaygui.h:64
virtual MessageQueue * getInputMessageQueue()
Definition: sdrplaygui.h:53