GNU Radio Manual and C++ API Reference  3.8.4.0
The Free & Open Software Radio Ecosystem
timeRasterGlobalData.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef TIMERASTER_GLOBAL_DATA_HPP
24 #define TIMERASTER_GLOBAL_DATA_HPP
25 
26 #include <inttypes.h>
27 #include <qwt_raster_data.h>
28 
29 #if QWT_VERSION >= 0x060200
30 #include "qwt_interval.h"
31 
32 typedef QwtInterval QwtDoubleInterval;
33 #elif QWT_VERSION >= 0x060000
34 #include <qwt_compat.h>
35 #include <qwt_point_3d.h> // doesn't seem necessary, but is...
36 #endif
37 
38 class TimeRasterData : public QwtRasterData
39 {
40 public:
41  TimeRasterData(const double rows, const double cols);
42  virtual ~TimeRasterData();
43 
44  virtual void reset();
45  virtual void copy(const TimeRasterData*);
46 
47  virtual void resizeData(const double rows, const double cols);
48 
49  virtual QwtRasterData* copy() const;
50 
51 #if QWT_VERSION < 0x060000
52  virtual QwtDoubleInterval range() const;
53  virtual void setRange(const QwtDoubleInterval&);
54 #endif
55 
56  virtual double value(double x, double y) const;
57 
58  virtual double getNumCols() const;
59  virtual double getNumRows() const;
60 
61  virtual void addData(const double*, const int);
62 
63  void incrementResidual();
64 
65 #if QWT_VERSION >= 0x060200
66  virtual QwtInterval interval(Qt::Axis) const;
67  void setInterval(Qt::Axis, const QwtInterval&);
68 #endif
69 
70 protected:
71  double* d_data;
72  double d_rows, d_cols;
73  double d_resid;
75 
76 #if QWT_VERSION < 0x060000
77  QwtDoubleInterval d_intensityRange;
78 #else
79  QwtInterval d_intensityRange;
80 #endif
81 
82 #if QWT_VERSION >= 0x060200
83  QwtInterval d_intervals[3];
84 #endif
85 
86 private:
87 };
88 
89 #endif /* TIMERASTER_GLOBAL_DATA_HPP */
virtual void resizeData(const double rows, const double cols)
int d_data_size
Definition: timeRasterGlobalData.h:74
int d_nitems
Definition: timeRasterGlobalData.h:74
double d_cols
Definition: timeRasterGlobalData.h:72
virtual void setRange(const QwtDoubleInterval &)
virtual void reset()
Definition: timeRasterGlobalData.h:38
virtual ~TimeRasterData()
virtual QwtDoubleInterval range() const
double d_rows
Definition: timeRasterGlobalData.h:72
double * d_data
Definition: timeRasterGlobalData.h:71
int d_totalitems
Definition: timeRasterGlobalData.h:74
virtual double getNumRows() const
virtual double getNumCols() const
void incrementResidual()
virtual void addData(const double *, const int)
TimeRasterData(const double rows, const double cols)
QwtDoubleInterval d_intensityRange
Definition: timeRasterGlobalData.h:77
virtual QwtRasterData * copy() const
double d_resid
Definition: timeRasterGlobalData.h:73
virtual double value(double x, double y) const