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.
remotesourcegui.h
Go to the documentation of this file.
1 // Copyright (C) 2018-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_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
19 #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
20 
21 #include <QTime>
22 
24 #include "dsp/channelmarker.h"
25 #include "gui/rollupwidget.h"
26 #include "util/messagequeue.h"
27 
28 #include "../remotesource/remotesourcesettings.h"
29 
30 class PluginAPI;
31 class DeviceUISet;
33 class RemoteSource;
34 
35 namespace Ui {
36  class RemoteSourceGUI;
37 }
38 
40  Q_OBJECT
41 
42 public:
43  static RemoteSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
44  virtual void destroy();
45 
46  void setName(const QString& name);
47  QString getName() const;
48  virtual qint64 getCenterFrequency() const;
49  virtual void setCenterFrequency(qint64 centerFrequency);
50 
51  void resetToDefaults();
52  QByteArray serialize() const;
53  bool deserialize(const QByteArray& data);
54  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
55  virtual bool handleMessage(const Message& message);
56 
57 public slots:
58  void channelMarkerChangedByCursor();
59 
60 private:
61  Ui::RemoteSourceGUI* ui;
67 
70 
78  QTime m_time;
80 
81  explicit RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
82  virtual ~RemoteSourceGUI();
83 
84  void blockApplySettings(bool block);
85  void applySettings(bool force = false);
86  void displaySettings();
87 
88  void leaveEvent(QEvent*);
89  void enterEvent(QEvent*);
90 
91  void displayEventCounts();
92  void displayEventStatus(int recoverableCount, int unrecoverableCount);
93  void displayEventTimer();
94 
95 private slots:
96  void handleSourceMessages();
97  void on_dataAddress_returnPressed();
98  void on_dataPort_returnPressed();
99  void on_dataApplyButton_clicked(bool checked);
100  void onWidgetRolled(QWidget* widget, bool rollDown);
101  void onMenuDialogCalled(const QPoint& p);
102  void on_eventCountsReset_clicked(bool checked);
103  void tick();
104 };
105 
106 
107 #endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ */
RemoteSource * m_remoteSrc
uint32_t m_countRecovered
uint32_t m_tickCount
uint32_t m_lastCountRecovered
ChannelMarker m_channelMarker
DeviceUISet * m_deviceUISet
unsigned int uint32_t
Definition: rtptypes_win.h:46
void * create(QString type)
MessageQueue m_inputMessageQueue
uint32_t m_countUnrecoverable
uint32_t m_lastSampleCount
RemoteSourceSettings m_settings
uint32_t m_lastCountUnrecoverable
PluginAPI * m_pluginAPI
virtual MessageQueue * getInputMessageQueue()
Ui::RemoteSourceGUI * ui
uint64_t m_lastTimestampUs
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48