Qwt User's Guide: qwt_raster_data.h Source File

Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

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 // vim: expandtab
11
12 #ifndef QWT_RASTER_DATA_H
13 #define QWT_RASTER_DATA_H 1
14
15 #include <qmap.h>
16 #include "qwt_global.h"
17 #include "qwt_double_rect.h"
18 #include "qwt_double_interval.h"
19
20 #if QT_VERSION >= 0x040000
21 #include <qlist.h>
22 #include <QPolygonF>
23
24 #if defined(QWT_TEMPLATEDLL)
25 // MOC_SKIP_BEGIN
26 template class QWT_EXPORT QMap<double, QPolygonF>;
27 // MOC_SKIP_END
28 #endif
29
30 #else
31 #include <qvaluelist.h>
32 #include "qwt_array.h"
33 #include "qwt_double_rect.h"
34 #if defined(QWT_TEMPLATEDLL)
35 // MOC_SKIP_BEGIN
36 #ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3
37 #define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT
38 template class QWT_EXPORT QwtArray<QwtDoublePoint>;
39 #endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT
40 #ifndef QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT // by mjo3
41 #define QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT
42 template class QWT_EXPORT QMap<double, QwtArray<QwtDoublePoint> >;
43 #endif //end of QMAP_TEMPLATE_QWTDOUBLEPOINT
44 // MOC_SKIP_END
45 #endif
46 #endif
47
48 class QwtScaleMap;
49
61 class QWT_EXPORT QwtRasterData
62 {
63 public:
64 #if QT_VERSION >= 0x040000
65 typedef QMap<double, QPolygonF> ContourLines;
66 #else
67 typedef QMap<double, QwtArray<QwtDoublePoint> > ContourLines;
68 #endif
69
71 enum ConrecAttribute
72 {
73 IgnoreAllVerticesOnLevel = 1,
74 IgnoreOutOfRange = 2
75 };
76
77 QwtRasterData();
78 QwtRasterData(const QwtDoubleRect &);
79 virtual ~QwtRasterData();
80
82 virtual QwtRasterData *copy() const = 0;
83
84 virtual void setBoundingRect(const QwtDoubleRect &);
85 QwtDoubleRect boundingRect() const;
86
87 virtual QSize rasterHint(const QwtDoubleRect &) const;
88
89 virtual void initRaster(const QwtDoubleRect &, const QSize& raster);
90 virtual void discardRaster();
91
97 virtual double value(double x, double y) const = 0;
98
100 virtual QwtDoubleInterval range() const = 0;
101
102 #if QT_VERSION >= 0x040000
103 virtual ContourLines contourLines(const QwtDoubleRect &rect,
104 const QSize &raster, const QList<double> &levels,
105 int flags) const;
106 #else
107 virtual ContourLines contourLines(const QwtDoubleRect &rect,
108 const QSize &raster, const QValueList<double> &levels,
109 int flags) const;
110 #endif
111
112 class Contour3DPoint;
113 class ContourPlane;
114
115 private:
116 QwtDoubleRect d_boundingRect;
117 };
118
119 #endif