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.
atvmodgui.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_MODTV_ATVMODGUI_H_
19 #define PLUGINS_CHANNELTX_MODTV_ATVMODGUI_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 "atvmod.h"
28 #include "atvmodsettings.h"
29 
30 class PluginAPI;
31 class DeviceUISet;
33 class QMessageBox;
34 
35 namespace Ui {
36  class ATVModGUI;
37 }
38 
39 class ATVModGUI : public RollupWidget, public PluginInstanceGUI {
40  Q_OBJECT
41 
42 public:
43  static ATVModGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
44  virtual void destroy();
45 
46  void setName(const QString& name);
47  QString getName() const;
48  virtual qint64 getCenterFrequency() const;
49  virtual void setCenterFrequency(qint64 centerFrequency);
50 
51  void resetToDefaults();
52  QByteArray serialize() const;
53  bool deserialize(const QByteArray& data);
54  virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
55  virtual bool handleMessage(const Message& message);
56 
57 public slots:
58  void channelMarkerChangedByCursor();
59 
60 private:
61  Ui::ATVModGUI* ui;
67 
70 
71  QString m_imageFileName;
72  QString m_videoFileName;
73  quint32 m_videoLength;
76  std::size_t m_tickCount;
78  QMessageBox *m_camBusyFPSMessageBox;
81 
82  explicit ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
83  virtual ~ATVModGUI();
84 
85  void blockApplySettings(bool block);
86  void applySettings(bool force = false);
87  void displaySettings();
88  void updateWithStreamData();
89  void updateWithStreamTime();
90  void setRFFiltersSlidersRange(int sampleRate);
91  void setChannelMarkerBandwidth();
92  int getNbLines();
93  int getFPS();
94  int getNbLinesIndex(int nbLines);
95  int getFPSIndex(int fps);
96 
97  void leaveEvent(QEvent*);
98  void enterEvent(QEvent*);
99 
100 private slots:
101  void handleSourceMessages();
102 
103  void on_deltaFrequency_changed(qint64 value);
104  void on_channelMute_toggled(bool checked);
105  void on_forceDecimator_toggled(bool checked);
106  void on_modulation_currentIndexChanged(int index);
107  void on_rfScaling_valueChanged(int value);
108  void on_fmExcursion_valueChanged(int value);
109  void on_rfBW_valueChanged(int value);
110  void on_rfOppBW_valueChanged(int value);
111  void on_nbLines_currentIndexChanged(int index);
112  void on_fps_currentIndexChanged(int index);
113  void on_standard_currentIndexChanged(int index);
114  void on_invertVideo_clicked(bool checked);
115  void on_uniformLevel_valueChanged(int value);
116  void on_inputSelect_currentIndexChanged(int index);
117  void on_imageFileDialog_clicked(bool checked);
118  void on_videoFileDialog_clicked(bool checked);
119 
120  void on_playVideo_toggled(bool checked);
121  void on_playLoop_toggled(bool checked);
122  void on_navTimeSlider_valueChanged(int value);
123 
124  void on_playCamera_toggled(bool checked);
125  void on_camSelect_currentIndexChanged(int index);
126  void on_cameraManualFPSEnable_toggled(bool checked);
127  void on_cameraManualFPS_valueChanged(int value);
128 
129  void on_overlayTextShow_toggled(bool checked);
130  void on_overlayText_textEdited(const QString& arg1);
131 
132  void onWidgetRolled(QWidget* widget, bool rollDown);
133  void onMenuDialogCalled(const QPoint& p);
134 
135  void configureImageFileName();
136  void configureVideoFileName();
137  void tick();
138 };
139 
140 #endif /* PLUGINS_CHANNELTX_MODAM_AMMODGUI_H_ */
ChannelMarker m_channelMarker
Definition: atvmodgui.h:64
quint32 m_videoLength
video file length in seconds
Definition: atvmodgui.h:73
Ui::ATVModGUI * ui
Definition: atvmodgui.h:61
bool m_doApplySettings
Definition: atvmodgui.h:66
virtual MessageQueue * getInputMessageQueue()
Definition: atvmodgui.h:54
int m_rfSliderDivisor
Definition: atvmodgui.h:79
float m_videoFrameRate
video file frame rate
Definition: atvmodgui.h:74
void * create(QString type)
PluginAPI * m_pluginAPI
Definition: atvmodgui.h:62
QString m_imageFileName
Definition: atvmodgui.h:71
QMessageBox * m_camBusyFPSMessageBox
Definition: atvmodgui.h:78
DeviceUISet * m_deviceUISet
Definition: atvmodgui.h:63
ATVMod * m_atvMod
Definition: atvmodgui.h:68
QString m_videoFileName
Definition: atvmodgui.h:72
bool m_enableNavTime
Definition: atvmodgui.h:77
Definition: atvmod.h:49
std::size_t m_tickCount
Definition: atvmodgui.h:76
int m_frameCount
Definition: atvmodgui.h:75
MessageQueue m_inputMessageQueue
Definition: atvmodgui.h:80
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: atvmodgui.h:69
ATVModSettings m_settings
Definition: atvmodgui.h:65