# qwt_raster_data.h

    00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
    00002  * Qwt Widget Library
    00003  * Copyright (C) 1997   Josef Wilgen
    00004  * Copyright (C) 2002   Uwe Rathmann
    00005  *
    00006  * This library is free software; you can redistribute it and/or
    00007  * modify it under the terms of the Qwt License, Version 1.0
    00008  *****************************************************************************/
    00009
    00010 // vim: expandtab
    00011
    00012 #ifndef QWT_RASTER_DATA_H
    00013 #define QWT_RASTER_DATA_H 1
    00014
    00015 #include <qmap.h>
    00016 #include "qwt_global.h"
    00017 #include "qwt_double_rect.h"
    00018 #include "qwt_double_interval.h"
    00019
    00020 #if QT_VERSION >= 0x040000
    00021 #include <qlist.h>
    00022 #include <QPolygonF>
    00023
    00024 #if defined(QWT_TEMPLATEDLL)
    00025 // MOC_SKIP_BEGIN
    00026 template class QWT_EXPORT QMap<double, QPolygonF>;
    00027 // MOC_SKIP_END
    00028 #endif
    00029
    00030 #else
    00031 #include <qvaluelist.h>
    00032 #include "qwt_array.h"
    00033 #include "qwt_double_rect.h"
    00034 #if defined(QWT_TEMPLATEDLL)
    00035 // MOC_SKIP_BEGIN
    00036 #ifndef QWTARRAY_TEMPLATE_QWTDOUBLEPOINT // by mjo3
    00037 #define QWTARRAY_TEMPLATE_QWTDOUBLEPOINT
    00038 template class QWT_EXPORT QwtArray<QwtDoublePoint>;
    00039 #endif //end of QWTARRAY_TEMPLATE_QWTDOUBLEPOINT
    00040 #ifndef QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT // by mjo3
    00041 #define QMAP_TEMPLATE_DOUBLE_QWTDOUBLEPOINT
    00042 template class QWT_EXPORT QMap<double, QwtArray<QwtDoublePoint> >;
    00043 #endif //end of QMAP_TEMPLATE_QWTDOUBLEPOINT
    00044 // MOC_SKIP_END
    00045 #endif
    00046 #endif
    00047
    00048 class QwtScaleMap;
    00049
    00061 class QWT_EXPORT QwtRasterData
    00062 {
    00063 public:
    00064 #if QT_VERSION >= 0x040000
    00065     typedef QMap<double, QPolygonF> ContourLines;
    00066 #else
    00067     typedef QMap<double, QwtArray<QwtDoublePoint> > ContourLines;
    00068 #endif
    00069
    00071     enum ConrecAttribute
    00072     {
    00073         IgnoreAllVerticesOnLevel = 1,
    00074         IgnoreOutOfRange = 2
    00075     };
    00076
    00077     QwtRasterData();
    00078     QwtRasterData(const QwtDoubleRect &);
    00079     virtual ~QwtRasterData();
    00080
    00082     virtual QwtRasterData *copy() const = 0;
    00083
    00084     virtual void setBoundingRect(const QwtDoubleRect &);
    00085     QwtDoubleRect boundingRect() const;
    00086
    00087     virtual QSize rasterHint(const QwtDoubleRect &) const;
    00088
    00089     virtual void initRaster(const QwtDoubleRect &, const QSize& raster);
    00090     virtual void discardRaster();
    00091
    00097     virtual double value(double x, double y) const = 0;
    00098
    00100     virtual QwtDoubleInterval range() const = 0;
    00101
    00102 #if QT_VERSION >= 0x040000
    00103     virtual ContourLines contourLines(const QwtDoubleRect &rect,
    00104         const QSize &raster, const QList<double> &levels,
    00105         int flags) const;
    00106 #else
    00107     virtual ContourLines contourLines(const QwtDoubleRect &rect,
    00108         const QSize &raster, const QValueList<double> &levels,
    00109         int flags) const;
    00110 #endif
    00111
    00112     class Contour3DPoint;
    00113     class ContourPlane;
    00114
    00115 private:
    00116     QwtDoubleRect d_boundingRect;
    00117 };
    00118
    00119 #endif