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.
nfmmodgui.h
Go to the documentation of this file.
1 // Copyright (C) 2016 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_MODNFM_NFMMODGUI_H_
19 #define PLUGINS_CHANNELTX_MODNFM_NFMMODGUI_H_
20 
22 #include "gui/rollupwidget.h"
23 #include "dsp/channelmarker.h"
24 #include "util/movingaverage.h"
25 #include "util/messagequeue.h"
26 
27 #include "nfmmod.h"
28 #include "nfmmodsettings.h"
29 
30 class PluginAPI;
31 class DeviceUISet;
33 
34 namespace Ui {
35  class NFMModGUI;
36 }
37 
38 class NFMModGUI : public RollupWidget, public PluginInstanceGUI {
39  Q_OBJECT
40 
41 public:
42  static NFMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
43  virtual void destroy();
44 
45  void setName(const QString& name);
46  QString getName() const;
47  virtual qint64 getCenterFrequency() const;
48  virtual void setCenterFrequency(qint64 centerFrequency);
49 
50  void resetToDefaults();
51  QByteArray serialize() const;
52  bool deserialize(const QByteArray& data);
53  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
54  virtual bool handleMessage(const Message& message);
55 
56 public slots:
57  void channelMarkerChangedByCursor();
58 
59 private:
60  Ui::NFMModGUI* ui;
66 
69 
70  QString m_fileName;
71  quint32 m_recordLength;
74  std::size_t m_tickCount;
78 
79  explicit NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
80  virtual ~NFMModGUI();
81 
82  void blockApplySettings(bool block);
83  void applySettings(bool force = false);
84  void displaySettings();
85  void updateWithStreamData();
86  void updateWithStreamTime();
87 
88  void leaveEvent(QEvent*);
89  void enterEvent(QEvent*);
90 
91 private slots:
92  void handleSourceMessages();
93 
94  void on_deltaFrequency_changed(qint64 value);
95  void on_rfBW_currentIndexChanged(int index);
96  void on_afBW_valueChanged(int value);
97  void on_fmDev_valueChanged(int value);
98  void on_toneFrequency_valueChanged(int value);
99  void on_volume_valueChanged(int value);
100  void on_channelMute_toggled(bool checked);
101  void on_tone_toggled(bool checked);
102  void on_morseKeyer_toggled(bool checked);
103  void on_mic_toggled(bool checked);
104  void on_play_toggled(bool checked);
105 
106  void on_playLoop_toggled(bool checked);
107  void on_navTimeSlider_valueChanged(int value);
108  void on_showFileDialog_clicked(bool checked);
109 
110  void on_ctcss_currentIndexChanged(int index);
111  void on_ctcssOn_toggled(bool checked);
112 
113  void on_feedbackEnable_toggled(bool checked);
114  void on_feedbackVolume_valueChanged(int value);
115 
116  void onWidgetRolled(QWidget* widget, bool rollDown);
117  void onMenuDialogCalled(const QPoint& p);
118 
119  void configureFileName();
120  void audioSelect();
121  void audioFeedbackSelect();
122  void tick();
123 };
124 
125 #endif /* PLUGINS_CHANNELTX_MODNFM_NFMMODGUI_H_ */
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: nfmmodgui.h:68
int m_recordSampleRate
Definition: nfmmodgui.h:72
int m_samplesCount
Definition: nfmmodgui.h:73
ChannelMarker m_channelMarker
Definition: nfmmodgui.h:63
NFMMod * m_nfmMod
Definition: nfmmodgui.h:67
MessageQueue m_inputMessageQueue
Definition: nfmmodgui.h:77
std::size_t m_tickCount
Definition: nfmmodgui.h:74
void * create(QString type)
Definition: nfmmod.h:49
QString m_fileName
Definition: nfmmodgui.h:70
Ui::NFMModGUI * ui
Definition: nfmmodgui.h:60
PluginAPI * m_pluginAPI
Definition: nfmmodgui.h:61
bool m_doApplySettings
Definition: nfmmodgui.h:65
bool m_enableNavTime
Definition: nfmmodgui.h:75
NFMModSettings::NFMModInputAF m_modAFInput
Definition: nfmmodgui.h:76
NFMModSettings m_settings
Definition: nfmmodgui.h:64
virtual MessageQueue * getInputMessageQueue()
Definition: nfmmodgui.h:53
quint32 m_recordLength
Definition: nfmmodgui.h:71
DeviceUISet * m_deviceUISet
Definition: nfmmodgui.h:62