GNU Radio Manual and C++ API Reference  3.8.4.0
The Free & Open Software Radio Ecosystem
plot_raster.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 PLOT_TIMERASTER_H
24 #define PLOT_TIMERASTER_H
25 
27 #include <qglobal.h>
28 #include <qwt_plot_rasteritem.h>
29 
30 #if QWT_VERSION >= 0x060200
31 #include "qwt_interval.h"
32 #include <qsize.h>
33 
34 typedef QwtInterval QwtDoubleInterval;
35 #elif QWT_VERSION >= 0x060000
36 #include <qwt_compat.h>
37 #include <qwt_point_3d.h> // doesn't seem necessary, but is...
38 #endif
39 
40 class QwtColorMap;
41 
42 /*!
43  * \brief A plot item, which displays a time raster.
44  * \ingroup qtgui_blk
45  *
46  * \details
47  * A time raster displays three-dimensional data, where the 3rd dimension
48  * (the intensity) is displayed using colors. The colors are calculated
49  * from the values using a color map.
50  *
51  * \sa QwtRasterData, QwtColorMap
52  */
53 class PlotTimeRaster : public QwtPlotRasterItem
54 {
55 public:
56  explicit PlotTimeRaster(const QString& title = QString::null);
57  virtual ~PlotTimeRaster();
58 
59  const TimeRasterData* data() const;
60 
62 
63  void setColorMap(const QwtColorMap* map);
64 
65  const QwtColorMap& colorMap() const;
66 
67 #if QWT_VERSION < 0x060000
68  virtual QwtDoubleRect boundingRect() const;
69  virtual QSize rasterHint(const QwtDoubleRect&) const;
70  virtual QwtDoubleInterval interval(Qt::Axis ax) const;
71 #else
72  virtual QwtInterval interval(Qt::Axis ax) const;
73 #endif
74 
75  virtual int rtti() const;
76 
77 protected:
78 #if QWT_VERSION < 0x060000
79  QImage renderImage(const QwtScaleMap& xMap,
80  const QwtScaleMap& yMap,
81  const QwtDoubleRect& rect) const;
82 #else
83  QImage renderImage(const QwtScaleMap& xMap,
84  const QwtScaleMap& yMap,
85  const QRectF& rect,
86  const QSize& size = QSize(0, 0)) const;
87 #endif
88 
89 private:
90  class PrivateData;
91  PrivateData* d_data;
92 };
93 
94 #endif
A plot item, which displays a time raster.
Definition: plot_raster.h:53
void setColorMap(const QwtColorMap *map)
Definition: timeRasterGlobalData.h:38
virtual int rtti() const
virtual QwtDoubleRect boundingRect() const
void setData(TimeRasterData *data)
virtual ~PlotTimeRaster()
const QwtColorMap & colorMap() const
PlotTimeRaster(const QString &title=QString::null)
PMT_API pmt_t map(pmt_t proc(const pmt_t &), pmt_t list)
Apply proc element-wise to the elements of list and returns a list of the results, in order.
virtual QSize rasterHint(const QwtDoubleRect &) const
virtual QwtDoubleInterval interval(Qt::Axis ax) const
QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
const TimeRasterData * data() const