summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/spectrumUpdateEvents.h
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/lib/spectrumUpdateEvents.h')
-rw-r--r--gr-qtgui/lib/spectrumUpdateEvents.h155
1 files changed, 152 insertions, 3 deletions
diff --git a/gr-qtgui/lib/spectrumUpdateEvents.h b/gr-qtgui/lib/spectrumUpdateEvents.h
index faef0f0875..97d9c90146 100644
--- a/gr-qtgui/lib/spectrumUpdateEvents.h
+++ b/gr-qtgui/lib/spectrumUpdateEvents.h
@@ -1,3 +1,25 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008-2013 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 SPECTRUM_UPDATE_EVENTS_H
#define SPECTRUM_UPDATE_EVENTS_H
@@ -8,10 +30,15 @@
#include <vector>
#include <gruel/high_res_timer.h>
+static const int SpectrumUpdateEventType = 10005;
+static const int SpectrumWindowCaptionEventType = 10008;
+static const int SpectrumWindowResetEventType = 10009;
+static const int SpectrumFrequencyRangeEventType = 10010;
+
class SpectrumUpdateEvent:public QEvent{
public:
- SpectrumUpdateEvent(const std::complex<float>* fftPoints,
+ SpectrumUpdateEvent(const float* fftPoints,
const uint64_t numFFTDataPoints,
const double* realTimeDomainPoints,
const double* imagTimeDomainPoints,
@@ -24,7 +51,7 @@ public:
~SpectrumUpdateEvent();
- const std::complex<float>* getFFTPoints() const;
+ const float* getFFTPoints() const;
const double* getRealTimeDomainPoints() const;
const double* getImagTimeDomainPoints() const;
uint64_t getNumFFTDataPoints() const;
@@ -38,7 +65,7 @@ public:
protected:
private:
- std::complex<float>* _fftPoints;
+ float* _fftPoints;
double* _realDataTimeDomainPoints;
double* _imagDataTimeDomainPoints;
uint64_t _numFFTDataPoints;
@@ -103,6 +130,9 @@ public:
uint64_t getNumTimeDomainDataPoints() const;
bool getRepeatDataFlag() const;
+ static QEvent::Type Type()
+ { return QEvent::Type(SpectrumUpdateEventType); }
+
protected:
private:
@@ -112,4 +142,123 @@ private:
};
+/********************************************************************/
+
+
+class FreqUpdateEvent: public QEvent
+{
+public:
+ FreqUpdateEvent(const std::vector<double*> dataPoints,
+ const uint64_t numDataPoints);
+
+ ~FreqUpdateEvent();
+
+ int which() const;
+ const std::vector<double*> getPoints() const;
+ uint64_t getNumDataPoints() const;
+ bool getRepeatDataFlag() const;
+
+ static QEvent::Type Type()
+ { return QEvent::Type(SpectrumUpdateEventType); }
+
+protected:
+
+private:
+ size_t _nplots;
+ std::vector<double*> _dataPoints;
+ uint64_t _numDataPoints;
+};
+
+
+/********************************************************************/
+
+
+class ConstUpdateEvent: public QEvent
+{
+public:
+ ConstUpdateEvent(const std::vector<double*> realDataPoints,
+ const std::vector<double*> imagDataPoints,
+ const uint64_t numDataPoints);
+
+ ~ConstUpdateEvent();
+
+ int which() const;
+ const std::vector<double*> getRealPoints() const;
+ const std::vector<double*> getImagPoints() const;
+ uint64_t getNumDataPoints() const;
+ bool getRepeatDataFlag() const;
+
+ static QEvent::Type Type()
+ { return QEvent::Type(SpectrumUpdateEventType); }
+
+protected:
+
+private:
+ size_t _nplots;
+ std::vector<double*> _realDataPoints;
+ std::vector<double*> _imagDataPoints;
+ uint64_t _numDataPoints;
+};
+
+
+/********************************************************************/
+
+
+class WaterfallUpdateEvent: public QEvent
+{
+public:
+ WaterfallUpdateEvent(const std::vector<double*> dataPoints,
+ const uint64_t numDataPoints,
+ const gruel::high_res_timer_type dataTimestamp);
+
+ ~WaterfallUpdateEvent();
+
+ int which() const;
+ const std::vector<double*> getPoints() const;
+ uint64_t getNumDataPoints() const;
+ bool getRepeatDataFlag() const;
+
+ gruel::high_res_timer_type getDataTimestamp() const;
+
+ static QEvent::Type Type()
+ { return QEvent::Type(SpectrumUpdateEventType); }
+
+protected:
+
+private:
+ size_t _nplots;
+ std::vector<double*> _dataPoints;
+ uint64_t _numDataPoints;
+
+ gruel::high_res_timer_type _dataTimestamp;
+};
+
+
+/********************************************************************/
+
+
+class TimeRasterUpdateEvent: public QEvent
+{
+public:
+ TimeRasterUpdateEvent(const std::vector<double*> dataPoints,
+ const uint64_t numDataPoints);
+ ~TimeRasterUpdateEvent();
+
+ int which() const;
+ const std::vector<double*> getPoints() const;
+ uint64_t getNumDataPoints() const;
+ bool getRepeatDataFlag() const;
+
+ static QEvent::Type Type()
+ { return QEvent::Type(SpectrumUpdateEventType); }
+
+protected:
+
+private:
+ size_t _nplots;
+ std::vector<double*> _dataPoints;
+ uint64_t _numDataPoints;
+};
+
+
#endif /* SPECTRUM_UPDATE_EVENTS_H */