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.
bladerf1inputgui.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_BLADERFINPUTGUI_H
19 #define INCLUDE_BLADERFINPUTGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "bladerf1input.h"
28 
29 class DeviceUISet;
30 
31 namespace Ui {
32  class Bladerf1InputGui;
33 }
34 
35 class Bladerf1InputGui : public QWidget, public PluginInstanceGUI {
36  Q_OBJECT
37 
38 public:
39  explicit Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
40  virtual ~Bladerf1InputGui();
41  virtual void destroy();
42 
43  void setName(const QString& name);
44  QString getName() const;
45 
46  void resetToDefaults();
47  virtual qint64 getCenterFrequency() const;
48  virtual void setCenterFrequency(qint64 centerFrequency);
49  QByteArray serialize() const;
50  bool deserialize(const QByteArray& data);
51  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
52  virtual bool handleMessage(const Message& message);
53 
54 private:
55  Ui::Bladerf1InputGui* ui;
56 
62  QTimer m_updateTimer;
63  QTimer m_statusTimer;
64  std::vector<int> m_gains;
70 
71  void displaySettings();
72  void displaySampleRate();
73  void displayFcTooltip();
74  void sendSettings();
75  unsigned int getXb200Index(bool xb_200, bladerf_xb200_path xb200Path, bladerf_xb200_filter xb200Filter);
76  void updateSampleRateAndFrequency();
77  void blockApplySettings(bool block);
78 
79 private slots:
80  void handleInputMessages();
81  void on_centerFrequency_changed(quint64 value);
82  void on_sampleRate_changed(quint64 value);
83  void on_dcOffset_toggled(bool checked);
84  void on_iqImbalance_toggled(bool checked);
85  void on_bandwidth_currentIndexChanged(int index);
86  void on_decim_currentIndexChanged(int index);
87  void on_lna_currentIndexChanged(int index);
88  void on_vga1_valueChanged(int value);
89  void on_vga2_valueChanged(int value);
90  void on_xb200_currentIndexChanged(int index);
91  void on_fcPos_currentIndexChanged(int index);
92  void on_startStop_toggled(bool checked);
93  void on_record_toggled(bool checked);
94  void on_sampleRateMode_toggled(bool checked);
95  void updateHardware();
96  void updateStatus();
97  void openDeviceSettingsDialog(const QPoint& p);
98 };
99 
100 #endif // INCLUDE_BLADERFINPUTGUI_H
std::vector< int > m_gains
bool m_sampleRateMode
true: device, false: base band sample rate update mode
DeviceSampleSource * m_sampleSource
DeviceUISet * m_deviceUISet
BladeRF1InputSettings m_settings
quint64 m_deviceCenterFrequency
Center frequency in device.
Ui::Bladerf1InputGui * ui
virtual MessageQueue * getInputMessageQueue()
MessageQueue m_inputMessageQueue