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.
remotesinkgui.h
Go to the documentation of this file.
1 // Copyright (C) 2018 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_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_
19 #define PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_
20 
21 #include <stdint.h>
22 
23 #include <QObject>
24 #include <QTime>
25 
27 #include "dsp/channelmarker.h"
28 #include "gui/rollupwidget.h"
29 #include "util/messagequeue.h"
30 
31 #include "remotesinksettings.h"
32 
33 class PluginAPI;
34 class DeviceUISet;
35 class RemoteSink;
36 class BasebandSampleSink;
37 
38 namespace Ui {
39  class RemoteSinkGUI;
40 }
41 
43  Q_OBJECT
44 public:
45  static RemoteSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
46  virtual void destroy();
47 
48  void setName(const QString& name);
49  QString getName() const;
50  virtual qint64 getCenterFrequency() const;
51  virtual void setCenterFrequency(qint64 centerFrequency);
52 
53  void resetToDefaults();
54  QByteArray serialize() const;
55  bool deserialize(const QByteArray& data);
56  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
57  virtual bool handleMessage(const Message& message);
58 
59 private:
60  Ui::RemoteSinkGUI* ui;
69 
72 
73  QTime m_time;
75 
76  explicit RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
77  virtual ~RemoteSinkGUI();
78 
79  void blockApplySettings(bool block);
80  void applySettings(bool force = false);
81  void applyChannelSettings();
82  void displaySettings();
83  void displayRateAndShift();
84  void updateTxDelayTime();
85 
86  void leaveEvent(QEvent*);
87  void enterEvent(QEvent*);
88 
89  void applyDecimation();
90  void applyPosition();
91 
92 private slots:
93  void handleSourceMessages();
94  void on_decimationFactor_currentIndexChanged(int index);
95  void on_position_valueChanged(int value);
96  void on_dataAddress_returnPressed();
97  void on_dataPort_returnPressed();
98  void on_dataApplyButton_clicked(bool checked);
99  void on_nbFECBlocks_valueChanged(int value);
100  void on_txDelay_valueChanged(int value);
101  void onWidgetRolled(QWidget* widget, bool rollDown);
102  void onMenuDialogCalled(const QPoint& p);
103  void tick();
104 };
105 
106 
107 
108 #endif /* PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_ */
uint32_t m_tickCount
Definition: remotesinkgui.h:74
virtual MessageQueue * getInputMessageQueue()
Definition: remotesinkgui.h:56
RemoteSinkSettings m_settings
Definition: remotesinkgui.h:64
ChannelMarker m_channelMarker
Definition: remotesinkgui.h:63
MessageQueue m_inputMessageQueue
Definition: remotesinkgui.h:71
DeviceUISet * m_deviceUISet
Definition: remotesinkgui.h:62
unsigned int uint32_t
Definition: rtptypes_win.h:46
RemoteSink * m_remoteSink
Definition: remotesinkgui.h:70
double m_shiftFrequencyFactor
Channel frequency shift factor.
Definition: remotesinkgui.h:67
void * create(QString type)
Ui::RemoteSinkGUI * ui
Definition: remotesinkgui.h:60
bool m_doApplySettings
Definition: remotesinkgui.h:68
PluginAPI * m_pluginAPI
Definition: remotesinkgui.h:61
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: remotesinkgui.h:66