Index: trunk/BNC/qwt/qwt_raster_data.cpp
===================================================================
--- trunk/BNC/qwt/qwt_raster_data.cpp	(revision 9383)
+++ trunk/BNC/qwt/qwt_raster_data.cpp	(revision 11158)
@@ -1,3 +1,3 @@
-/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
+/******************************************************************************
  * Qwt Widget Library
  * Copyright (C) 1997   Josef Wilgen
@@ -10,11 +10,17 @@
 #include "qwt_raster_data.h"
 #include "qwt_point_3d.h"
+#include "qwt_interval.h"
+
+#include <qrect.h>
+#include <qpolygon.h>
 #include <qnumeric.h>
+#include <qlist.h>
+#include <qmap.h>
 
 class QwtRasterData::ContourPlane
 {
-public:
-    inline ContourPlane( double z ):
-        d_z( z )
+  public:
+    explicit inline ContourPlane( double z ):
+        m_z( z )
     {
     }
@@ -23,12 +29,12 @@
         QPointF line[2], bool ignoreOnPlane ) const;
 
-    inline double z() const { return d_z; }
-
-private:
+    inline double z() const { return m_z; }
+
+  private:
     inline int compare( double z ) const;
     inline QPointF intersection(
-        const QwtPoint3D& p1, const QwtPoint3D &p2 ) const;
-
-    double d_z;
+        const QwtPoint3D& p1, const QwtPoint3D& p2 ) const;
+
+    double m_z;
 };
 
@@ -65,5 +71,5 @@
     };
 
-    const int edgeType = tab[eq1+1][eq2+1][eq3+1];
+    const int edgeType = tab[eq1 + 1][eq2 + 1][eq3 + 1];
     switch ( edgeType )
     {
@@ -135,8 +141,8 @@
 inline int QwtRasterData::ContourPlane::compare( double z ) const
 {
-    if ( z > d_z )
+    if ( z > m_z )
         return 1;
 
-    if ( z < d_z )
+    if ( z < m_z )
         return -1;
 
@@ -145,8 +151,8 @@
 
 inline QPointF QwtRasterData::ContourPlane::intersection(
-    const QwtPoint3D& p1, const QwtPoint3D &p2 ) const
-{
-    const double h1 = p1.z() - d_z;
-    const double h2 = p2.z() - d_z;
+    const QwtPoint3D& p1, const QwtPoint3D& p2 ) const
+{
+    const double h1 = p1.z() - m_z;
+    const double h2 = p2.z() - m_z;
 
     const double x = ( h2 * p1.x() - h1 * p2.x() ) / ( h2 - h1 );
@@ -156,7 +162,14 @@
 }
 
+class QwtRasterData::PrivateData
+{
+  public:
+    QwtRasterData::Attributes attributes;
+};
+
 //! Constructor
 QwtRasterData::QwtRasterData()
 {
+    m_data = new PrivateData();
 }
 
@@ -164,35 +177,47 @@
 QwtRasterData::~QwtRasterData()
 {
-}
-
-/*!
-   Set the bounding interval for the x, y or z coordinates.
-
-   \param axis Axis
-   \param interval Bounding interval
-
-   \sa interval()
-*/
-void QwtRasterData::setInterval( Qt::Axis axis, const QwtInterval &interval )
-{
-    d_intervals[axis] = interval;
-}
-
-/*!
-  \brief Initialize a raster
-
-  Before the composition of an image QwtPlotSpectrogram calls initRaster(),
-  announcing the area and its resolution that will be requested.
-
-  The default implementation does nothing, but for data sets that
-  are stored in files, it might be good idea to reimplement initRaster(),
-  where the data is resampled and loaded into memory.
-
-  \param area Area of the raster
-  \param raster Number of horizontal and vertical pixels
-
-  \sa initRaster(), value()
-*/
-void QwtRasterData::initRaster( const QRectF &area, const QSize &raster )
+    delete m_data;
+}
+
+/*!
+   Specify an attribute of the data
+
+   \param attribute Attribute
+   \param on On/Off
+   /sa Attribute, testAttribute()
+ */
+void QwtRasterData::setAttribute( Attribute attribute, bool on )
+{
+    if ( on )
+        m_data->attributes |= attribute;
+    else
+        m_data->attributes &= ~attribute;
+}
+
+/*!
+    \return True, when attribute is enabled
+    \sa Attribute, setAttribute()
+ */
+bool QwtRasterData::testAttribute( Attribute attribute ) const
+{
+    return m_data->attributes & attribute;
+}
+
+/*!
+   \brief Initialize a raster
+
+   Before the composition of an image QwtPlotSpectrogram calls initRaster(),
+   announcing the area and its resolution that will be requested.
+
+   The default implementation does nothing, but for data sets that
+   are stored in files, it might be good idea to reimplement initRaster(),
+   where the data is resampled and loaded into memory.
+
+   \param area Area of the raster
+   \param raster Number of horizontal and vertical pixels
+
+   \sa initRaster(), value()
+ */
+void QwtRasterData::initRaster( const QRectF& area, const QSize& raster )
 {
     Q_UNUSED( area );
@@ -201,13 +226,13 @@
 
 /*!
-  \brief Discard a raster
-
-  After the composition of an image QwtPlotSpectrogram calls discardRaster().
-
-  The default implementation does nothing, but if data has been loaded
-  in initRaster(), it could deleted now.
-
-  \sa initRaster(), value()
-*/
+   \brief Discard a raster
+
+   After the composition of an image QwtPlotSpectrogram calls discardRaster().
+
+   The default implementation does nothing, but if data has been loaded
+   in initRaster(), it could deleted now.
+
+   \sa initRaster(), value()
+ */
 void QwtRasterData::discardRaster()
 {
@@ -239,6 +264,6 @@
 
    \return Bounding rectangle of a pixel
-*/
-QRectF QwtRasterData::pixelHint( const QRectF &area ) const
+ */
+QRectF QwtRasterData::pixelHint( const QRectF& area ) const
 {
     Q_UNUSED( area );
@@ -258,8 +283,8 @@
    An adaption of CONREC, a simple contouring algorithm.
    http://local.wasp.uwa.edu.au/~pbourke/papers/conrec/
-*/
+ */
 QwtRasterData::ContourLines QwtRasterData::contourLines(
-    const QRectF &rect, const QSize &raster,
-    const QList<double> &levels, ConrecFlags flags ) const
+    const QRectF& rect, const QSize& raster,
+    const QList< double >& levels, ConrecFlags flags ) const
 {
     ContourLines contourLines;
@@ -279,11 +304,6 @@
         ignoreOutOfRange = flags & IgnoreOutOfRange;
 
-    QwtRasterData *that = const_cast<QwtRasterData *>( this );
+    QwtRasterData* that = const_cast< QwtRasterData* >( this );
     that->initRaster( rect, raster );
-
-#if __GNUC__ >= 9
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-copy"
-#endif
 
     for ( int y = 0; y < raster.height() - 1; y++ )
@@ -313,5 +333,5 @@
                 xy[TopRight].setZ(
                     value( xy[TopRight].x(), xy[TopRight].y() )
-                );
+                    );
 
                 xy[BottomRight].setX( pos.x() );
@@ -319,5 +339,5 @@
                 xy[BottomRight].setZ(
                     value( xy[BottomRight].x(), xy[BottomRight].y() )
-                );
+                    );
             }
 
@@ -332,8 +352,8 @@
             xy[TopRight].setZ(
                 value( xy[TopRight].x(), xy[TopRight].y() )
-            );
+                );
             xy[BottomRight].setZ(
                 value( xy[BottomRight].x(), xy[BottomRight].y() )
-            );
+                );
 
             double zMin = xy[TopLeft].z();
@@ -380,5 +400,5 @@
                 if ( level < zMin || level > zMax )
                     continue;
-                QPolygonF &lines = contourLines[level];
+                QPolygonF& lines = contourLines[level];
                 const ContourPlane plane( level );
 
@@ -404,8 +424,4 @@
     }
 
-#if __GNUC__ >= 9
-#pragma GCC diagnostic pop
-#endif
-
     that->discardRaster();
 
