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.
plutosdroutputgui.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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_SAMPLESOURCE_PLUTOSDROUTPUT_PLUTOSDROUTPUTGUI_H_
19 #define PLUGINS_SAMPLESOURCE_PLUTOSDROUTPUT_PLUTOSDROUTPUTGUI_H_
20 
21 #include <QObject>
22 #include <QWidget>
23 #include <QTimer>
24 
25 #include "util/messagequeue.h"
27 
28 #include "plutosdroutput.h"
29 #include "plutosdroutputsettings.h"
30 
31 class DeviceSampleSink;
32 class DeviceUISet;
33 
34 namespace Ui {
35  class PlutoSDROutputGUI;
36 }
37 
38 class PlutoSDROutputGUI : public QWidget, public PluginInstanceGUI {
39  Q_OBJECT
40 
41 public:
42  explicit PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent = 0);
43  virtual ~PlutoSDROutputGUI();
44 
45  virtual void destroy();
46  virtual void setName(const QString& name);
47  virtual QString getName() const;
48  virtual void resetToDefaults();
49  virtual qint64 getCenterFrequency() const;
50  virtual void setCenterFrequency(qint64 centerFrequency);
51  virtual QByteArray serialize() const;
52  virtual bool deserialize(const QByteArray& data);
53  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
54  virtual bool handleMessage(const Message& message);
55 
56 private:
57  Ui::PlutoSDROutputGUI* ui;
62  QTimer m_updateTimer;
63  QTimer m_statusTimer;
71 
72  void displaySettings();
73  void displaySampleRate();
74  void sendSettings(bool forceSettings = false);
75  void blockApplySettings(bool block);
76  void updateSampleRateAndFrequency();
77  void setFIRBWLimits();
78  void setSampleRateLimits();
79  void updateFrequencyLimits();
80 
81 private slots:
82  void on_startStop_toggled(bool checked);
83  void on_centerFrequency_changed(quint64 value);
84  void on_loPPM_valueChanged(int value);
85  void on_swInterp_currentIndexChanged(int index);
86  void on_sampleRate_changed(quint64 value);
87  void on_lpf_changed(quint64 value);
88  void on_lpFIREnable_toggled(bool checked);
89  void on_lpFIR_changed(quint64 value);
90  void on_lpFIRInterpolation_currentIndexChanged(int index);
91  void on_lpFIRGain_currentIndexChanged(int index);
92  void on_att_valueChanged(int value);
93  void on_antenna_currentIndexChanged(int index);
94  void on_transverter_clicked();
95  void on_sampleRateMode_toggled(bool checked);
96  void updateHardware();
97  void updateStatus();
98  void handleInputMessages();
99  void openDeviceSettingsDialog(const QPoint& p);
100 };
101 
102 #endif /* PLUGINS_SAMPLESOURCE_PLUTOSDROUTPUT_PLUTOSDROUTPUTGUI_H_ */
DeviceUISet * m_deviceUISet
virtual MessageQueue * getInputMessageQueue()
unsigned int uint32_t
Definition: rtptypes_win.h:46
MessageQueue m_inputMessageQueue
Ui::PlutoSDROutputGUI * ui
PlutoSDROutputSettings m_settings
quint64 m_deviceCenterFrequency
Center frequency in device.
bool m_sampleRateMode
true: device, false: base band sample rate update mode
DeviceSampleSink * m_sampleSink