Merging qtgui branch-r9068:9837: this ads a qtgui_sink_c and qtgui_sink_f that displa...
[debian/gnuradio] / gr-qtgui / src / lib / TimeDomainDisplayPlot.h
1 #ifndef TIME_DOMAIN_DISPLAY_PLOT_HPP
2 #define TIME_DOMAIN_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 TimeDomainDisplayPlot:public QwtPlot{
17   Q_OBJECT
18
19 public:
20   TimeDomainDisplayPlot(QWidget*);
21   virtual ~TimeDomainDisplayPlot();
22
23   void PlotNewData(const double* realDataPoints, const double* imagDataPoints, const int64_t numDataPoints);
24     
25   void SetImaginaryDataVisible(const bool);
26                                    
27   virtual void replot();
28
29 protected slots:
30   void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
31
32 protected:
33
34 private:
35   void _resetXAxisPoints();
36
37   QwtPlotCurve* _real_plot_curve;
38   QwtPlotCurve* _imag_plot_curve;
39
40   QwtPlotPanner* _panner;
41   QwtPlotZoomer* _zoomer;
42   
43   double* _realDataPoints;
44   double* _imagDataPoints;
45   double* _xAxisPoints;
46
47   timespec _lastReplot;
48
49   int64_t _numPoints;
50
51   double _displayIntervalTime;
52 };
53
54 #endif /* TIME_DOMAIN_DISPLAY_PLOT_HPP */