Adding a constellation plot and an example for viewing constellations of digital...
[debian/gnuradio] / gr-qtgui / src / lib / ConstellationDisplayPlot.h
1 #ifndef CONSTELLATION_DISPLAY_PLOT_HPP
2 #define CONSTELLATION_DISPLAY_PLOT_HPP
3
4 #include <qwt_plot.h>
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>
15
16 class ConstellationDisplayPlot:public QwtPlot{
17   Q_OBJECT
18
19 public:
20   ConstellationDisplayPlot(QWidget*);
21   virtual ~ConstellationDisplayPlot();
22
23   void PlotNewData(const double* realDataPoints, const double* imagDataPoints, 
24                    const int64_t numDataPoints);
25     
26   virtual void replot();
27
28 protected slots:
29   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
30
31 protected:
32
33 private:
34   QwtPlotCurve* _plot_curve;
35
36   QwtPlotPanner* _panner;
37   QwtPlotZoomer* _zoomer;
38   
39   double* _realDataPoints;
40   double* _imagDataPoints;
41
42   timespec _lastReplot;
43
44   int64_t _numPoints;
45
46   double _displayIntervalTime;
47 };
48
49 #endif /* CONSTELLATION_DISPLAY_PLOT_HPP */