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.
bladerf2outputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2018 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_SAMPLESINK_BLADERF2OUTPUT_BLADERF2OUTPUTGUI_H_
19 #define PLUGINS_SAMPLESINK_BLADERF2OUTPUT_BLADERF2OUTPUTGUI_H_
20 
21 #include <QTimer>
22 #include <QWidget>
23 
25 #include "util/messagequeue.h"
26 
27 #include "bladerf2output.h"
28 
29 class DeviceSampleSink;
30 class DeviceUISet;
31 
32 namespace Ui {
33  class BladeRF2OutputGui;
34 }
35 
36 class BladeRF2OutputGui : public QWidget, public PluginInstanceGUI {
37  Q_OBJECT
38 
39 public:
40  explicit BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
41  virtual ~BladeRF2OutputGui();
42  virtual void destroy();
43 
44  void setName(const QString& name);
45  QString getName() const;
46 
47  void resetToDefaults();
48  virtual qint64 getCenterFrequency() const;
49  virtual void setCenterFrequency(qint64 centerFrequency);
50  virtual QByteArray serialize() const;
51  virtual bool deserialize(const QByteArray& data);
52  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
53  virtual bool handleMessage(const Message& message);
54 
55 private:
56  Ui::BladeRF2OutputGui* ui;
57 
63  QTimer m_updateTimer;
64  QTimer m_statusTimer;
70 
71  void blockApplySettings(bool block) { m_doApplySettings = !block; }
72  void displaySettings();
73  void displaySampleRate();
74  void sendSettings();
75  void updateSampleRateAndFrequency();
76  void updateFrequencyLimits();
77  void setCenterFrequencySetting(uint64_t kHzValue);
78 
79 private slots:
80  void handleInputMessages();
81  void on_centerFrequency_changed(quint64 value);
82  void on_LOppm_valueChanged(int value);
83  void on_biasTee_toggled(bool checked);
84  void on_sampleRate_changed(quint64 value);
85  void on_bandwidth_changed(quint64 value);
86  void on_interp_currentIndexChanged(int index);
87  void on_gain_valueChanged(int value);
88  void on_startStop_toggled(bool checked);
89  void on_transverter_clicked();
90  void on_sampleRateMode_toggled(bool checked);
91  void updateHardware();
92  void updateStatus();
93  void openDeviceSettingsDialog(const QPoint& p);
94 };
95 
96 
97 
98 #endif /* PLUGINS_SAMPLESINK_BLADERF2OUTPUT_BLADERF2OUTPUTGUI_H_ */
Ui::BladeRF2OutputGui * ui
DeviceUISet * m_deviceUISet
BladeRF2Output * m_sampleSink
quint64 m_deviceCenterFrequency
Center frequency in device.
BladeRF2OutputSettings m_settings
bool m_sampleRateMode
true: device, false: base band sample rate update mode
MessageQueue m_inputMessageQueue
void blockApplySettings(bool block)
virtual MessageQueue * getInputMessageQueue()
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48