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.
ammodgui.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_MODAM_AMMODGUI_H_
19 #define PLUGINS_CHANNELTX_MODAM_AMMODGUI_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 "ammod.h"
28 #include "ammodsettings.h"
29 
30 class PluginAPI;
31 class DeviceUISet;
32 
33 class AMMod;
35 
36 namespace Ui {
37  class AMModGUI;
38 }
39 
40 class AMModGUI : public RollupWidget, public PluginInstanceGUI {
41  Q_OBJECT
42 
43 public:
44  static AMModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
45  virtual void destroy();
46 
47  void setName(const QString& name);
48  QString getName() const;
49  virtual qint64 getCenterFrequency() const;
50  virtual void setCenterFrequency(qint64 centerFrequency);
51 
52  void resetToDefaults();
53  QByteArray serialize() const;
54  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::AMModGUI* ui;
68 
71 
72  QString m_fileName;
73  quint32 m_recordLength;
76  std::size_t m_tickCount;
79 
80  explicit AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
81  virtual ~AMModGUI();
82 
83  void blockApplySettings(bool block);
84  void applySettings(bool force = false);
85  void displaySettings();
86  void updateWithStreamData();
87  void updateWithStreamTime();
88 
89  void leaveEvent(QEvent*);
90  void enterEvent(QEvent*);
91 
92 private slots:
93  void handleSourceMessages();
94 
95  void on_deltaFrequency_changed(qint64 value);
96  void on_rfBW_valueChanged(int value);
97  void on_modPercent_valueChanged(int value);
98  void on_volume_valueChanged(int value);
99  void on_channelMute_toggled(bool checked);
100  void on_tone_toggled(bool checked);
101  void on_toneFrequency_valueChanged(int value);
102  void on_mic_toggled(bool checked);
103  void on_play_toggled(bool checked);
104  void on_morseKeyer_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_feedbackEnable_toggled(bool checked);
111  void on_feedbackVolume_valueChanged(int value);
112 
113  void onWidgetRolled(QWidget* widget, bool rollDown);
114  void onMenuDialogCalled(const QPoint& p);
115 
116  void configureFileName();
117  void audioSelect();
118  void audioFeedbackSelect();
119  void tick();
120 };
121 
122 #endif /* PLUGINS_CHANNELTX_MODAM_AMMODGUI_H_ */
int m_samplesCount
Definition: ammodgui.h:75
Definition: ammod.h:47
virtual MessageQueue * getInputMessageQueue()
Definition: ammodgui.h:55
Ui::AMModGUI * ui
Definition: ammodgui.h:62
bool m_enableNavTime
Definition: ammodgui.h:77
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: ammodgui.h:70
PluginAPI * m_pluginAPI
Definition: ammodgui.h:63
int m_recordSampleRate
Definition: ammodgui.h:74
DeviceUISet * m_deviceUISet
Definition: ammodgui.h:64
quint32 m_recordLength
Definition: ammodgui.h:73
void * create(QString type)
std::size_t m_tickCount
Definition: ammodgui.h:76
QString m_fileName
Definition: ammodgui.h:72
bool m_doApplySettings
Definition: ammodgui.h:67
ChannelMarker m_channelMarker
Definition: ammodgui.h:65
AMMod * m_amMod
Definition: ammodgui.h:69
AMModSettings m_settings
Definition: ammodgui.h:66
MessageQueue m_inputMessageQueue
Definition: ammodgui.h:78