~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt-5.1.1/src/qwt_raster_data.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-05-26 10:26:31 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080526102631-bp95mfccnrb957nx
Tags: 5.1.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
50
/*!
 
51
  \brief QwtRasterData defines an interface to any type of raster data.
 
52
*/
 
53
class QWT_EXPORT QwtRasterData
 
54
{
 
55
public:
 
56
#if QT_VERSION >= 0x040000
 
57
    typedef QMap<double, QPolygonF> ContourLines;
 
58
#else
 
59
    typedef QMap<double, QwtArray<QwtDoublePoint> > ContourLines;
 
60
#endif
 
61
 
 
62
    enum ConrecAttribute
 
63
    {
 
64
        IgnoreAllVerticesOnLevel = 1,
 
65
        IgnoreOutOfRange = 2
 
66
    };
 
67
 
 
68
    QwtRasterData();
 
69
    QwtRasterData(const QwtDoubleRect &);
 
70
    virtual ~QwtRasterData();
 
71
 
 
72
    //! Clone the data
 
73
    virtual QwtRasterData *copy() const = 0;
 
74
 
 
75
    virtual void setBoundingRect(const QwtDoubleRect &);
 
76
    QwtDoubleRect boundingRect() const;
 
77
 
 
78
    virtual QSize rasterHint(const QwtDoubleRect &) const;
 
79
 
 
80
    virtual void initRaster(const QwtDoubleRect &, const QSize& raster);
 
81
    virtual void discardRaster();
 
82
 
 
83
    //! \return the value at a raster position
 
84
    virtual double value(double x, double y) const = 0;
 
85
 
 
86
    //! \return the range of the values
 
87
    virtual QwtDoubleInterval range() const = 0;
 
88
 
 
89
#if QT_VERSION >= 0x040000
 
90
    virtual ContourLines contourLines(const QwtDoubleRect &rect,
 
91
        const QSize &raster, const QList<double> &levels, 
 
92
        int flags) const;
 
93
#else
 
94
    virtual ContourLines contourLines(const QwtDoubleRect &rect,
 
95
        const QSize &raster, const QValueList<double> &levels, 
 
96
        int flags) const;
 
97
#endif
 
98
 
 
99
    class Contour3DPoint;
 
100
    class ContourPlane;
 
101
 
 
102
private:
 
103
    QwtDoubleRect d_boundingRect;
 
104
};
 
105
 
 
106
#endif