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.
fcdproplusgui.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_FCDGUI_H
19 #define INCLUDE_FCDGUI_H
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "fcdproplusinput.h"
28 
29 class DeviceUISet;
30 
31 namespace Ui {
32  class FCDProPlusGui;
33 }
34 
35 class FCDProPlusGui : public QWidget, public PluginInstanceGUI {
36  Q_OBJECT
37 
38 public:
39  explicit FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
40  virtual ~FCDProPlusGui();
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 
54 private:
55  Ui::FCDProPlusGui* ui;
56 
61  QTimer m_updateTimer;
62  QTimer m_statusTimer;
63  std::vector<int> m_gains;
69 
70  void blockApplySettings(bool block) { m_doApplySettings = !block; }
71  void displaySettings();
72  void sendSettings();
73  void updateSampleRateAndFrequency();
74  void updateFrequencyLimits();
75 
76 private slots:
77  void handleInputMessages();
78  void on_centerFrequency_changed(quint64 value);
79  void on_decim_currentIndexChanged(int index);
80  void on_fcPos_currentIndexChanged(int index);
81  void on_dcOffset_toggled(bool checked);
82  void on_iqImbalance_toggled(bool checked);
83  void on_checkBoxG_stateChanged(int state);
84  void on_checkBoxB_stateChanged(int state);
85  void on_mixGain_stateChanged(int state);
86  void on_ifGain_valueChanged(int value);
87  void on_filterRF_currentIndexChanged(int index);
88  void on_filterIF_currentIndexChanged(int index);
89  void on_ppm_valueChanged(int value);
90  void on_startStop_toggled(bool checked);
91  void on_record_toggled(bool checked);
92  void on_transverter_clicked();
93  void updateHardware();
94  void updateStatus();
95  void openDeviceSettingsDialog(const QPoint& p);
96 };
97 
98 #endif // INCLUDE_FCDGUI_H
std::vector< int > m_gains
Definition: fcdproplusgui.h:63
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: fcdproplusgui.h:66
DeviceUISet * m_deviceUISet
Definition: fcdproplusgui.h:57
QTimer m_updateTimer
Definition: fcdproplusgui.h:61
MessageQueue m_inputMessageQueue
Definition: fcdproplusgui.h:68
virtual MessageQueue * getInputMessageQueue()
Definition: fcdproplusgui.h:51
FCDProPlusSettings m_settings
Definition: fcdproplusgui.h:60
Ui::FCDProPlusGui * ui
Definition: fcdproplusgui.h:55
bool m_forceSettings
Definition: fcdproplusgui.h:59
DeviceSampleSource * m_sampleSource
Definition: fcdproplusgui.h:64
QTimer m_statusTimer
Definition: fcdproplusgui.h:62
void blockApplySettings(bool block)
Definition: fcdproplusgui.h:70
bool m_doApplySettings
Definition: fcdproplusgui.h:58