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.
plutosdrinputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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_PLUTOSDRINPUT_PLUTOSDRINPUTGUI_H_
19 #define PLUGINS_SAMPLESOURCE_PLUTOSDRINPUT_PLUTOSDRINPUTGUI_H_
20 
21 #include <QObject>
22 #include <QWidget>
23 #include <QTimer>
24 
25 #include "util/messagequeue.h"
26 
28 #include "plutosdrinput.h"
29 #include "plutosdrinputsettings.h"
30 
31 class DeviceSampleSource;
32 class DeviceUISet;
33 
34 namespace Ui {
35  class PlutoSDRInputGUI;
36 }
37 
38 class PlutoSDRInputGui : public QWidget, public PluginInstanceGUI {
39  Q_OBJECT
40 
41 public:
42  explicit PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
43  virtual ~PlutoSDRInputGui();
44 
45  virtual void destroy();
46  virtual void setName(const QString& name);
47  virtual QString getName() const;
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::PlutoSDRInputGUI* ui;
62  QTimer m_updateTimer;
63  QTimer m_statusTimer;
71 
72  void displaySettings();
73  void displaySampleRate();
74  void displayFcTooltip();
75  void sendSettings(bool forceSettings = false);
76  void blockApplySettings(bool block);
77  void updateSampleRateAndFrequency();
78  void setFIRBWLimits();
79  void setSampleRateLimits();
80  void updateFrequencyLimits();
81 
82 private slots:
83  void on_startStop_toggled(bool checked);
84  void on_record_toggled(bool checked);
85  void on_centerFrequency_changed(quint64 value);
86  void on_loPPM_valueChanged(int value);
87  void on_dcOffset_toggled(bool checked);
88  void on_rfDCOffset_toggled(bool checked);
89  void on_bbDCOffset_toggled(bool checked);
90  void on_hwIQImbalance_toggled(bool checked);
91  void on_iqImbalance_toggled(bool checked);
92  void on_swDecim_currentIndexChanged(int index);
93  void on_fcPos_currentIndexChanged(int index);
94  void on_sampleRate_changed(quint64 value);
95  void on_lpf_changed(quint64 value);
96  void on_lpFIREnable_toggled(bool checked);
97  void on_lpFIR_changed(quint64 value);
98  void on_lpFIRDecimation_currentIndexChanged(int index);
99  void on_lpFIRGain_currentIndexChanged(int index);
100  void on_gainMode_currentIndexChanged(int index);
101  void on_gain_valueChanged(int value);
102  void on_antenna_currentIndexChanged(int index);
103  void on_transverter_clicked();
104  void on_sampleRateMode_toggled(bool checked);
105  void updateHardware();
106  void updateStatus();
107  void handleInputMessages();
108  void openDeviceSettingsDialog(const QPoint& p);
109 };
110 
111 #endif /* PLUGINS_SAMPLESOURCE_PLUTOSDRINPUT_PLUTOSDRINPUTGUI_H_ */
virtual MessageQueue * getInputMessageQueue()
DeviceSampleSource * m_sampleSource
Ui::PlutoSDRInputGUI * ui
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint32_t m_statusCounter
bool m_sampleRateMode
true: device, false: base band sample rate update mode
MessageQueue m_inputMessageQueue
DeviceUISet * m_deviceUISet
PlutoSDRInputSettings m_settings
quint64 m_deviceCenterFrequency
Center frequency in device.