GNU Radio Manual and C++ API Reference 3.9.8.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
spectrumdisplayform.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2008-2011 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 SPECTRUM_DISPLAY_FORM_H
12#define SPECTRUM_DISPLAY_FORM_H
13
14#include <spectrumdisplayform.ui.h>
15
18
24#include <QTimer>
25#include <QValidator>
26#include <deque>
27#include <vector>
28
29class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
30{
31 Q_OBJECT
32
33public:
34 SpectrumDisplayForm(QWidget* parent = 0);
36
37 void setSystem(SpectrumGUIClass* newSystem,
38 const uint64_t numFFTDataPoints,
39 const uint64_t numTimeDomainDataPoints);
40
42 void setAverageCount(const int newCount);
43 void reset();
45 void resizeBuffers(const uint64_t numFFTDataPoints,
46 const uint64_t numTimeDomainDataPoints);
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
53
54public slots:
55 void resizeEvent(QResizeEvent* e) override;
56 void customEvent(QEvent* e) override;
57 void avgLineEdit_valueChanged(int valueString);
58 void maxHoldCheckBox_toggled(bool newState);
59 void minHoldCheckBox_toggled(bool newState);
62 void tabChanged(int index);
63
64 void setFrequencyRange(const double newCenterFrequency,
65 const double newStartFrequency,
66 const double newStopFrequency);
67 void closeEvent(QCloseEvent* e) override;
68 void windowTypeChanged(int newItem);
69 void useRFFrequenciesCB(bool useRFFlag);
70 void toggleRFFrequencies(bool en);
75 void fftComboBoxSelectedCB(const QString&);
76
77 void toggleTabFrequency(const bool state);
78 void toggleTabWaterfall(const bool state);
79 void toggleTabTime(const bool state);
80 void toggleTabConstellation(const bool state);
81
82 void setTimeDomainAxis(double min, double max);
83 void setConstellationAxis(double xmin, double xmax, double ymin, double ymax);
85 void setFrequencyAxis(double min, double max);
86 void setUpdateTime(double t);
87
88private slots:
89 void newFrequencyData(const SpectrumUpdateEvent*);
90 void updateGuiTimer();
91
92 void onFFTPlotPointSelected(const QPointF p);
93 void onWFallPlotPointSelected(const QPointF p);
94 void onTimePlotPointSelected(const QPointF p);
95 void onConstPlotPointSelected(const QPointF p);
96
97signals:
98 void plotPointSelected(const QPointF p, int type);
99
100private:
101 void _averageHistory(const double* newBuffer);
102
103 int _historyEntryCount;
104 int _historyEntry;
105 std::vector<double*>* _historyVector;
106 double* _averagedValues;
107 uint64_t _numRealDataPoints;
108 double* _realFFTDataPoints;
109 QIntValidator* _intValidator;
110 FrequencyDisplayPlot* _frequencyDisplayPlot;
111 WaterfallDisplayPlot* _waterfallDisplayPlot;
112 TimeDomainDisplayPlot* _timeDomainDisplayPlot;
113 ConstellationDisplayPlot* _constellationDisplayPlot;
114 SpectrumGUIClass* _system;
115 bool _systemSpecifiedFlag;
116 double _centerFrequency;
117 double _startFrequency;
118 double _noiseFloorAmplitude;
119 double _peakFrequency;
120 double _peakAmplitude;
121 double _stopFrequency;
122
123 double d_units;
124 bool d_clicked;
125 double d_clicked_freq;
126
127 // SpectrumUpdateEvent _lastSpectrumEvent;
128
129 // whether or not to use a particular display
130 int d_plot_fft;
131 int d_plot_waterfall;
132 int d_plot_time;
133 int d_plot_constellation;
134
135 QTimer* displayTimer;
136 double d_update_time;
137};
138
139#endif /* SPECTRUM_DISPLAY_FORM_H */
QWidget for displaying constellaton (I&Q) plots.
Definition: ConstellationDisplayPlot.h:24
QWidget for displaying frequency domain (PSD) plots.
Definition: FrequencyDisplayPlot.h:24
Definition: spectrumdisplayform.h:30
void closeEvent(QCloseEvent *e) override
void setConstellationAxis(double xmin, double xmax, double ymin, double ymax)
void waterfallMinimumIntensityChangedCB(double)
void toggleRFFrequencies(bool en)
~SpectrumDisplayForm() override
void waterfallAutoScaleBtnCB()
void useRFFrequenciesCB(bool useRFFlag)
void tabChanged(int index)
void toggleTabWaterfall(const bool state)
void resizeBuffers(const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints)
void setSystem(SpectrumGUIClass *newSystem, const uint64_t numFFTDataPoints, const uint64_t numTimeDomainDataPoints)
void fftComboBoxSelectedCB(const QString &)
void setFrequencyAxis(double min, double max)
void maxHoldCheckBox_toggled(bool newState)
void setUpdateTime(double t)
void maxHoldResetBtn_clicked()
void setAverageCount(const int newCount)
void toggleTabTime(const bool state)
void toggleTabConstellation(const bool state)
void avgLineEdit_valueChanged(int valueString)
void customEvent(QEvent *e) override
void waterfallMaximumIntensityChangedCB(double)
void waterfallIntensityColorTypeChanged(int)
void toggleTabFrequency(const bool state)
void setFrequencyRange(const double newCenterFrequency, const double newStartFrequency, const double newStopFrequency)
void windowTypeChanged(int newItem)
void setConstellationPenSize(int size)
void minHoldCheckBox_toggled(bool newState)
float getClickedFreq() const
void plotPointSelected(const QPointF p, int type)
void setTimeDomainAxis(double min, double max)
void minHoldResetBtn_clicked()
SpectrumDisplayForm(QWidget *parent=0)
void resizeEvent(QResizeEvent *e) override
QWidget class for controlling plotting.
Definition: SpectrumGUIClass.h:35
Definition: spectrumUpdateEvents.h:29
QWidget for displaying time domain plots.
Definition: TimeDomainDisplayPlot.h:25
QWidget for displaying waterfall (spectrogram) plots.
Definition: WaterfallDisplayPlot.h:35