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.
airspygui.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_AIRSPYGUI_H
19 #define INCLUDE_AIRSPYGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 #include "airspyinput.h"
27 
28 class DeviceUISet;
29 
30 namespace Ui {
31  class AirspyGui;
32  class AirspySampleRates;
33 }
34 
35 class AirspyGui : public QWidget, public PluginInstanceGUI {
36  Q_OBJECT
37 
38 public:
39  explicit AirspyGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
40  virtual ~AirspyGui();
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  uint32_t getDevSampleRate(unsigned int index);
54  int getDevSampleRateIndex(uint32_t sampleRate);
55 
56 private:
57  Ui::AirspyGui* ui;
58 
63  QTimer m_updateTimer;
64  QTimer m_statusTimer;
65  std::vector<uint32_t> m_rates;
71 
72  void blockApplySettings(bool block) { m_doApplySettings = !block; }
73  void displaySettings();
74  void displaySampleRates();
75  void sendSettings();
76  void updateSampleRateAndFrequency();
77  void updateFrequencyLimits();
78 
79 private slots:
80  void on_centerFrequency_changed(quint64 value);
81  void on_LOppm_valueChanged(int value);
82  void on_dcOffset_toggled(bool checked);
83  void on_iqImbalance_toggled(bool checked);
84  void on_sampleRate_currentIndexChanged(int index);
85  void on_biasT_stateChanged(int state);
86  void on_decim_currentIndexChanged(int index);
87  void on_fcPos_currentIndexChanged(int index);
88  void on_lna_valueChanged(int value);
89  void on_mix_valueChanged(int value);
90  void on_vga_valueChanged(int value);
91  void on_lnaAGC_stateChanged(int state);
92  void on_mixAGC_stateChanged(int state);
93  void on_startStop_toggled(bool checked);
94  void on_record_toggled(bool checked);
95  void on_transverter_clicked();
96  void updateHardware();
97  void updateStatus();
98  void handleInputMessages();
99  void openDeviceSettingsDialog(const QPoint& p);
100 };
101 
102 #endif // INCLUDE_AIRSPYGUI_H
AirspySettings m_settings
Definition: airspygui.h:62
std::vector< uint32_t > m_rates
Definition: airspygui.h:65
void blockApplySettings(bool block)
Definition: airspygui.h:72
int m_lastEngineState
Definition: airspygui.h:69
unsigned int uint32_t
Definition: rtptypes_win.h:46
MessageQueue m_inputMessageQueue
Definition: airspygui.h:70
DeviceSampleSource * m_sampleSource
Definition: airspygui.h:66
bool m_forceSettings
Definition: airspygui.h:61
bool m_doApplySettings
Definition: airspygui.h:60
QTimer m_updateTimer
Definition: airspygui.h:63
Ui::AirspyGui * ui
Definition: airspygui.h:57
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: airspygui.h:68
DeviceUISet * m_deviceUISet
Definition: airspygui.h:59
virtual MessageQueue * getInputMessageQueue()
Definition: airspygui.h:51
int m_sampleRate
Definition: airspygui.h:67
QTimer m_statusTimer
Definition: airspygui.h:64