GNU Radio Manual and C++ API Reference  3.9.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  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef PLOT_TIMERASTER_H
12 #define PLOT_TIMERASTER_H
13 
15 #include <qglobal.h>
16 #include <qwt_plot_rasteritem.h>
17 
18 #if QWT_VERSION >= 0x060000
19 #include <qsize.h>
20 #include <qwt_interval.h>
21 
22 typedef QwtInterval QwtDoubleInterval;
23 #endif
24 
25 class QwtColorMap;
26 
27 /*!
28  * \brief A plot item, which displays a time raster.
29  * \ingroup qtgui_blk
30  *
31  * \details
32  * A time raster displays three-dimensional data, where the 3rd dimension
33  * (the intensity) is displayed using colors. The colors are calculated
34  * from the values using a color map.
35  *
36  * \sa QwtRasterData, QwtColorMap
37  */
38 class PlotTimeRaster : public QwtPlotRasterItem
39 {
40 public:
41  explicit PlotTimeRaster(const QString& title = QString());
42  ~PlotTimeRaster() override;
43 
44  const TimeRasterData* data() const;
45 
47 
48  void setColorMap(const QwtColorMap* map);
49 
50  const QwtColorMap& colorMap() const;
51 
52 #if QWT_VERSION < 0x060000
53  virtual QwtDoubleRect boundingRect() const;
54  virtual QSize rasterHint(const QwtDoubleRect&) const;
55  virtual QwtDoubleInterval interval(Qt::Axis ax) const;
56 #else
57  QwtInterval interval(Qt::Axis ax) const override;
58 #endif
59 
60  int rtti() const override;
61 
62 protected:
63 #if QWT_VERSION < 0x060000
64  QImage renderImage(const QwtScaleMap& xMap,
65  const QwtScaleMap& yMap,
66  const QwtDoubleRect& rect) const;
67 #else
68  QImage renderImage(const QwtScaleMap& xMap,
69  const QwtScaleMap& yMap,
70  const QRectF& rect,
71  const QSize& size = QSize(0, 0)) const override;
72 #endif
73 
74 private:
75  class PrivateData;
76  PrivateData* d_data;
77 };
78 
79 #endif
A plot item, which displays a time raster.
Definition: plot_raster.h:39
void setData(TimeRasterData *data)
void setColorMap(const QwtColorMap *map)
QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
PlotTimeRaster(const QString &title=QString())
virtual QwtDoubleInterval interval(Qt::Axis ax) const
const TimeRasterData * data() const
virtual QSize rasterHint(const QwtDoubleRect &) const
~PlotTimeRaster() override
const QwtColorMap & colorMap() const
virtual QwtDoubleRect boundingRect() const
int rtti() const override
Definition: timeRasterGlobalData.h:24
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,...