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