From befadabc2f18b483c71250adfd7dbf42f66b16f0 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 27 Mar 2011 12:55:16 -0400 Subject: gr-qtgui: restructuring qtgui directory to new layout. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 gr-qtgui/lib/ConstellationDisplayPlot.h (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h new file mode 100644 index 000000000..a441a8bfe --- /dev/null +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -0,0 +1,61 @@ +#ifndef CONSTELLATION_DISPLAY_PLOT_HPP +#define CONSTELLATION_DISPLAY_PLOT_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class ConstellationDisplayPlot : public QwtPlot +{ + Q_OBJECT + +public: + ConstellationDisplayPlot(QWidget*); + virtual ~ConstellationDisplayPlot(); + + void PlotNewData(const double* realDataPoints, + const double* imagDataPoints, + const int64_t numDataPoints, + const double timeInterval); + + virtual void replot(); + + void set_xaxis(double min, double max); + void set_yaxis(double min, double max); + void set_axis(double xmin, double xmax, + double ymin, double ymax); + void set_pen_size(int size); + +public slots: + void resizeSlot( QSize *s ); + +protected slots: + void LegendEntryChecked(QwtPlotItem *plotItem, bool on); + +protected: + +private: + QwtPlotCurve* _plot_curve; + + QwtPlotPanner* _panner; + QwtPlotZoomer* _zoomer; + + double* _realDataPoints; + double* _imagDataPoints; + + timespec _lastReplot; + + int64_t _numPoints; + int64_t _penSize; +}; + +#endif /* CONSTELLATION_DISPLAY_PLOT_HPP */ -- cgit From 41ad09b4f22228dd555ea73f2078cb9ff056b979 Mon Sep 17 00:00:00 2001 From: Mike Cornelius Date: Mon, 11 Apr 2011 00:48:29 -0400 Subject: gr-qtgui: adding double-click point selector to main gui widgets. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index a441a8bfe..bf4531e0a 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -13,6 +13,7 @@ #include #include #include +#include class ConstellationDisplayPlot : public QwtPlot { @@ -38,6 +39,11 @@ public: public slots: void resizeSlot( QSize *s ); + void OnPickerPointSelected(const QwtDoublePoint & p); + +signals: + void plotPointSelected(const QPointF p); + protected slots: void LegendEntryChecked(QwtPlotItem *plotItem, bool on); @@ -49,6 +55,8 @@ private: QwtPlotPanner* _panner; QwtPlotZoomer* _zoomer; + QwtDblClickPlotPicker *_picker; + double* _realDataPoints; double* _imagDataPoints; -- cgit