diff options
author | Tom Rondeau | 2011-04-10 19:39:58 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-04-10 19:39:58 -0400 |
commit | 4d6f2a34a6380270e6ac6c5ea37f1dbac7acb9f6 (patch) | |
tree | c339967250fe6f19dccfce6b911c3cb51ed4285c /gr-qtgui/lib/plot_waterfall.h | |
parent | ec0edceb88e9603aedd4f6dd7a8a73702ce59547 (diff) | |
parent | 11e91cdd442f9232382986f9d974b230554fabe2 (diff) | |
download | gnuradio-4d6f2a34a6380270e6ac6c5ea37f1dbac7acb9f6.tar.gz gnuradio-4d6f2a34a6380270e6ac6c5ea37f1dbac7acb9f6.tar.bz2 gnuradio-4d6f2a34a6380270e6ac6c5ea37f1dbac7acb9f6.zip |
Merge branch 'qtgui'
Diffstat (limited to 'gr-qtgui/lib/plot_waterfall.h')
-rw-r--r-- | gr-qtgui/lib/plot_waterfall.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gr-qtgui/lib/plot_waterfall.h b/gr-qtgui/lib/plot_waterfall.h new file mode 100644 index 000000000..a11461611 --- /dev/null +++ b/gr-qtgui/lib/plot_waterfall.h @@ -0,0 +1,52 @@ +#ifndef PLOT_WATERFALL_H +#define PLOT_WATERFALL_H + +#include <qglobal.h> +#include <waterfallGlobalData.h> + +#include "qwt_valuelist.h" +#include "qwt_plot_rasteritem.h" + +class QwtColorMap; + +/*! + \brief A plot item, which displays a waterfall spectrogram + + A waterfall displays threedimenional data, where the 3rd dimension + ( the intensity ) is displayed using colors. The colors are calculated + from the values using a color map. + + \sa QwtRasterData, QwtColorMap +*/ + +class PlotWaterfall: public QwtPlotRasterItem +{ +public: + explicit PlotWaterfall(WaterfallData* data, const QString &title = QString::null); + virtual ~PlotWaterfall(); + + const WaterfallData* data()const; + + void setColorMap(const QwtColorMap &); + const QwtColorMap &colorMap() const; + + virtual QwtDoubleRect boundingRect() const; + virtual QSize rasterHint(const QwtDoubleRect &) const; + + virtual int rtti() const; + + virtual void draw(QPainter *p, + const QwtScaleMap &xMap, const QwtScaleMap &yMap, + const QRect &rect) const; + +protected: + virtual QImage renderImage( + const QwtScaleMap &xMap, const QwtScaleMap &yMap, + const QwtDoubleRect &rect) const; + +private: + class PrivateData; + PrivateData *d_data; +}; + +#endif |