Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
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
16class QwtInterval;
17class QPolygonF;
18class QRectF;
19class QSize;
20template< typename T > class QList;
21template< class Key, class T > class QMap;
22
42class QWT_EXPORT QwtRasterData
43{
44 public:
47
55 {
71 WithoutGaps = 0x01
72 };
73
74 Q_DECLARE_FLAGS( Attributes, Attribute )
75
76
78 {
80 IgnoreAllVerticesOnLevel = 0x01,
81
83 IgnoreOutOfRange = 0x02
84 };
85
86 Q_DECLARE_FLAGS( ConrecFlags, ConrecFlag )
87
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
126Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::ConrecFlags )
127Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::Attributes )
128
129#endif
A class representing an interval.
QwtRasterData defines an interface to any type of raster data.
QMap< double, QPolygonF > ContourLines
Contour lines.
QFlags< ConrecFlag > ConrecFlags
virtual double value(double x, double y) const =0
QFlags< Attribute > Attributes
Attribute
Raster data attributes.
virtual QwtInterval interval(Qt::Axis) const =0
ConrecFlag
Flags to modify the contour algorithm.