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();
43 void SetLowerIntensityLevel(const double);
44 void SetUpperIntensityLevel(const double);
49 void _resetXAxisPoints();
51 double _startFrequency;
52 double _stopFrequency;
54 QwtPlotCurve* _fft_plot_curve;
55 QwtPlotCurve* _min_fft_plot_curve;
56 QwtPlotCurve* _max_fft_plot_curve;
58 QwtPlotMarker* _lower_intensity_marker;
59 QwtPlotMarker* _upper_intensity_marker;
61 QwtPlotPanner* _panner;
62 QwtPlotZoomer* _zoomer;
64 QwtPlotMarker *_markerPeakAmplitude;
65 QwtPlotMarker *_markerNoiseFloorAmplitude;
70 double* _minFFTPoints;
71 double* _maxFFTPoints;
74 double _peakFrequency;
75 double _peakAmplitude;
77 double _noiseFloorAmplitude;
81 bool _useCenterFrequencyFlag;
83 double _displayIntervalTime;
86 #endif /* FREQUENCY_DISPLAY_PLOT_HPP */