summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/plot_waterfall.h
diff options
context:
space:
mode:
authorTom Rondeau2011-04-10 19:39:58 -0400
committerTom Rondeau2011-04-10 19:39:58 -0400
commit4d6f2a34a6380270e6ac6c5ea37f1dbac7acb9f6 (patch)
treec339967250fe6f19dccfce6b911c3cb51ed4285c /gr-qtgui/lib/plot_waterfall.h
parentec0edceb88e9603aedd4f6dd7a8a73702ce59547 (diff)
parent11e91cdd442f9232382986f9d974b230554fabe2 (diff)
downloadgnuradio-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.h52
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