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.
hackrfinputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2015 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 INCLUDE_HACKRFINPUTGUI_H
19 #define INCLUDE_HACKRFINPUTGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "hackrfinput.h"
28 
29 #define HACKRF_MAX_DEVICE (32)
30 
31 class DeviceUISet;
32 
33 namespace Ui {
34  class HackRFInputGui;
35 }
36 
37 class HackRFInputGui : public QWidget, public PluginInstanceGUI {
38  Q_OBJECT
39 
40 public:
41  typedef enum
42  {
43  HACKRF_IMGREJ_BYPASS = 0,
46  HACKRF_IMGREJ_NB
48 
49  explicit HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
50  virtual ~HackRFInputGui();
51  virtual void destroy();
52 
53  void setName(const QString& name);
54  QString getName() const;
55 
56  void resetToDefaults();
57  virtual qint64 getCenterFrequency() const;
58  virtual void setCenterFrequency(qint64 centerFrequency);
59  QByteArray serialize() const;
60  bool deserialize(const QByteArray& data);
61  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
62  virtual bool handleMessage(const Message& message);
63 
64 private:
65  Ui::HackRFInputGui* ui;
66 
72  QTimer m_updateTimer;
73  QTimer m_statusTimer;
79 
80  void displaySettings();
81  void displaySampleRate();
82  void displayFcTooltip();
83  void displayBandwidths();
84  void sendSettings();
85  void updateSampleRateAndFrequency();
86  void blockApplySettings(bool block);
87 
88 private slots:
89  void handleInputMessages();
90  void on_centerFrequency_changed(quint64 value);
91  void on_sampleRate_changed(quint64 value);
92  void on_LOppm_valueChanged(int value);
93  void on_dcOffset_toggled(bool checked);
94  void on_iqImbalance_toggled(bool checked);
95  void on_biasT_stateChanged(int state);
96  void on_decim_currentIndexChanged(int index);
97  void on_fcPos_currentIndexChanged(int index);
98  void on_lnaExt_stateChanged(int state);
99  void on_lna_valueChanged(int value);
100  void on_bbFilter_currentIndexChanged(int index);
101  void on_vga_valueChanged(int value);
102  void on_startStop_toggled(bool checked);
103  void on_record_toggled(bool checked);
104  void on_sampleRateMode_toggled(bool checked);
105  void updateHardware();
106  void updateStatus();
107  void openDeviceSettingsDialog(const QPoint& p);
108 };
109 
110 #endif // INCLUDE_HACKRFINPUTGUI_H
DeviceUISet * m_deviceUISet
quint64 m_deviceCenterFrequency
Center frequency in device.
Ui::HackRFInputGui * ui
DeviceSampleSource * m_sampleSource
MessageQueue m_inputMessageQueue
QTimer m_statusTimer
bool m_sampleRateMode
true: device, false: base band sample rate update mode
virtual MessageQueue * getInputMessageQueue()
HackRFInputSettings m_settings
QTimer m_updateTimer