GNU Radio 3.4.2 C++ API
|
00001 #ifndef PLOT_WATERFALL_H 00002 #define PLOT_WATERFALL_H 00003 00004 #include <qglobal.h> 00005 #include <waterfallGlobalData.h> 00006 #include <qwt_plot_rasteritem.h> 00007 00008 #if QWT_VERSION >= 0x060000 00009 #include <qwt_point_3d.h> // doesn't seem necessary, but is... 00010 #include <qwt_compat.h> 00011 #endif 00012 00013 class QwtColorMap; 00014 00015 /*! 00016 \brief A plot item, which displays a waterfall spectrogram 00017 00018 A waterfall displays threedimenional data, where the 3rd dimension 00019 ( the intensity ) is displayed using colors. The colors are calculated 00020 from the values using a color map. 00021 00022 \sa QwtRasterData, QwtColorMap 00023 */ 00024 00025 class PlotWaterfall: public QwtPlotRasterItem 00026 { 00027 public: 00028 explicit PlotWaterfall(WaterfallData* data, 00029 const QString &title = QString::null); 00030 virtual ~PlotWaterfall(); 00031 00032 const WaterfallData* data()const; 00033 00034 void setColorMap(const QwtColorMap &); 00035 00036 const QwtColorMap &colorMap() const; 00037 00038 #if QWT_VERSION < 0x060000 00039 virtual QwtDoubleRect boundingRect() const; 00040 virtual QSize rasterHint(const QwtDoubleRect &) const; 00041 #endif 00042 00043 virtual int rtti() const; 00044 00045 virtual void draw(QPainter *p, 00046 const QwtScaleMap &xMap, 00047 const QwtScaleMap &yMap, 00048 const QRect &rect) const; 00049 00050 protected: 00051 #if QWT_VERSION < 0x060000 00052 QImage renderImage(const QwtScaleMap &xMap, 00053 const QwtScaleMap &yMap, 00054 const QwtDoubleRect &rect) const; 00055 #else 00056 QImage renderImage(const QwtScaleMap &xMap, 00057 const QwtScaleMap &yMap, 00058 const QRectF &rect, 00059 const QSize &size=QSize(0,0)) const; 00060 #endif 00061 00062 private: 00063 class PrivateData; 00064 PrivateData *d_data; 00065 }; 00066 00067 #endif