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.
udpsourcegui.h
Go to the documentation of this file.
1 // Copyright (C) 2017 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_UDPSINK_UDPSOURCEGUI_H_
19 #define PLUGINS_CHANNELTX_UDPSINK_UDPSOURCEGUI_H_
20 
22 #include <QObject>
23 
24 #include "gui/rollupwidget.h"
25 #include "dsp/channelmarker.h"
26 #include "util/messagequeue.h"
27 #include "util/movingaverage.h"
28 
29 #include "udpsource.h"
30 #include "udpsourcesettings.h"
31 
32 class PluginAPI;
33 class DeviceUISet;
35 class SpectrumVis;
36 
37 namespace Ui {
38  class UDPSourceGUI;
39 }
40 
42  Q_OBJECT
43 
44 public:
45  static UDPSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
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  virtual void resetToDefaults();
53  virtual QByteArray serialize() const;
54  virtual bool deserialize(const QByteArray& data);
55  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
56  virtual bool handleMessage(const Message& message);
57 
58 public slots:
59  void channelMarkerChangedByCursor();
60 
61 private:
62  Ui::UDPSourceGUI* ui;
71 
72  // settings
77 
78  explicit UDPSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = NULL);
79  virtual ~UDPSourceGUI();
80 
81  void blockApplySettings(bool block);
82  void applySettings(bool force = false);
83  void displaySettings();
84  void setSampleFormat(int index);
85  void setSampleFormatIndex(const UDPSourceSettings::SampleFormat& sampleFormat);
86 
87  void leaveEvent(QEvent*);
88  void enterEvent(QEvent*);
89 
90 private slots:
91  void handleSourceMessages();
92  void on_deltaFrequency_changed(qint64 value);
93  void on_sampleFormat_currentIndexChanged(int index);
94  void on_localUDPAddress_editingFinished();
95  void on_localUDPPort_editingFinished();
96  void on_sampleRate_textEdited(const QString& arg1);
97  void on_rfBandwidth_textEdited(const QString& arg1);
98  void on_fmDeviation_textEdited(const QString& arg1);
99  void on_amModPercent_textEdited(const QString& arg1);
100  void on_applyBtn_clicked();
101  void onWidgetRolled(QWidget* widget, bool rollDown);
102  void onMenuDialogCalled(const QPoint& p);
103  void on_gainIn_valueChanged(int value);
104  void on_gainOut_valueChanged(int value);
105  void on_squelch_valueChanged(int value);
106  void on_squelchGate_valueChanged(int value);
107  void on_channelMute_toggled(bool checked);
108  void on_resetUDPReadIndex_clicked();
109  void on_autoRWBalance_toggled(bool checked);
110  void on_stereoInput_toggled(bool checked);
111  void tick();
112 };
113 
114 #endif /* PLUGINS_CHANNELTX_UDPSINK_UDPSOURCEGUI_H_ */
PluginAPI * m_pluginAPI
Definition: udpsourcegui.h:63
MessageQueue m_inputMessageQueue
Definition: udpsourcegui.h:76
DeviceUISet * m_deviceUISet
Definition: udpsourcegui.h:64
MovingAverageUtil< double, double, 4 > m_inPowerAvg
Definition: udpsourcegui.h:68
virtual MessageQueue * getInputMessageQueue()
Definition: udpsourcegui.h:55
unsigned int uint32_t
Definition: rtptypes_win.h:46
bool m_rfBandwidthChanged
Definition: udpsourcegui.h:74
Ui::UDPSourceGUI * ui
Definition: udpsourcegui.h:62
void * create(QString type)
MovingAverageUtil< double, double, 4 > m_channelPowerAvg
Definition: udpsourcegui.h:67
SpectrumVis * m_spectrumVis
Definition: udpsourcegui.h:65
uint32_t m_tickCount
Definition: udpsourcegui.h:69
UDPSourceSettings m_settings
Definition: udpsourcegui.h:73
ChannelMarker m_channelMarker
Definition: udpsourcegui.h:70
UDPSource * m_udpSource
Definition: udpsourcegui.h:66
bool m_doApplySettings
Definition: udpsourcegui.h:75