Qwt User's Guide: qwt_raster_data.h Source File

Qwt User's Guide 6.1.5

qwt_raster_data.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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 1
12
13 #include "qwt_global.h"
14 #include "qwt_interval.h"
15 #include <qmap.h>
16 #include <qlist.h>
17 #include <qpolygon.h>
18
19 class QwtScaleMap;
20
32 class QWT_EXPORT QwtRasterData
33 {
34 public:
36 typedef QMap<double, QPolygonF> ContourLines;
37
39 enum ConrecFlag
40 {
42 IgnoreAllVerticesOnLevel = 0x01,
43
45 IgnoreOutOfRange = 0x02
46 };
47
49 typedef QFlags<ConrecFlag> ConrecFlags;
50
51 QwtRasterData();
52 virtual ~QwtRasterData();
53
54 virtual void setInterval( Qt::Axis, const QwtInterval & );
55 const QwtInterval &interval(Qt::Axis) const;
56
57 virtual QRectF pixelHint( const QRectF & ) const;
58
59 virtual void initRaster( const QRectF &, const QSize& raster );
60 virtual void discardRaster();
61
67 virtual double value( double x, double y ) const = 0;
68
69 virtual ContourLines contourLines( const QRectF &rect,
70 const QSize &raster, const QList<double> &levels,
71 ConrecFlags ) const;
72
73 class Contour3DPoint;
74 class ContourPlane;
75
76 private:
77 // Disabled copy constructor and operator=
78 QwtRasterData( const QwtRasterData & );
79 QwtRasterData &operator=( const QwtRasterData & );
80
81 QwtInterval d_intervals[3];
82 };
83
88 inline const QwtInterval &QwtRasterData::interval( Qt::Axis axis) const
89 {
90 return d_intervals[axis];
91 }
92
93 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::ConrecFlags )
94
95 #endif
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:32
QwtRasterData::interval
const QwtInterval & interval(Qt::Axis) const
Definition: qwt_raster_data.h:88
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:39
QwtRasterData::ConrecFlags
QFlags< ConrecFlag > ConrecFlags
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:49
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:30
QwtRasterData::ContourLines
QMap< double, QPolygonF > ContourLines
Contour lines.
Definition: qwt_raster_data.h:36
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:26