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.
bladerf1outputgui.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_BLADERFOUTPUTGUI_H
19 #define INCLUDE_BLADERFOUTPUTGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "bladerf1output.h"
28 
29 class DeviceSampleSink;
30 class DeviceUISet;
31 
32 namespace Ui {
33  class Bladerf1OutputGui;
34 }
35 
36 class Bladerf1OutputGui : public QWidget, public PluginInstanceGUI {
37  Q_OBJECT
38 
39 public:
40  explicit Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
41  virtual ~Bladerf1OutputGui();
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  QByteArray serialize() const;
51  bool deserialize(const QByteArray& data);
52  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
53  virtual bool handleMessage(const Message& message);
54 
55 private:
56  Ui::Bladerf1OutputGui* 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  unsigned int getXb200Index(bool xb_200, bladerf_xb200_path xb200Path, bladerf_xb200_filter xb200Filter);
76  void updateSampleRateAndFrequency();
77 
78 private slots:
79  void handleInputMessages();
80  void on_centerFrequency_changed(quint64 value);
81  void on_sampleRate_changed(quint64 value);
82  void on_bandwidth_currentIndexChanged(int index);
83  void on_interp_currentIndexChanged(int index);
84  void on_vga1_valueChanged(int value);
85  void on_vga2_valueChanged(int value);
86  void on_xb200_currentIndexChanged(int index);
87  void on_startStop_toggled(bool checked);
88  void on_sampleRateMode_toggled(bool checked);
89  void updateHardware();
90  void updateStatus();
91  void openDeviceSettingsDialog(const QPoint& p);
92 };
93 
94 #endif // INCLUDE_BLADERFOUTPUTGUI_H
virtual MessageQueue * getInputMessageQueue()
bool m_sampleRateMode
true: device, false: base band sample rate update mode
BladeRF1OutputSettings m_settings
quint64 m_deviceCenterFrequency
Center frequency in device.
DeviceUISet * m_deviceUISet
void blockApplySettings(bool block)
Ui::Bladerf1OutputGui * ui
DeviceSampleSink * m_deviceSampleSink
MessageQueue m_inputMessageQueue