root / gr-qtgui / lib / ConstellationDisplayPlot.h @ 697562c3
History | View | Annotate | Download (2.3 kB)
| 1 | /* -*- c++ -*- */
|
|---|---|
| 2 | /*
|
| 3 | * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. |
| 4 | * |
| 5 | * This file is part of GNU Radio |
| 6 | * |
| 7 | * GNU Radio is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3, or (at your option) |
| 10 | * any later version. |
| 11 | * |
| 12 | * GNU Radio is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with GNU Radio; see the file COPYING. If not, write to |
| 19 | * the Free Software Foundation, Inc., 51 Franklin Street, |
| 20 | * Boston, MA 02110-1301, USA. |
| 21 | */ |
| 22 | |
| 23 | #ifndef CONSTELLATION_DISPLAY_PLOT_HPP
|
| 24 | #define CONSTELLATION_DISPLAY_PLOT_HPP
|
| 25 | |
| 26 | #include <stdint.h> |
| 27 | #include <cstdio> |
| 28 | #include <qwt_plot.h> |
| 29 | #include <qwt_painter.h> |
| 30 | #include <qwt_plot_canvas.h> |
| 31 | #include <qwt_plot_curve.h> |
| 32 | #include <qwt_scale_engine.h> |
| 33 | #include <qwt_scale_widget.h> |
| 34 | #include <qwt_plot_zoomer.h> |
| 35 | #include <qwt_plot_panner.h> |
| 36 | #include <qwt_plot_marker.h> |
| 37 | #include <highResTimeFunctions.h> |
| 38 | #include <qwt_symbol.h> |
| 39 | #include <qtgui_util.h> |
| 40 | |
| 41 | class ConstellationDisplayPlot : public QwtPlot |
| 42 | {
|
| 43 | Q_OBJECT |
| 44 | |
| 45 | public: |
| 46 | ConstellationDisplayPlot(QWidget*); |
| 47 | virtual ~ConstellationDisplayPlot(); |
| 48 | |
| 49 | void PlotNewData(const double* realDataPoints, |
| 50 | const double* imagDataPoints, |
| 51 | const int64_t numDataPoints,
|
| 52 | const double timeInterval); |
| 53 | |
| 54 | virtual void replot();
|
| 55 | |
| 56 | void set_xaxis(double min, double max); |
| 57 | void set_yaxis(double min, double max); |
| 58 | void set_axis(double xmin, double xmax, |
| 59 | double ymin, double ymax); |
| 60 | void set_pen_size(int size); |
| 61 | |
| 62 | public slots: |
| 63 | void resizeSlot( QSize *s );
|
| 64 | |
| 65 | void OnPickerPointSelected(const QwtDoublePoint & p); |
| 66 | |
| 67 | signals:
|
| 68 | void plotPointSelected(const QPointF p); |
| 69 | |
| 70 | protected slots: |
| 71 | void LegendEntryChecked(QwtPlotItem *plotItem, bool on); |
| 72 | |
| 73 | protected:
|
| 74 | |
| 75 | private:
|
| 76 | QwtPlotCurve* _plot_curve; |
| 77 | |
| 78 | QwtPlotPanner* _panner; |
| 79 | QwtPlotZoomer* _zoomer; |
| 80 | |
| 81 | QwtDblClickPlotPicker *_picker; |
| 82 | |
| 83 | double* _realDataPoints;
|
| 84 | double* _imagDataPoints;
|
| 85 | |
| 86 | highres_timespec _lastReplot; |
| 87 | |
| 88 | int64_t _numPoints; |
| 89 | int64_t _penSize; |
| 90 | }; |
| 91 | |
| 92 | #endif /* CONSTELLATION_DISPLAY_PLOT_HPP */ |