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.
ssbmodgui.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_MODSSB_SSBMODGUI_H_
19 #define PLUGINS_CHANNELTX_MODSSB_SSBMODGUI_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 "ssbmod.h"
30 #include "ssbmodsettings.h"
31 
32 class PluginAPI;
33 class DeviceUISet;
35 class SpectrumVis;
36 
37 namespace Ui {
38  class SSBModGUI;
39 }
40 
41 class SSBModGUI : public RollupWidget, public PluginInstanceGUI {
42  Q_OBJECT
43 
44 public:
45  static SSBModGUI* 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::SSBModGUI* ui;
70 
74 
75  QString m_fileName;
76  quint32 m_recordLength;
79  std::size_t m_tickCount;
82 
83  QIcon m_iconDSBUSB;
84  QIcon m_iconDSBLSB;
85 
86  explicit SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
87  virtual ~SSBModGUI();
88 
89  bool blockApplySettings(bool block);
90  void applySettings(bool force = false);
91  void applyBandwidths(int spanLog2, bool force = false);
92  void displaySettings();
93  void updateWithStreamData();
94  void updateWithStreamTime();
95  void channelMarkerUpdate();
96 
97  void leaveEvent(QEvent*);
98  void enterEvent(QEvent*);
99 
100 private slots:
101  void handleSourceMessages();
102  void on_deltaFrequency_changed(qint64 value);
103  void on_flipSidebands_clicked(bool checked);
104  void on_dsb_toggled(bool checked);
105  void on_audioBinaural_toggled(bool checked);
106  void on_audioFlipChannels_toggled(bool checked);
107  void on_spanLog2_valueChanged(int value);
108  void on_BW_valueChanged(int value);
109  void on_lowCut_valueChanged(int value);
110  void on_volume_valueChanged(int value);
111  void on_audioMute_toggled(bool checked);
112  void on_tone_toggled(bool checked);
113  void on_toneFrequency_valueChanged(int value);
114  void on_mic_toggled(bool checked);
115  void on_agc_toggled(bool checked);
116  void on_play_toggled(bool checked);
117  void on_playLoop_toggled(bool checked);
118  void on_morseKeyer_toggled(bool checked);
119 
120  void on_navTimeSlider_valueChanged(int value);
121  void on_showFileDialog_clicked(bool checked);
122 
123  void on_feedbackEnable_toggled(bool checked);
124  void on_feedbackVolume_valueChanged(int value);
125 
126  void onWidgetRolled(QWidget* widget, bool rollDown);
127  void onMenuDialogCalled(const QPoint& p);
128 
129  void configureFileName();
130  void audioSelect();
131  void audioFeedbackSelect();
132  void tick();
133 };
134 
135 #endif /* PLUGINS_CHANNELTX_MODSSB_SSBMODGUI_H_ */
SSBModSettings m_settings
Definition: ssbmodgui.h:67
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: ssbmodgui.h:73
Definition: ssbmod.h:49
PluginAPI * m_pluginAPI
Definition: ssbmodgui.h:64
int m_samplesCount
Definition: ssbmodgui.h:78
QIcon m_iconDSBUSB
Definition: ssbmodgui.h:83
QString m_fileName
Definition: ssbmodgui.h:75
int m_recordSampleRate
Definition: ssbmodgui.h:77
DeviceUISet * m_deviceUISet
Definition: ssbmodgui.h:65
void * create(QString type)
quint32 m_recordLength
Definition: ssbmodgui.h:76
int m_spectrumRate
Definition: ssbmodgui.h:69
virtual MessageQueue * getInputMessageQueue()
Definition: ssbmodgui.h:56
Ui::SSBModGUI * ui
Definition: ssbmodgui.h:63
MessageQueue m_inputMessageQueue
Definition: ssbmodgui.h:81
bool m_enableNavTime
Definition: ssbmodgui.h:80
SSBMod * m_ssbMod
Definition: ssbmodgui.h:72
std::size_t m_tickCount
Definition: ssbmodgui.h:79
bool m_doApplySettings
Definition: ssbmodgui.h:68
QIcon m_iconDSBLSB
Definition: ssbmodgui.h:84
ChannelMarker m_channelMarker
Definition: ssbmodgui.h:66
SpectrumVis * m_spectrumVis
Definition: ssbmodgui.h:71