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