# 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
    00053 class QWT_EXPORT QwtRasterData
    00054 {
    00055 public:
    00056 #if QT_VERSION >= 0x040000
    00057     typedef QMap<double, QPolygonF> ContourLines;
    00058 #else
    00059     typedef QMap<double, QwtArray<QwtDoublePoint> > ContourLines;
    00060 #endif
    00061
    00062     enum ConrecAttribute
    00063     {
    00064         IgnoreAllVerticesOnLevel = 1,
    00065         IgnoreOutOfRange = 2
    00066     };
    00067
    00068     QwtRasterData();
    00069     QwtRasterData(const QwtDoubleRect &);
    00070     virtual ~QwtRasterData();
    00071
    00073     virtual QwtRasterData *copy() const = 0;
    00074
    00075     virtual void setBoundingRect(const QwtDoubleRect &);
    00076     QwtDoubleRect boundingRect() const;
    00077
    00078     virtual QSize rasterHint(const QwtDoubleRect &) const;
    00079
    00080     virtual void initRaster(const QwtDoubleRect &, const QSize& raster);
    00081     virtual void discardRaster();
    00082
    00084     virtual double value(double x, double y) const = 0;
    00085
    00087     virtual QwtDoubleInterval range() const = 0;
    00088
    00089 #if QT_VERSION >= 0x040000
    00090     virtual ContourLines contourLines(const QwtDoubleRect &rect,
    00091         const QSize &raster, const QList<double> &levels,
    00092         int flags) const;
    00093 #else
    00094     virtual ContourLines contourLines(const QwtDoubleRect &rect,
    00095         const QSize &raster, const QValueList<double> &levels,
    00096         int flags) const;
    00097 #endif
    00098
    00099     class Contour3DPoint;
    00100     class ContourPlane;
    00101
    00102 private:
    00103     QwtDoubleRect d_boundingRect;
    00104 };
    00105
    00106 #endif