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