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.
localsourcegui.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_CHANNELTX_LOCALSOURCE_LOCALSOURCEGUI_H_
19 #define PLUGINS_CHANNELTX_LOCALSOURCE_LOCALSOURCEGUI_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 "localsourcesettings.h"
32 
33 class PluginAPI;
34 class DeviceUISet;
35 class LocalSource;
37 
38 namespace Ui {
39  class LocalSourceGUI;
40 }
41 
43  Q_OBJECT
44 public:
45  static LocalSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel);
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::LocalSourceGUI* ui;
69 
72 
73  QTime m_time;
75 
76  explicit LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel, QWidget* parent = 0);
77  virtual ~LocalSourceGUI();
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 applyInterpolation();
90  void applyPosition();
91 
92 private slots:
93  void handleSourceMessages();
94  void on_interpolationFactor_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_ */
MessageQueue m_inputMessageQueue
ChannelMarker m_channelMarker
PluginAPI * m_pluginAPI
quint64 m_deviceCenterFrequency
Center frequency in device.
unsigned int uint32_t
Definition: rtptypes_win.h:46
void * create(QString type)
uint32_t m_tickCount
LocalSourceSettings m_settings
virtual MessageQueue * getInputMessageQueue()
LocalSource * m_localSource
Ui::LocalSourceGUI * ui
DeviceUISet * m_deviceUISet
double m_shiftFrequencyFactor
Channel frequency shift factor.