Qwt User's Guide 6.2.0

qwt_raster_data.h
1 /******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_RASTER_DATA_H
11 #define QWT_RASTER_DATA_H
12
13 #include "qwt_global.h"
14 #include <qnamespace.h>
15
16 class QwtInterval;
17 class QPolygonF;
18 class QRectF;
19 class QSize;
20 template< typename T > class QList;
21 template< class Key, class T > class QMap;
22
42 class QWT_EXPORT QwtRasterData
43 {
44 public:
46 typedef QMap< double, QPolygonF > ContourLines;
47
54 enum Attribute
55 {
71 WithoutGaps = 0x01
72 };
73
74 Q_DECLARE_FLAGS( Attributes, Attribute )
75
76
77 enum ConrecFlag
78 {
80 IgnoreAllVerticesOnLevel = 0x01,
81
83 IgnoreOutOfRange = 0x02
84 };
85
86 Q_DECLARE_FLAGS( ConrecFlags, ConrecFlag )
87
88 QwtRasterData();
89 virtual ~QwtRasterData();
90
91 void setAttribute( Attribute, bool on = true );
92 bool testAttribute( Attribute ) const;
93
98 virtual QwtInterval interval( Qt::Axis ) const = 0;
99
100 virtual QRectF pixelHint( const QRectF& ) const;
101
102 virtual void initRaster( const QRectF&, const QSize& raster );
103 virtual void discardRaster();
104
110 virtual double value( double x, double y ) const = 0;
111
112 virtual ContourLines contourLines( const QRectF& rect,
113 const QSize& raster, const QList< double >& levels,
114 ConrecFlags ) const;
115
116 class Contour3DPoint;
117 class ContourPlane;
118
119 private:
120 Q_DISABLE_COPY(QwtRasterData)
121
122 class PrivateData;
123 PrivateData* m_data;
124 };
125
126 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::ConrecFlags )
127 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::Attributes )
128
129 #endif
QList
Definition: qwt_abstract_legend.h:17
QMap
Definition: qwt_compass.h:19
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:23
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:43
QwtRasterData::ContourLines
QMap< double, QPolygonF > ContourLines
Contour lines.
Definition: qwt_raster_data.h:46
QwtRasterData::ConrecFlags
QFlags< ConrecFlag > ConrecFlags
Definition: qwt_raster_data.h:86
QwtRasterData::value
virtual double value(double x, double y) const =0
QwtRasterData::Attributes
QFlags< Attribute > Attributes
Definition: qwt_raster_data.h:74
QwtRasterData::Attribute
Attribute
Raster data attributes.
Definition: qwt_raster_data.h:55
QwtRasterData::interval
virtual QwtInterval interval(Qt::Axis) const =0
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:78