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 From 7ba2647977f9b302969208fa8548d1ca8dcddd4b Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 18 Apr 2011 23:07:31 -0400 Subject: gr-qtgui: adding copyright dates to qtgui files. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index bf4531e0a..e57149403 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -1,3 +1,25 @@ +/* -*- c++ -*- */ +/* + * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + #ifndef CONSTELLATION_DISPLAY_PLOT_HPP #define CONSTELLATION_DISPLAY_PLOT_HPP -- cgit From 703338443db476e19fc42f57e5d9f76ff7ec1751 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 24 Apr 2011 19:33:23 -0700 Subject: qtgui: added GR_QTGUI_API declaration to qtgui library classes and functions --- gr-qtgui/lib/ConstellationDisplayPlot.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index e57149403..3a85f3bc3 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -23,6 +23,7 @@ #ifndef CONSTELLATION_DISPLAY_PLOT_HPP #define CONSTELLATION_DISPLAY_PLOT_HPP +#include #include #include #include -- cgit From 697562c3d4319ab6f13e4c2910a853409731595d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 7 Jun 2011 21:48:02 -0400 Subject: qtgui: replace timespec with typedef so its easier to replace --- gr-qtgui/lib/ConstellationDisplayPlot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index 3a85f3bc3..38e401c68 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -83,7 +83,7 @@ private: double* _realDataPoints; double* _imagDataPoints; - timespec _lastReplot; + highres_timespec _lastReplot; int64_t _numPoints; int64_t _penSize; -- cgit From bbf11bb338a4a88a1f270f77649212fea0b0cab0 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 7 Jun 2011 22:55:41 -0400 Subject: qtgui: removed all traces of highResTimeFunctions.h --- gr-qtgui/lib/ConstellationDisplayPlot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index 38e401c68..23004f86c 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -83,7 +83,7 @@ private: double* _realDataPoints; double* _imagDataPoints; - highres_timespec _lastReplot; + gruel::high_res_timer_type _lastReplot; int64_t _numPoints; int64_t _penSize; -- cgit From 25fd6e0324dc8296b66a3c9b8e628d6738f15fe7 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 15 Oct 2011 18:23:04 -0400 Subject: qtgui: wip: updating qtgui to work with QWT 6 (and trying to maintain backwards compatability to 5.2). This wip works for just the fft plots. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index 23004f86c..cab11c704 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -38,6 +38,11 @@ #include #include +#if QWT_VERSION >= 0x060000 +#include // doesn't seem necessary, but is... +#include +#endif + class ConstellationDisplayPlot : public QwtPlot { Q_OBJECT @@ -61,8 +66,7 @@ public: public slots: void resizeSlot( QSize *s ); - - void OnPickerPointSelected(const QwtDoublePoint & p); + void OnPickerPointSelected(const QPointF & p); signals: void plotPointSelected(const QPointF p); -- cgit From 45c2212608ca66b5fadbc860771e042198e1ebcd Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 16 Oct 2011 19:45:29 -0400 Subject: qtgui: more compatability issues. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index cab11c704..d252a8c87 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -66,7 +66,12 @@ public: public slots: void resizeSlot( QSize *s ); + +#if QWT_VERSION < 0x060000 + void OnPickerPointSelected(const QwtDoublePoint & p); +#else void OnPickerPointSelected(const QPointF & p); +#endif signals: void plotPointSelected(const QPointF p); -- cgit From 3710dd6d3fb30966dfc0f32876a52703a9a85a60 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 25 Oct 2011 11:57:02 -0400 Subject: qtgui: Fixing slot names that can't be #if'd out for compatibility between Qwt 5.2 and 6.0. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index d252a8c87..80ac3a63a 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -67,11 +67,11 @@ public: public slots: void resizeSlot( QSize *s ); -#if QWT_VERSION < 0x060000 + // Because of the preprocessing of slots in QT, these are no + // easily separated by the version check. Make one for each + // version until it's worked out. void OnPickerPointSelected(const QwtDoublePoint & p); -#else - void OnPickerPointSelected(const QPointF & p); -#endif + void OnPickerPointSelected6(const QPointF & p); signals: void plotPointSelected(const QPointF p); -- cgit From f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Fri, 13 Apr 2012 18:36:53 -0400 Subject: Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future. The sed script was provided by Moritz Fischer. --- gr-qtgui/lib/ConstellationDisplayPlot.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gr-qtgui/lib/ConstellationDisplayPlot.h') diff --git a/gr-qtgui/lib/ConstellationDisplayPlot.h b/gr-qtgui/lib/ConstellationDisplayPlot.h index 80ac3a63a..9e0f6f26a 100644 --- a/gr-qtgui/lib/ConstellationDisplayPlot.h +++ b/gr-qtgui/lib/ConstellationDisplayPlot.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -51,11 +51,11 @@ public: ConstellationDisplayPlot(QWidget*); virtual ~ConstellationDisplayPlot(); - void PlotNewData(const double* realDataPoints, - const double* imagDataPoints, + 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); @@ -86,7 +86,7 @@ private: QwtPlotPanner* _panner; QwtPlotZoomer* _zoomer; - + QwtDblClickPlotPicker *_picker; double* _realDataPoints; -- cgit