1 #ifndef FREQUENCY_DISPLAY_PLOT_HPP
2 #define FREQUENCY_DISPLAY_PLOT_HPP
5 #include <qwt_painter.h>
6 #include <qwt_plot_canvas.h>
7 #include <qwt_plot_curve.h>
8 #include <qwt_scale_engine.h>
9 #include <qwt_scale_widget.h>
10 #include <qwt_plot_zoomer.h>
11 #include <qwt_plot_panner.h>
12 #include <qwt_plot_marker.h>
13 #include <highResTimeFunctions.h>
14 #include <qwt_symbol.h>
16 class FrequencyDisplayPlot:public QwtPlot{
20 FrequencyDisplayPlot(QWidget*);
21 virtual ~FrequencyDisplayPlot();
23 void SetFrequencyRange(const double, const double,
24 const double, const bool,
25 const double units=1000.0,
26 const std::string &strunits = "kHz");
27 double GetStartFrequency()const;
28 double GetStopFrequency()const;
30 void PlotNewData(const double* dataPoints, const int64_t numDataPoints,
31 const double noiseFloorAmplitude, const double peakFrequency,
32 const double peakAmplitude);
37 void SetMaxFFTVisible(const bool);
38 void SetMinFFTVisible(const bool);
40 virtual void replot();
42 void set_yaxis(double min, double max);
45 void SetLowerIntensityLevel(const double);
46 void SetUpperIntensityLevel(const double);
51 void _resetXAxisPoints();
53 double _startFrequency;
54 double _stopFrequency;
56 QwtPlotCurve* _fft_plot_curve;
57 QwtPlotCurve* _min_fft_plot_curve;
58 QwtPlotCurve* _max_fft_plot_curve;
60 QwtPlotMarker* _lower_intensity_marker;
61 QwtPlotMarker* _upper_intensity_marker;
63 QwtPlotPanner* _panner;
64 QwtPlotZoomer* _zoomer;
66 QwtPlotMarker *_markerPeakAmplitude;
67 QwtPlotMarker *_markerNoiseFloorAmplitude;
72 double* _minFFTPoints;
73 double* _maxFFTPoints;
76 double _peakFrequency;
77 double _peakAmplitude;
79 double _noiseFloorAmplitude;
83 bool _useCenterFrequencyFlag;
85 double _displayIntervalTime;
88 #endif /* FREQUENCY_DISPLAY_PLOT_HPP */