From c0692647cce3c136dee4d92f8e99a77539dbd0bd Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 21 Apr 2011 19:10:27 -0400 Subject: gr-qtgui: adding time-domain plot specific event updater. --- gr-qtgui/lib/spectrumUpdateEvents.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gr-qtgui/lib/spectrumUpdateEvents.h') diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h index ccc072c3e..fcebd5d5a 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.h +++ b/gr-qtgui/lib/spectrumUpdateEvents.h @@ -6,6 +6,7 @@ #include #include #include +#include class SpectrumUpdateEvent:public QEvent{ @@ -89,4 +90,29 @@ private: }; +class TimeUpdateEvent: public QEvent +{ +public: + TimeUpdateEvent(const gr_complex *timeDomainPoints, + const uint64_t numTimeDomainDataPoints, + const timespec dataTimestamp, + const bool repeatDataFlag); + + ~TimeUpdateEvent(); + + const gr_complex *getTimeDomainPoints() const; + uint64_t getNumTimeDomainDataPoints() const; + timespec getDataTimestamp() const; + bool getRepeatDataFlag() const; + +protected: + +private: + gr_complex *_dataTimeDomainPoints; + uint64_t _numTimeDomainDataPoints; + timespec _dataTimestamp; + bool _repeatDataFlag; +}; + + #endif /* SPECTRUM_UPDATE_EVENTS_H */ -- cgit From bbb5e850224aca9dae15d24bd898cc56232327c9 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 23 Apr 2011 12:00:54 -0400 Subject: gr-qtgui: setting up ability to have multiple connections to the time sink. --- gr-qtgui/lib/spectrumUpdateEvents.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-qtgui/lib/spectrumUpdateEvents.h') diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h index fcebd5d5a..1a92eefb5 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.h +++ b/gr-qtgui/lib/spectrumUpdateEvents.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -93,7 +94,7 @@ private: class TimeUpdateEvent: public QEvent { public: - TimeUpdateEvent(const gr_complex *timeDomainPoints, + TimeUpdateEvent(const std::vector &timeDomainPoints, const uint64_t numTimeDomainDataPoints, const timespec dataTimestamp, const bool repeatDataFlag); -- 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/spectrumUpdateEvents.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gr-qtgui/lib/spectrumUpdateEvents.h') diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h index 1a92eefb5..09771571c 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.h +++ b/gr-qtgui/lib/spectrumUpdateEvents.h @@ -5,9 +5,7 @@ #include #include #include -#include #include -#include class SpectrumUpdateEvent:public QEvent{ @@ -94,14 +92,16 @@ private: class TimeUpdateEvent: public QEvent { public: - TimeUpdateEvent(const std::vector &timeDomainPoints, + TimeUpdateEvent(const int which, + const double *timeDomainPoints, const uint64_t numTimeDomainDataPoints, const timespec dataTimestamp, const bool repeatDataFlag); ~TimeUpdateEvent(); - const gr_complex *getTimeDomainPoints() const; + int which() const; + const double *getTimeDomainPoints() const; uint64_t getNumTimeDomainDataPoints() const; timespec getDataTimestamp() const; bool getRepeatDataFlag() const; @@ -109,7 +109,8 @@ public: protected: private: - gr_complex *_dataTimeDomainPoints; + int _which; + double *_dataTimeDomainPoints; uint64_t _numTimeDomainDataPoints; timespec _dataTimestamp; bool _repeatDataFlag; -- cgit From 0877adb2e194c9dfad2484519b2979e2bed93958 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Sat, 23 Apr 2011 15:11:17 -0400 Subject: gr-qtgui: Passing vectors of data to update plot for stability; also moving responsibility of keeping track of plot updates out to qtgui_sink instead of inside plot qidget. --- gr-qtgui/lib/spectrumUpdateEvents.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'gr-qtgui/lib/spectrumUpdateEvents.h') diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h index 09771571c..a5e359a4c 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.h +++ b/gr-qtgui/lib/spectrumUpdateEvents.h @@ -5,6 +5,7 @@ #include #include #include +#include #include class SpectrumUpdateEvent:public QEvent{ @@ -92,16 +93,13 @@ private: class TimeUpdateEvent: public QEvent { public: - TimeUpdateEvent(const int which, - const double *timeDomainPoints, - const uint64_t numTimeDomainDataPoints, - const timespec dataTimestamp, - const bool repeatDataFlag); + TimeUpdateEvent(const std::vector timeDomainPoints, + const uint64_t numTimeDomainDataPoints); ~TimeUpdateEvent(); int which() const; - const double *getTimeDomainPoints() const; + const std::vector getTimeDomainPoints() const; uint64_t getNumTimeDomainDataPoints() const; timespec getDataTimestamp() const; bool getRepeatDataFlag() const; @@ -109,11 +107,9 @@ public: protected: private: - int _which; - double *_dataTimeDomainPoints; + size_t _nplots; + std::vector _dataTimeDomainPoints; uint64_t _numTimeDomainDataPoints; - timespec _dataTimestamp; - bool _repeatDataFlag; }; -- cgit