GNU Radio Manual and C++ API Reference 3.8.5.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
plot_waterfall.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2008-2012 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_WATERFALL_H
24#define PLOT_WATERFALL_H
25
27#include <qglobal.h>
28#include <qwt_plot_rasteritem.h>
29
30#if QWT_VERSION >= 0x060000
31#include <qsize.h>
32#include <qwt_interval.h>
33
34typedef QwtInterval QwtDoubleInterval;
35#endif
36
37class QwtColorMap;
38
39/*!
40 * \brief A plot item, which displays a waterfall spectrogram
41 * \ingroup qtgui_blk
42 *
43 * \details
44 * A waterfall displays three-dimensional data, where the 3rd dimension
45 * (the intensity) is displayed using colors. The colors are calculated
46 * from the values using a color map.
47 *
48 * \sa QwtRasterData, QwtColorMap
49 */
50class PlotWaterfall : public QwtPlotRasterItem
51{
52public:
53 explicit PlotWaterfall(WaterfallData* data, const QString& title = QString::null);
54 virtual ~PlotWaterfall();
55
56 const WaterfallData* data() const;
57
58 void setColorMap(const QwtColorMap&);
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#endif
66
67 virtual int rtti() const;
68
69protected:
70#if QWT_VERSION < 0x060000
71 QImage renderImage(const QwtScaleMap& xMap,
72 const QwtScaleMap& yMap,
73 const QwtDoubleRect& rect) const;
74#else
75 QImage renderImage(const QwtScaleMap& xMap,
76 const QwtScaleMap& yMap,
77 const QRectF& rect,
78 const QSize& size = QSize(0, 0)) const;
79#endif
80
81private:
82 class PrivateData;
83 PrivateData* d_data;
84};
85
86#endif
A plot item, which displays a waterfall spectrogram.
Definition plot_waterfall.h:51
virtual QwtDoubleRect boundingRect() const
virtual int rtti() const
PlotWaterfall(WaterfallData *data, const QString &title=QString::null)
const WaterfallData * data() const
void setColorMap(const QwtColorMap &)
const QwtColorMap & colorMap() const
virtual ~PlotWaterfall()
virtual QSize rasterHint(const QwtDoubleRect &) const
QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
Definition waterfallGlobalData.h:36