Imported Upstream version 3.2.2
[debian/gnuradio] / gr-qtgui / src / lib / ConstellationDisplayPlot.h
1 #ifndef CONSTELLATION_DISPLAY_PLOT_HPP
2 #define CONSTELLATION_DISPLAY_PLOT_HPP
3
4 #include <cstdio>
5 #include <qwt_plot.h>
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>
16
17 class ConstellationDisplayPlot:public QwtPlot{
18   Q_OBJECT
19
20 public:
21   ConstellationDisplayPlot(QWidget*);
22   virtual ~ConstellationDisplayPlot();
23
24   void PlotNewData(const double* realDataPoints, const double* imagDataPoints, 
25                    const int64_t numDataPoints);
26     
27   virtual void replot();
28
29   void set_xaxis(double min, double max);
30   void set_yaxis(double min, double max);
31   void set_axis(double xmin, double xmax,
32                 double ymin, double ymax);
33
34 protected slots:
35   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
36
37 protected:
38
39 private:
40   QwtPlotCurve* _plot_curve;
41
42   QwtPlotPanner* _panner;
43   QwtPlotZoomer* _zoomer;
44   
45   double* _realDataPoints;
46   double* _imagDataPoints;
47
48   timespec _lastReplot;
49
50   int64_t _numPoints;
51
52   double _displayIntervalTime;
53 };
54
55 #endif /* CONSTELLATION_DISPLAY_PLOT_HPP */