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.
glspectrumgui.h
Go to the documentation of this file.
1 #ifndef INCLUDE_GLSPECTRUMGUI_H
2 #define INCLUDE_GLSPECTRUMGUI_H
3 
4 #include <QWidget>
5 #include "dsp/dsptypes.h"
6 #include "export.h"
8 #include "util/messagequeue.h"
9 
10 namespace Ui {
11  class GLSpectrumGUI;
12 }
13 
14 class SpectrumVis;
15 class GLSpectrum;
16 
17 class SDRGUI_API GLSpectrumGUI : public QWidget, public Serializable {
18  Q_OBJECT
19 
20 public:
22  {
26  AvgModeMax
27  };
28 
29  explicit GLSpectrumGUI(QWidget* parent = NULL);
30  ~GLSpectrumGUI();
31 
32  void setBuddies(MessageQueue* messageQueue, SpectrumVis* spectrumVis, GLSpectrum* glSpectrum);
33 
34  void resetToDefaults();
35  virtual QByteArray serialize() const;
36  virtual bool deserialize(const QByteArray& data);
37 
38 private:
39  Ui::GLSpectrumGUI* ui;
40 
45 
46  qint32 m_fftSize;
47  qint32 m_fftOverlap;
48  qint32 m_fftWindow;
51  int m_decay;
62  bool m_invert;
66  unsigned int m_averagingNb;
67  bool m_linear;
68 
69  void applySettings();
70  int getAveragingIndex(int averaging) const;
71  int getAveragingValue(int averagingIndex) const;
72  void setAveragingCombo();
73  void setNumberStr(int n, QString& s);
74  void setNumberStr(float v, int decimalPlaces, QString& s);
75  void setAveragingToolitp();
76  bool handleMessage(const Message& message);
77 
78 private slots:
79  void on_fftWindow_currentIndexChanged(int index);
80  void on_fftSize_currentIndexChanged(int index);
81  void on_refLevel_currentIndexChanged(int index);
82  void on_levelRange_currentIndexChanged(int index);
83  void on_decay_valueChanged(int index);
84  void on_decayDivisor_valueChanged(int index);
85  void on_stroke_valueChanged(int index);
86  void on_gridIntensity_valueChanged(int index);
87  void on_traceIntensity_valueChanged(int index);
88  void on_averagingMode_currentIndexChanged(int index);
89  void on_averaging_currentIndexChanged(int index);
90  void on_linscale_toggled(bool checked);
91 
92  void on_waterfall_toggled(bool checked);
93  void on_histogram_toggled(bool checked);
94  void on_maxHold_toggled(bool checked);
95  void on_current_toggled(bool checked);
96  void on_invert_toggled(bool checked);
97  void on_grid_toggled(bool checked);
98  void on_clearSpectrum_clicked(bool checked);
99 
100  void handleInputMessages();
101 };
102 
103 #endif // INCLUDE_GLSPECTRUMGUI_H
bool m_displayCurrent
Definition: glspectrumgui.h:59
Ui::GLSpectrumGUI * ui
Definition: glspectrumgui.h:39
qint32 m_fftOverlap
Definition: glspectrumgui.h:47
int m_displayTraceIntensity
Definition: glspectrumgui.h:55
bool m_invertedWaterfall
Definition: glspectrumgui.h:57
qint32 m_fftWindow
Definition: glspectrumgui.h:48
MessageQueue * m_messageQueueToVis
Definition: glspectrumgui.h:41
qint32 m_fftSize
Definition: glspectrumgui.h:46
MessageQueue m_messageQueue
Definition: glspectrumgui.h:44
bool m_linear
linear else logarithmic scale
Definition: glspectrumgui.h:67
bool m_displayHistogram
Definition: glspectrumgui.h:60
#define SDRGUI_API
Definition: export.h:52
bool m_displayWaterfall
Definition: glspectrumgui.h:56
SpectrumVis * m_spectrumVis
Definition: glspectrumgui.h:42
bool m_displayMaxHold
Definition: glspectrumgui.h:58
GLSpectrum * m_glSpectrum
Definition: glspectrumgui.h:43
int m_averagingMaxScale
Max power of 10 multiplier to 2,5,10 base ex: 2 -> 2,5,10,20,50,100,200,500,1000. ...
Definition: glspectrumgui.h:65
AveragingMode m_averagingMode
Definition: glspectrumgui.h:63
int m_displayGridIntensity
Definition: glspectrumgui.h:54
float Real
Definition: dsptypes.h:42
unsigned int m_averagingNb
Definition: glspectrumgui.h:66