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.
localinputgui.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 INCLUDE_LOCALINPUTGUI_H
19 #define INCLUDE_LOCALINPUTGUI_H
20 
21 #include <QTimer>
22 #include <QWidget>
23 #include <QNetworkRequest>
24 
26 #include "util/messagequeue.h"
27 
28 #include "localinput.h"
29 
30 class DeviceUISet;
31 class QNetworkAccessManager;
32 class QNetworkReply;
33 class QJsonObject;
34 
35 namespace Ui {
36  class LocalInputGui;
37 }
38 
39 class LocalInputGui : public QWidget, public PluginInstanceGUI {
40  Q_OBJECT
41 
42 public:
43  explicit LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
44  virtual ~LocalInputGui();
45  virtual void destroy();
46 
47  void setName(const QString& name);
48  QString getName() const;
49 
50  void resetToDefaults();
51  QByteArray serialize() const;
52  bool deserialize(const QByteArray& data);
53  virtual qint64 getCenterFrequency() const;
54  virtual void setCenterFrequency(qint64 centerFrequency);
55  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
56  virtual bool handleMessage(const Message& message);
57 
58 private:
59  Ui::LocalInputGui* ui;
60 
67  QTimer m_updateTimer;
68  QTimer m_statusTimer;
71 
72  // int m_sampleRate;
73  // quint64 m_centerFrequency;
89 
91  std::size_t m_tickCount;
92 
95 
98  QTime m_eventsTime;
99 
102  double m_txDelay;
103 
106 
107  QNetworkAccessManager *m_networkManager;
108  QNetworkRequest m_networkRequest;
109 
110  void blockApplySettings(bool block);
111  void displaySettings();
112  void displayTime();
113  void sendSettings();
114  void updateSampleRateAndFrequency();
115 
116 private slots:
117  void handleInputMessages();
118  void on_dcOffset_toggled(bool checked);
119  void on_iqImbalance_toggled(bool checked);
120  void on_startStop_toggled(bool checked);
121  void on_record_toggled(bool checked);
122  void updateHardware();
123  void updateStatus();
124  void openDeviceSettingsDialog(const QPoint& p);
125 };
126 
127 #endif // INCLUDE_LOCALINPUTGUI_H
LocalInputSettings m_settings
current settings
Definition: localinputgui.h:62
QPalette m_paletteWhiteText
float m_avgNbOriginalBlocks
Definition: localinputgui.h:83
int m_framesDecodingStatus
Definition: localinputgui.h:75
int m_minNbOriginalBlocks
Definition: localinputgui.h:80
float m_bufferLengthInSecs
Definition: localinputgui.h:77
uint32_t m_countUnrecoverable
Definition: localinputgui.h:96
bool m_addressEdited
Definition: localinputgui.h:93
QTimer m_statusTimer
Definition: localinputgui.h:68
uint64_t m_startingTimeStampms
Definition: localinputgui.h:74
int m_nbOriginalBlocks
Definition: localinputgui.h:85
MessageQueue m_inputMessageQueue
Definition: localinputgui.h:70
unsigned int uint32_t
Definition: rtptypes_win.h:46
int32_t m_bufferGauge
Definition: localinputgui.h:78
LocalInput * m_sampleSource
Definition: localinputgui.h:63
Ui::LocalInputGui * ui
Definition: localinputgui.h:59
QPalette m_paletteGreenText
int int32_t
Definition: rtptypes_win.h:45
bool m_doApplySettings
quint64 m_streamCenterFrequency
Center frequency of received stream.
Definition: localinputgui.h:66
float m_avgNbRecovery
Definition: localinputgui.h:84
QTime m_eventsTime
Definition: localinputgui.h:98
bool m_dataPortEdited
Definition: localinputgui.h:94
std::size_t m_tickCount
Definition: localinputgui.h:91
uint32_t m_countRecovered
Definition: localinputgui.h:97
float m_avgNbBlocks
Definition: localinputgui.h:82
QNetworkRequest m_networkRequest
QNetworkAccessManager * m_networkManager
int m_streamSampleRate
Sample rate of received stream.
Definition: localinputgui.h:65
virtual MessageQueue * getInputMessageQueue()
Definition: localinputgui.h:55
bool m_allBlocksReceived
Definition: localinputgui.h:76
DeviceUISet * m_deviceUISet
Definition: localinputgui.h:61
QTimer m_updateTimer
Definition: localinputgui.h:67
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48