Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_polar_spectrogram.h
1/******************************************************************************
2 * QwtPolar Widget Library
3 * Copyright (C) 2008 Uwe Rathmann
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the Qwt License, Version 1.0
7 *****************************************************************************/
8
9#ifndef QWT_POLAR_SPECTROGRAM_H
10#define QWT_POLAR_SPECTROGRAM_H
11
12#include "qwt_global.h"
13#include "qwt_polar_item.h"
14#include <qimage.h>
15
16class QwtRasterData;
17class QwtColorMap;
18
28class QWT_EXPORT QwtPolarSpectrogram : public QwtPolarItem
29{
30 public:
38 {
44 ApproximatedAtan = 0x01
45 };
46
47 Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
48
49 explicit QwtPolarSpectrogram();
50 virtual ~QwtPolarSpectrogram();
51
52 void setData( QwtRasterData* data );
53 const QwtRasterData* data() const;
54
55 void setColorMap( QwtColorMap* );
56 const QwtColorMap* colorMap() const;
57
58 void setPaintAttribute( PaintAttribute, bool on = true );
59 bool testPaintAttribute( PaintAttribute ) const;
60
61 virtual int rtti() const QWT_OVERRIDE;
62
63 virtual void draw( QPainter* painter,
64 const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
65 const QPointF& pole, double radius,
66 const QRectF& canvasRect ) const QWT_OVERRIDE;
67
68 virtual QwtInterval boundingInterval( int scaleId ) const QWT_OVERRIDE;
69
70 protected:
71 virtual QImage renderImage(
72 const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
73 const QPointF& pole, const QRect& rect ) const;
74
75 virtual void renderTile(
76 const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
77 const QPointF& pole, const QPoint& imagePos,
78 const QRect& tile, QImage* image ) const;
79
80 private:
81 class TileInfo;
82 void renderTileInfo( const QwtScaleMap&, const QwtScaleMap&,
83 const QPointF& pole, TileInfo* ) const;
84
85 class PrivateData;
86 PrivateData* m_data;
87};
88
89Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarSpectrogram::PaintAttributes )
90
91#endif
QwtColorMap is used to map values into colors.
A class representing an interval.
Base class for items on a polar plot.
virtual int rtti() const
An item, which displays a spectrogram.
QFlags< PaintAttribute > PaintAttributes
QwtRasterData defines an interface to any type of raster data.
A scale map.