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.
localoutputgui.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_LOCALOUTPUTGUI_H
19 #define INCLUDE_LOCALOUTPUTGUI_H
20 
21 #include <QTimer>
22 #include <QWidget>
23 #include <QNetworkRequest>
24 
26 #include "util/messagequeue.h"
27 
28 #include "localoutput.h"
29 
30 class DeviceUISet;
31 class QNetworkAccessManager;
32 class QNetworkReply;
33 class QJsonObject;
34 
35 namespace Ui {
36  class LocalOutputGui;
37 }
38 
39 class LocalOutputGui : public QWidget, public PluginInstanceGUI {
40  Q_OBJECT
41 
42 public:
43  explicit LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
44  virtual ~LocalOutputGui();
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::LocalOutputGui* ui;
60 
67  QTimer m_updateTimer;
68  QTimer m_statusTimer;
71 
73  std::size_t m_tickCount;
74 
77 
80 
81  QNetworkAccessManager *m_networkManager;
82  QNetworkRequest m_networkRequest;
83 
84  void blockApplySettings(bool block);
85  void displaySettings();
86  void sendSettings();
87  void updateSampleRateAndFrequency();
88 
89 private slots:
90  void handleInputMessages();
91  void on_startStop_toggled(bool checked);
92  void updateHardware();
93  void updateStatus();
94  void openDeviceSettingsDialog(const QPoint& p);
95 };
96 
97 #endif // INCLUDE_LOCALOUTPUTGUI_H
LocalOutputSettings m_settings
current settings
QPalette m_paletteWhiteText
QNetworkRequest m_networkRequest
DeviceUISet * m_deviceUISet
MessageQueue m_inputMessageQueue
Ui::LocalOutputGui * ui
int m_streamSampleRate
Sample rate of received stream.
QNetworkAccessManager * m_networkManager
LocalOutput * m_sampleSink
QTimer m_updateTimer
virtual MessageQueue * getInputMessageQueue()
quint64 m_streamCenterFrequency
Center frequency of received stream.
QTimer m_statusTimer
QPalette m_paletteGreenText
std::size_t m_tickCount