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.
fcdprogui.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_FCDPROGUI_H
19 #define INCLUDE_FCDPROGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "fcdproinput.h"
28 
29 class QWidget;
30 class DeviceUISet;
31 
32 namespace Ui {
33  class FCDProGui;
34 }
35 
36 class FCDProGui : public QWidget, public PluginInstanceGUI {
37  Q_OBJECT
38 
39 public:
40  explicit FCDProGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
41  virtual ~FCDProGui();
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::FCDProGui* ui;
57 
62  QTimer m_updateTimer;
63  QTimer m_statusTimer;
64  std::vector<int> m_gains;
70 
71  void blockApplySettings(bool block) { m_doApplySettings = !block; }
72  void displaySettings();
73  void sendSettings();
74  void updateSampleRateAndFrequency();
75  void updateFrequencyLimits();
76 
77 private slots:
78  void handleInputMessages();
79  void on_centerFrequency_changed(quint64 value);
80  void on_ppm_valueChanged(int value);
81  void on_dcOffset_toggled(bool checked);
82  void on_iqImbalance_toggled(bool checked);
83  // TOOD: defaults push button
84  void on_lnaGain_currentIndexChanged(int index);
85  void on_rfFilter_currentIndexChanged(int index);
86  void on_lnaEnhance_currentIndexChanged(int index);
87  void on_band_currentIndexChanged(int index);
88  void on_mixGain_currentIndexChanged(int index);
89  void on_mixFilter_currentIndexChanged(int index);
90  void on_bias_currentIndexChanged(int index);
91  void on_mode_currentIndexChanged(int index);
92  void on_gain1_currentIndexChanged(int index);
93  void on_rcFilter_currentIndexChanged(int index);
94  void on_gain2_currentIndexChanged(int index);
95  void on_gain3_currentIndexChanged(int index);
96  void on_gain4_currentIndexChanged(int index);
97  void on_ifFilter_currentIndexChanged(int index);
98  void on_gain5_currentIndexChanged(int index);
99  void on_gain6_currentIndexChanged(int index);
100  void on_decim_currentIndexChanged(int index);
101  void on_fcPos_currentIndexChanged(int index);
102  void on_setDefaults_clicked(bool checked);
103  void on_startStop_toggled(bool checked);
104  void on_record_toggled(bool checked);
105  void on_transverter_clicked();
106  void updateHardware();
107  void updateStatus();
108  void openDeviceSettingsDialog(const QPoint& p);
109 };
110 
111 #endif // INCLUDE_FCDPROGUI_H
void blockApplySettings(bool block)
Definition: fcdprogui.h:71
virtual MessageQueue * getInputMessageQueue()
Definition: fcdprogui.h:52
QTimer m_statusTimer
Definition: fcdprogui.h:63
MessageQueue m_inputMessageQueue
Definition: fcdprogui.h:69
DeviceUISet * m_deviceUISet
Definition: fcdprogui.h:58
QTimer m_updateTimer
Definition: fcdprogui.h:62
bool m_forceSettings
Definition: fcdprogui.h:60
FCDProSettings m_settings
Definition: fcdprogui.h:61
Ui::FCDProGui * ui
Definition: fcdprogui.h:56
bool m_doApplySettings
Definition: fcdprogui.h:59
std::vector< int > m_gains
Definition: fcdprogui.h:64
DeviceSampleSource * m_sampleSource
Definition: fcdprogui.h:65
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: fcdprogui.h:67
int m_sampleRate
Definition: fcdprogui.h:66
int m_lastEngineState
Definition: fcdprogui.h:68