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.
localsinkgui.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 PLUGINS_CHANNELRX_LOCALSINK_LOCALSINKGUI_H_
19 #define PLUGINS_CHANNELRX_LOCALSINK_LOCALSINKGUI_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 "localsinksettings.h"
32 
33 class PluginAPI;
34 class DeviceUISet;
35 class LocalSink;
36 class BasebandSampleSink;
37 
38 namespace Ui {
39  class LocalSinkGUI;
40 }
41 
43  Q_OBJECT
44 public:
45  static LocalSinkGUI* 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::LocalSinkGUI* ui;
69 
72 
73  QTime m_time;
75 
76  explicit LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
77  virtual ~LocalSinkGUI();
78 
79  void blockApplySettings(bool block);
80  void applySettings(bool force = false);
81  void applyChannelSettings();
82  void displaySettings();
83  void displayRateAndShift();
84  void updateLocalDevices();
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_localDevice_currentIndexChanged(int index);
97  void on_localDevicesRefresh_clicked(bool checked);
98  void onWidgetRolled(QWidget* widget, bool rollDown);
99  void onMenuDialogCalled(const QPoint& p);
100  void tick();
101 };
102 
103 
104 
105 #endif /* PLUGINS_CHANNELRX_LOCALSINK_LOCALSINKGUI_H_ */
Ui::LocalSinkGUI * ui
Definition: localsinkgui.h:60
LocalSink * m_localSink
Definition: localsinkgui.h:70
virtual MessageQueue * getInputMessageQueue()
Definition: localsinkgui.h:56
double m_shiftFrequencyFactor
Channel frequency shift factor.
Definition: localsinkgui.h:67
unsigned int uint32_t
Definition: rtptypes_win.h:46
void * create(QString type)
PluginAPI * m_pluginAPI
Definition: localsinkgui.h:61
ChannelMarker m_channelMarker
Definition: localsinkgui.h:63
MessageQueue m_inputMessageQueue
Definition: localsinkgui.h:71
DeviceUISet * m_deviceUISet
Definition: localsinkgui.h:62
LocalSinkSettings m_settings
Definition: localsinkgui.h:64
bool m_doApplySettings
Definition: localsinkgui.h:68
uint32_t m_tickCount
Definition: localsinkgui.h:74
quint64 m_deviceCenterFrequency
Center frequency in device.
Definition: localsinkgui.h:66