GNU Radio 3.3.0 C++ API
ConstellationDisplayPlot.h
Go to the documentation of this file.
00001 #ifndef CONSTELLATION_DISPLAY_PLOT_HPP
00002 #define CONSTELLATION_DISPLAY_PLOT_HPP
00003 
00004 #include <cstdio>
00005 #include <qwt_plot.h>
00006 #include <qwt_painter.h>
00007 #include <qwt_plot_canvas.h>
00008 #include <qwt_plot_curve.h>
00009 #include <qwt_scale_engine.h>
00010 #include <qwt_scale_widget.h>
00011 #include <qwt_plot_zoomer.h>
00012 #include <qwt_plot_panner.h>
00013 #include <qwt_plot_marker.h>
00014 #include <highResTimeFunctions.h>
00015 #include <qwt_symbol.h>
00016 
00017 class ConstellationDisplayPlot : public QwtPlot
00018 {
00019   Q_OBJECT
00020 
00021 public:
00022   ConstellationDisplayPlot(QWidget*);
00023   virtual ~ConstellationDisplayPlot();
00024 
00025   void PlotNewData(const double* realDataPoints, 
00026                    const double* imagDataPoints, 
00027                    const int64_t numDataPoints,
00028                    const double timeInterval);
00029     
00030   virtual void replot();
00031 
00032   void set_xaxis(double min, double max);
00033   void set_yaxis(double min, double max);
00034   void set_axis(double xmin, double xmax,
00035                 double ymin, double ymax);
00036   void set_pen_size(int size);
00037 
00038 public slots:
00039   void resizeSlot( QSize *s );
00040 
00041 protected slots:
00042   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
00043 
00044 protected:
00045 
00046 private:
00047   QwtPlotCurve* _plot_curve;
00048 
00049   QwtPlotPanner* _panner;
00050   QwtPlotZoomer* _zoomer;
00051   
00052   double* _realDataPoints;
00053   double* _imagDataPoints;
00054 
00055   timespec _lastReplot;
00056 
00057   int64_t _numPoints;
00058   int64_t _penSize;
00059 };
00060 
00061 #endif /* CONSTELLATION_DISPLAY_PLOT_HPP */