From f41530726eb2ef70a4683faa9f5e4760b67d7d5f Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 21 Apr 2011 19:11:03 -0400 Subject: gr-qtgui: adding time-domain only plotter. --- gr-qtgui/lib/timedisplayform.h | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 gr-qtgui/lib/timedisplayform.h (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h new file mode 100644 index 000000000..2ba3a28c8 --- /dev/null +++ b/gr-qtgui/lib/timedisplayform.h @@ -0,0 +1,79 @@ +/* -*- c++ -*- */ +/* + * Copyright 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 TIME_DISPLAY_FORM_H +#define TIME_DISPLAY_FORM_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class TimeDisplayForm : public QWidget +{ + Q_OBJECT + + public: + TimeDisplayForm(QWidget* parent = 0); + ~TimeDisplayForm(); + + void Reset(); + +public slots: + void resizeEvent( QResizeEvent * e ); + void customEvent( QEvent * e ); + void SetFrequencyRange( const double newCenterFrequency, + const double newStartFrequency, + const double newStopFrequency ); + void closeEvent( QCloseEvent * e ); + + void SetTimeDomainAxis(double min, double max); + + void SetUpdateTime(double t); + +private slots: + void newData( const TimeUpdateEvent* ); + void UpdateGuiTimer(); + + void onTimePlotPointSelected(const QPointF p); + +signals: + void plotPointSelected(const QPointF p, int type); + +private: + uint64_t _numRealDataPoints; + QIntValidator* _intValidator; + TimeDomainDisplayPlot* _timeDomainDisplayPlot; + bool _systemSpecifiedFlag; + double _startFrequency; + double _stopFrequency; + + QTimer *displayTimer; + double d_update_time; +}; + +#endif /* TIME_DISPLAY_FORM_H */ -- cgit From ca8e6096da49c825c14ac05962bb7747f84c2ba6 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 23 Apr 2011 11:01:10 -0400 Subject: gr-qtgui: time domain sink now shows and receives updates. --- gr-qtgui/lib/timedisplayform.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 2ba3a28c8..947e28153 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -67,6 +68,8 @@ signals: private: uint64_t _numRealDataPoints; QIntValidator* _intValidator; + + QGridLayout *_layout; TimeDomainDisplayPlot* _timeDomainDisplayPlot; bool _systemSpecifiedFlag; double _startFrequency; -- cgit From 01f44f64c916b4aa38bc81662d2c8b82c4cc0b57 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 23 Apr 2011 14:30:32 -0400 Subject: gr-qtgui: moving towards allowing time plot to have multiple connections. --- gr-qtgui/lib/timedisplayform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 947e28153..888d28e21 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -39,7 +39,7 @@ class TimeDisplayForm : public QWidget Q_OBJECT public: - TimeDisplayForm(QWidget* parent = 0); + TimeDisplayForm(int nplots=1, QWidget* parent = 0); ~TimeDisplayForm(); void Reset(); -- cgit From e251c885f19281ef918987e09c2aac1af6a952c2 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 24 Apr 2011 00:31:39 -0400 Subject: gr-qtgui: provide function and slot for setting the labels of a time curve. --- gr-qtgui/lib/timedisplayform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 888d28e21..db2d58db7 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -56,6 +56,8 @@ public slots: void SetUpdateTime(double t); + void SetTitle(int which, QString title); + private slots: void newData( const TimeUpdateEvent* ); void UpdateGuiTimer(); -- cgit From 11de76b9214a59930ac8d8c031880b5bd293973d Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 24 Apr 2011 01:47:05 -0400 Subject: gr-qtgui: adding function and slot to set a time display curve's color. --- gr-qtgui/lib/timedisplayform.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index db2d58db7..1e2ad601b 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -57,6 +57,7 @@ public slots: void SetUpdateTime(double t); void SetTitle(int which, QString title); + void SetColor(int which, QString color); private slots: void newData( const TimeUpdateEvent* ); -- cgit From 83c1463ef9aa550d8c44cd259cf14dea433e1973 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sun, 24 Apr 2011 01:59:10 -0400 Subject: gr-qtgui: making (somewhat more) consistent case for function names. --- gr-qtgui/lib/timedisplayform.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 1e2ad601b..1216a1ef5 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -47,21 +47,21 @@ class TimeDisplayForm : public QWidget public slots: void resizeEvent( QResizeEvent * e ); void customEvent( QEvent * e ); - void SetFrequencyRange( const double newCenterFrequency, + void setFrequencyRange( const double newCenterFrequency, const double newStartFrequency, const double newStopFrequency ); void closeEvent( QCloseEvent * e ); - void SetTimeDomainAxis(double min, double max); + void setTimeDomainAxis(double min, double max); - void SetUpdateTime(double t); + void setUpdateTime(double t); - void SetTitle(int which, QString title); - void SetColor(int which, QString color); + void setTitle(int which, QString title); + void setColor(int which, QString color); private slots: void newData( const TimeUpdateEvent* ); - void UpdateGuiTimer(); + void updateGuiTimer(); void onTimePlotPointSelected(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/timedisplayform.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gr-qtgui/lib/timedisplayform.h') diff --git a/gr-qtgui/lib/timedisplayform.h b/gr-qtgui/lib/timedisplayform.h index 1216a1ef5..dd3f62a83 100644 --- a/gr-qtgui/lib/timedisplayform.h +++ b/gr-qtgui/lib/timedisplayform.h @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 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, @@ -41,9 +41,9 @@ class TimeDisplayForm : public QWidget public: TimeDisplayForm(int nplots=1, QWidget* parent = 0); ~TimeDisplayForm(); - + void Reset(); - + public slots: void resizeEvent( QResizeEvent * e ); void customEvent( QEvent * e ); @@ -77,7 +77,7 @@ private: bool _systemSpecifiedFlag; double _startFrequency; double _stopFrequency; - + QTimer *displayTimer; double d_update_time; }; -- cgit