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.
freedvmodgui.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_MODFREEDV_FREEDVMODGUI_H_
19 #define PLUGINS_CHANNELTX_MODFREEDV_FREEDVMODGUI_H_
20 
21 #include <QIcon>
22 
24 #include "gui/rollupwidget.h"
25 #include "dsp/channelmarker.h"
26 #include "util/movingaverage.h"
27 #include "util/messagequeue.h"
28 
29 #include "freedvmod.h"
30 #include "freedvmodsettings.h"
31 
32 class PluginAPI;
33 class DeviceUISet;
35 class SpectrumVis;
36 
37 namespace Ui {
38  class FreeDVModGUI;
39 }
40 
42  Q_OBJECT
43 
44 public:
45  static FreeDVModGUI* 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 
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 public slots:
60  void channelMarkerChangedByCursor();
61 
62 private:
63  Ui::FreeDVModGUI* ui;
70 
74 
75  QString m_fileName;
76  quint32 m_recordLength;
79  std::size_t m_tickCount;
82 
83  explicit FreeDVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
84  virtual ~FreeDVModGUI();
85 
86  bool blockApplySettings(bool block);
87  void applySettings(bool force = false);
88  void applyBandwidths(int spanLog2, bool force = false);
89  void displayBandwidths(int spanLog2);
90  void displaySettings();
91  void updateWithStreamData();
92  void updateWithStreamTime();
93  void channelMarkerUpdate();
94 
95  void leaveEvent(QEvent*);
96  void enterEvent(QEvent*);
97 
98 private slots:
99  void handleSourceMessages();
100  void on_deltaFrequency_changed(qint64 value);
101  void on_spanLog2_valueChanged(int value);
102  void on_gaugeInput_toggled(bool checked);
103  void on_volume_valueChanged(int value);
104  void on_audioMute_toggled(bool checked);
105  void on_freeDVMode_currentIndexChanged(int index);
106  void on_tone_toggled(bool checked);
107  void on_toneFrequency_valueChanged(int value);
108  void on_mic_toggled(bool checked);
109  void on_play_toggled(bool checked);
110  void on_playLoop_toggled(bool checked);
111  void on_morseKeyer_toggled(bool checked);
112 
113  void on_navTimeSlider_valueChanged(int value);
114  void on_showFileDialog_clicked(bool checked);
115 
116  void onWidgetRolled(QWidget* widget, bool rollDown);
117  void onMenuDialogCalled(const QPoint& p);
118 
119  void configureFileName();
120  void audioSelect();
121  void tick();
122 };
123 
124 #endif /* PLUGINS_CHANNELTX_MODFREEDV_FREEDVMODGUI_H_ */
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: freedvmodgui.h:73
std::size_t m_tickCount
Definition: freedvmodgui.h:79
int m_samplesCount
Definition: freedvmodgui.h:78
int m_spectrumRate
Definition: freedvmodgui.h:69
bool m_doApplySettings
Definition: freedvmodgui.h:68
quint32 m_recordLength
Definition: freedvmodgui.h:76
MessageQueue m_inputMessageQueue
Definition: freedvmodgui.h:81
void * create(QString type)
FreeDVModSettings m_settings
Definition: freedvmodgui.h:67
DeviceUISet * m_deviceUISet
Definition: freedvmodgui.h:65
SpectrumVis * m_spectrumVis
Definition: freedvmodgui.h:71
int m_recordSampleRate
Definition: freedvmodgui.h:77
QString m_fileName
Definition: freedvmodgui.h:75
FreeDVMod * m_freeDVMod
Definition: freedvmodgui.h:72
Ui::FreeDVModGUI * ui
Definition: freedvmodgui.h:63
bool m_enableNavTime
Definition: freedvmodgui.h:80
ChannelMarker m_channelMarker
Definition: freedvmodgui.h:66
virtual MessageQueue * getInputMessageQueue()
Definition: freedvmodgui.h:56
PluginAPI * m_pluginAPI
Definition: freedvmodgui.h:64