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 resizeSlot( QSize *e );
47 void SetLowerIntensityLevel(const double);
48 void SetUpperIntensityLevel(const double);
54 void _resetXAxisPoints();
56 double _startFrequency;
57 double _stopFrequency;
61 QwtPlotCurve* _fft_plot_curve;
62 QwtPlotCurve* _min_fft_plot_curve;
63 QwtPlotCurve* _max_fft_plot_curve;
65 QwtPlotMarker* _lower_intensity_marker;
66 QwtPlotMarker* _upper_intensity_marker;
68 QwtPlotPanner* _panner;
69 QwtPlotZoomer* _zoomer;
71 QwtPlotMarker *_markerPeakAmplitude;
72 QwtPlotMarker *_markerNoiseFloorAmplitude;
77 double* _minFFTPoints;
78 double* _maxFFTPoints;
81 double _peakFrequency;
82 double _peakAmplitude;
84 double _noiseFloorAmplitude;
88 bool _useCenterFrequencyFlag;
90 double _displayIntervalTime;
93 #endif /* FREQUENCY_DISPLAY_PLOT_HPP */