1
#ifndef FREQUENCY_DISPLAY_PLOT_HPP
2
#define FREQUENCY_DISPLAY_PLOT_HPP
6
#include <qwt_painter.h>
7
#include <qwt_plot_canvas.h>
8
#include <qwt_plot_curve.h>
9
#include <qwt_scale_engine.h>
10
#include <qwt_scale_widget.h>
11
#include <qwt_plot_zoomer.h>
12
#include <qwt_plot_panner.h>
13
#include <qwt_plot_marker.h>
14
#include <highResTimeFunctions.h>
15
#include <qwt_symbol.h>
17
class FrequencyDisplayPlot:public QwtPlot{
21
FrequencyDisplayPlot(QWidget*);
22
virtual ~FrequencyDisplayPlot();
24
void SetFrequencyRange(const double, const double,
25
const double, const bool,
26
const double units=1000.0,
27
const std::string &strunits = "kHz");
28
double GetStartFrequency()const;
29
double GetStopFrequency()const;
31
void PlotNewData(const double* dataPoints, const int64_t numDataPoints,
32
const double noiseFloorAmplitude, const double peakFrequency,
33
const double peakAmplitude);
38
void SetMaxFFTVisible(const bool);
39
void SetMinFFTVisible(const bool);
41
virtual void replot();
43
void set_yaxis(double min, double max);
46
void SetLowerIntensityLevel(const double);
47
void SetUpperIntensityLevel(const double);
52
void _resetXAxisPoints();
54
double _startFrequency;
55
double _stopFrequency;
59
QwtPlotCurve* _fft_plot_curve;
60
QwtPlotCurve* _min_fft_plot_curve;
61
QwtPlotCurve* _max_fft_plot_curve;
63
QwtPlotMarker* _lower_intensity_marker;
64
QwtPlotMarker* _upper_intensity_marker;
66
QwtPlotPanner* _panner;
67
QwtPlotZoomer* _zoomer;
69
QwtPlotMarker *_markerPeakAmplitude;
70
QwtPlotMarker *_markerNoiseFloorAmplitude;
75
double* _minFFTPoints;
76
double* _maxFFTPoints;
79
double _peakFrequency;
80
double _peakAmplitude;
82
double _noiseFloorAmplitude;
86
bool _useCenterFrequencyFlag;
88
double _displayIntervalTime;
91
#endif /* FREQUENCY_DISPLAY_PLOT_HPP */