99ae566e0a8eca90a3ff210064b6a22dc86343bb
[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 {
19   Q_OBJECT
20
21 public:
22   ConstellationDisplayPlot(QWidget*);
23   virtual ~ConstellationDisplayPlot();
24
25   void PlotNewData(const double* realDataPoints, 
26                    const double* imagDataPoints, 
27                    const int64_t numDataPoints);
28     
29   virtual void replot();
30
31   void set_xaxis(double min, double max);
32   void set_yaxis(double min, double max);
33   void set_axis(double xmin, double xmax,
34                 double ymin, double ymax);
35   void set_pen_size(int size);
36
37 public slots:
38   void resizeSlot( QSize *s );
39
40 protected slots:
41   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
42
43 protected:
44
45 private:
46   QwtPlotCurve* _plot_curve;
47
48   QwtPlotPanner* _panner;
49   QwtPlotZoomer* _zoomer;
50   
51   double* _realDataPoints;
52   double* _imagDataPoints;
53
54   timespec _lastReplot;
55
56   int64_t _numPoints;
57   int64_t _penSize;
58
59   double _displayIntervalTime;
60 };
61
62 #endif /* CONSTELLATION_DISPLAY_PLOT_HPP */