71fb76aaf855350ecfa2c462a3e9ec2c3335684d
[debian/gnuradio] / gr-qtgui / src / lib / WaterfallDisplayPlot.h
1 #ifndef WATERFALL_DISPLAY_PLOT_HPP
2 #define WATERFALL_DISPLAY_PLOT_HPP
3
4 #include <qwt_plot.h>
5 #include <qwt_plot_zoomer.h>
6 #include <qwt_plot_panner.h>
7
8 #include <plot_waterfall.h>
9
10 #include <highResTimeFunctions.h>
11
12 class WaterfallDisplayPlot:public QwtPlot{
13   Q_OBJECT
14
15 public:
16   WaterfallDisplayPlot(QWidget*);
17   virtual ~WaterfallDisplayPlot();
18
19   void Reset();
20
21   void SetFrequencyRange(const double, const double, const double, const bool);
22   double GetStartFrequency()const;
23   double GetStopFrequency()const;
24
25   void PlotNewData(const double* dataPoints, const int64_t numDataPoints, const double timePerFFT, const timespec timestamp, const int droppedFrames);
26
27   void SetIntensityRange(const double minIntensity, const double maxIntensity);
28
29   virtual void replot(void);
30
31   int GetIntensityColorMapType()const;
32   void SetIntensityColorMapType( const int, const QColor, const QColor );
33   const QColor GetUserDefinedLowIntensityColor()const;
34   const QColor GetUserDefinedHighIntensityColor()const;
35
36   static const int INTENSITY_COLOR_MAP_TYPE_MULTI_COLOR = 0;
37   static const int INTENSITY_COLOR_MAP_TYPE_WHITE_HOT = 1;
38   static const int INTENSITY_COLOR_MAP_TYPE_BLACK_HOT = 2;
39   static const int INTENSITY_COLOR_MAP_TYPE_INCANDESCENT = 3;
40   static const int INTENSITY_COLOR_MAP_TYPE_USER_DEFINED = 4;
41
42 signals:
43   void UpdatedLowerIntensityLevel(const double);
44   void UpdatedUpperIntensityLevel(const double);
45
46 protected:
47
48 private:
49   void _UpdateIntensityRangeDisplay();
50
51   double _startFrequency;
52   double _stopFrequency;
53
54   PlotWaterfall *d_spectrogram;
55
56   QwtPlotPanner* _panner;
57   QwtPlotZoomer* _zoomer;
58
59   WaterfallData* _waterfallData;
60
61   timespec _lastReplot;
62
63   int64_t _numPoints;
64
65   double _displayIntervalTime;
66
67   int _intensityColorMapType;
68   QColor _userDefinedLowIntensityColor;
69   QColor _userDefinedHighIntensityColor;
70 };
71
72 #endif /* WATERFALL_DISPLAY_PLOT_HPP */