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.
xtrxoutputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2019 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 PLUGINS_SAMPLESINK_XTRXOUTPUT_XTRXOUTPUTGUI_H_
19 #define PLUGINS_SAMPLESINK_XTRXOUTPUT_XTRXOUTPUTGUI_H_
20 
22 #include <QTimer>
23 #include <QWidget>
24 
25 #include "util/messagequeue.h"
26 
27 #include "xtrxoutput.h"
28 
29 class DeviceUISet;
30 
31 namespace Ui {
32 class XTRXOutputGUI;
33 }
34 
35 class XTRXOutputGUI : public QWidget, public PluginInstanceGUI {
36  Q_OBJECT
37 
38 public:
39  explicit XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent = 0);
40  virtual ~XTRXOutputGUI();
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::XTRXOutputGUI* ui;
56 
61  QTimer m_updateTimer;
62  QTimer m_statusTimer;
71 
72  void displaySettings();
73  void displaySampleRate();
74  void setNCODisplay();
75  void setCenterFrequencyDisplay();
76  void setCenterFrequencySetting(uint64_t kHzValue);
77  void sendSettings();
78  void updateSampleRateAndFrequency();
79  void updateDACRate();
80  void blockApplySettings(bool block);
81 
82 private slots:
83  void handleInputMessages();
84  void on_startStop_toggled(bool checked);
85  void on_centerFrequency_changed(quint64 value);
86  void on_ncoFrequency_changed(qint64 value);
87  void on_ncoEnable_toggled(bool checked);
88  void on_sampleRate_changed(quint64 value);
89  void on_hwInterp_currentIndexChanged(int index);
90  void on_swInterp_currentIndexChanged(int index);
91  void on_lpf_changed(quint64 value);
92  void on_gain_valueChanged(int value);
93  void on_antenna_currentIndexChanged(int index);
94  void on_extClock_clicked();
95  void on_pwrmode_currentIndexChanged(int index);
96  void on_sampleRateMode_toggled(bool checked);
97 
98  void updateHardware();
99  void updateStatus();
100  void openDeviceSettingsDialog(const QPoint& p);
101 };
102 
103 #endif /* PLUGINS_SAMPLESINK_XTRXOUTPUT_XTRXOUTPUTGUI_H_ */
QTimer m_statusTimer
Definition: xtrxoutputgui.h:62
bool m_doApplySettings
Definition: xtrxoutputgui.h:66
Ui::XTRXOutputGUI * ui
Definition: xtrxoutputgui.h:55
virtual MessageQueue * getInputMessageQueue()
Definition: xtrxoutputgui.h:51
XTRXOutputSettings m_settings
Definition: xtrxoutputgui.h:59
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: xtrxoutputgui.h:64
XTRXOutput * m_XTRXOutput
Same object as above but gives easy access to XTRXInput methods and attributes that are used intensiv...
Definition: xtrxoutputgui.h:58
DeviceUISet * m_deviceUISet
Definition: xtrxoutputgui.h:57
bool m_sampleRateMode
true: device, false: base band sample rate update mode
Definition: xtrxoutputgui.h:60
bool m_forceSettings
Definition: xtrxoutputgui.h:67
QTimer m_updateTimer
Definition: xtrxoutputgui.h:61
int m_deviceStatusCounter
Definition: xtrxoutputgui.h:69
MessageQueue m_inputMessageQueue
Definition: xtrxoutputgui.h:70
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48