Qwt User's Guide: qwt_raster_data.h Source File

Qwt User's Guide 6.0.1

- Main Page
- Related Pages
- Classes
- Files

- File List

# 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 #ifndef QWT_RASTER_DATA_H
    00011 #define QWT_RASTER_DATA_H 1
    00012
    00013 #include "qwt_global.h"
    00014 #include "qwt_interval.h"
    00015 #include <qmap.h>
    00016 #include <qlist.h>
    00017 #include <qpolygon.h>
    00018
    00019 class QwtScaleMap;
    00020
    00032 class QWT_EXPORT QwtRasterData
    00033 {
    00034 public:
    00036     typedef QMap<double, QPolygonF> ContourLines;
    00037
    00039     enum ConrecFlag
    00040     {
    00042         IgnoreAllVerticesOnLevel = 0x01,
    00043
    00045         IgnoreOutOfRange = 0x02
    00046     };
    00047
    00049     typedef QFlags<ConrecFlag> ConrecFlags;
    00050
    00051     QwtRasterData();
    00052     virtual ~QwtRasterData();
    00053
    00054     virtual void setInterval( Qt::Axis, const QwtInterval & );
    00055     const QwtInterval &interval(Qt::Axis) const;
    00056
    00057     virtual QRectF pixelHint( const QRectF & ) const;
    00058
    00059     virtual void initRaster( const QRectF &, const QSize& raster );
    00060     virtual void discardRaster();
    00061
    00067     virtual double value( double x, double y ) const = 0;
    00068
    00069     virtual ContourLines contourLines( const QRectF &rect,
    00070         const QSize &raster, const QList<double> &levels,
    00071         ConrecFlags ) const;
    00072
    00073     class Contour3DPoint;
    00074     class ContourPlane;
    00075
    00076 private:
    00077     // Disabled copy constructor and operator=
    00078     QwtRasterData( const QwtRasterData & );
    00079     QwtRasterData &operator=( const QwtRasterData & );
    00080
    00081     QwtInterval d_intervals[3];
    00082 };
    00083
    00088 inline const QwtInterval &QwtRasterData::interval( Qt::Axis axis) const
    00089 {
    00090     return d_intervals[axis];
    00091 }
    00092
    00093 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtRasterData::ConrecFlags )
    00094
    00095 #endif