diff options
author | Tom Rondeau | 2011-04-24 10:23:05 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-04-24 10:23:05 -0400 |
commit | 88f157a1a71e0a3603a912e437ad5d2c07ffc8b9 (patch) | |
tree | 7f5305a8f29c8ea0776daba661d60d082410e583 /gr-qtgui/lib/spectrumUpdateEvents.cc | |
parent | c7b491e220394efde4828b443237dcea10cbae45 (diff) | |
parent | 371ca93c2a1506d22db69fb96b2cf7d4ed132535 (diff) | |
download | gnuradio-88f157a1a71e0a3603a912e437ad5d2c07ffc8b9.tar.gz gnuradio-88f157a1a71e0a3603a912e437ad5d2c07ffc8b9.tar.bz2 gnuradio-88f157a1a71e0a3603a912e437ad5d2c07ffc8b9.zip |
Merge branch 'qtgui_time'
Conflicts:
gr-qtgui/apps/pyqt_example_f.py
Diffstat (limited to 'gr-qtgui/lib/spectrumUpdateEvents.cc')
-rw-r--r-- | gr-qtgui/lib/spectrumUpdateEvents.cc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gr-qtgui/lib/spectrumUpdateEvents.cc b/gr-qtgui/lib/spectrumUpdateEvents.cc index 53a205fb7..ae4caf31a 100644 --- a/gr-qtgui/lib/spectrumUpdateEvents.cc +++ b/gr-qtgui/lib/spectrumUpdateEvents.cc @@ -177,4 +177,47 @@ SpectrumFrequencyRangeEvent::GetStopFrequency() const return _stopFrequency; } + +/***************************************************************************/ +#include <iostream> +TimeUpdateEvent::TimeUpdateEvent(const std::vector<double*> timeDomainPoints, + const uint64_t numTimeDomainDataPoints) + : QEvent(QEvent::Type(10005)) +{ + if(numTimeDomainDataPoints < 1) { + _numTimeDomainDataPoints = 1; + } + else { + _numTimeDomainDataPoints = numTimeDomainDataPoints; + } + + _nplots = timeDomainPoints.size(); + for(size_t i = 0; i < _nplots; i++) { + _dataTimeDomainPoints.push_back(new double[_numTimeDomainDataPoints]); + if(numTimeDomainDataPoints > 0) { + memcpy(_dataTimeDomainPoints[i], timeDomainPoints[i], + _numTimeDomainDataPoints*sizeof(double)); + } + } +} + +TimeUpdateEvent::~TimeUpdateEvent() +{ + for(size_t i = 0; i < _nplots; i++) { + delete[] _dataTimeDomainPoints[i]; + } +} + +const std::vector<double*> +TimeUpdateEvent::getTimeDomainPoints() const +{ + return _dataTimeDomainPoints; +} + +uint64_t +TimeUpdateEvent::getNumTimeDomainDataPoints() const +{ + return _numTimeDomainDataPoints; +} + #endif /* SPECTRUM_UPDATE_EVENTS_C */ |