GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
waterfalldisplayform.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef WATERFALL_DISPLAY_FORM_H
12 #define WATERFALL_DISPLAY_FORM_H
13 
14 #include <gnuradio/filter/firdes.h>
17 #include <QtGui/QtGui>
18 #include <vector>
19 
21 
22 /*!
23  * \brief DisplayForm child for managing waterfall (spectrogram) plots.
24  * \ingroup qtgui_blk
25  */
27 {
28  Q_OBJECT
29 
30 public:
31  WaterfallDisplayForm(int nplots = 1, QWidget* parent = 0);
33 
35 
36  int getFFTSize() const;
37  double getTimePerFFT();
38  float getFFTAverage() const;
40 
41  int getColorMap(unsigned int which);
42  int getAlpha(unsigned int which);
43  double getMinIntensity(unsigned int which);
44  double getMaxIntensity(unsigned int which);
45 
46  void clearData();
47 
48  // returns the frequency that was last double-clicked on by the user
49  float getClickedFreq() const;
50 
51  // checks if there was a double-click event; reset if there was
52  bool checkClicked();
53 
54 public slots:
55  void customEvent(QEvent* e) override;
56  void setTimeTitle(const std::string);
57  void setSampleRate(const QString& samprate) override;
58  void setFFTSize(const int);
59  void setFFTAverage(const float);
61 
62  void setFrequencyRange(const double centerfreq, const double bandwidth);
63 
64  void setIntensityRange(const double minIntensity, const double maxIntensity);
65  void setMaxIntensity(const QString& m);
66  void setMinIntensity(const QString& m);
67 
68  void setAlpha(unsigned int which, unsigned int alpha);
69 
70  void setColorMap(unsigned int which,
71  const int newType,
72  const QColor lowColor = QColor("white"),
73  const QColor highColor = QColor("white"));
74 
75  void autoScale(bool en = false) override;
76  void setPlotPosHalf(bool half);
77  void setTimePerFFT(double t);
78  void setUpdateTime(double t);
79 
80 private slots:
81  void newData(const QEvent* updateEvent) override;
82  void onPlotPointSelected(const QPointF p) override;
83 
84 private:
85  QIntValidator* d_int_validator;
86 
87  double d_samp_rate, d_center_freq;
88  int d_fftsize;
89  double d_time_per_fft;
90  float d_fftavg;
91  gr::fft::window::win_type d_fftwintype;
92  double d_units;
93 
94  bool d_clicked;
95  double d_clicked_freq;
96 
97  double d_min_val, d_cur_min_val;
98  double d_max_val, d_cur_max_val;
99 
100  FFTAverageMenu* d_avgmenu;
101  FFTWindowMenu* d_winmenu;
102 };
103 
104 #endif /* WATERFALL_DISPLAY_FORM_H */
Base class for setting up and managing QTGUI plot forms.
Definition: displayform.h:30
Definition: form_menus.h:561
Definition: form_menus.h:575
DisplayForm child for managing waterfall (spectrogram) plots.
Definition: waterfalldisplayform.h:27
int getAlpha(unsigned int which)
void setTimePerFFT(double t)
void setFFTAverage(const float)
WaterfallDisplayPlot * getPlot() override
double getMinIntensity(unsigned int which)
void setSampleRate(const QString &samprate) override
void setColorMap(unsigned int which, const int newType, const QColor lowColor=QColor("white"), const QColor highColor=QColor("white"))
double getMaxIntensity(unsigned int which)
int getColorMap(unsigned int which)
void autoScale(bool en=false) override
void setFFTWindowType(const gr::fft::window::win_type)
void setPlotPosHalf(bool half)
void setFFTSize(const int)
void setFrequencyRange(const double centerfreq, const double bandwidth)
void customEvent(QEvent *e) override
gr::fft::window::win_type getFFTWindowType() const
int getFFTSize() const
void setIntensityRange(const double minIntensity, const double maxIntensity)
void setAlpha(unsigned int which, unsigned int alpha)
void setMinIntensity(const QString &m)
void setTimeTitle(const std::string)
float getFFTAverage() const
float getClickedFreq() const
~WaterfallDisplayForm() override
void setUpdateTime(double t)
WaterfallDisplayForm(int nplots=1, QWidget *parent=0)
void setMaxIntensity(const QString &m)
QWidget for displaying waterfall (spectrogram) plots.
Definition: WaterfallDisplayPlot.h:29
win_type
Definition: window.h:28