Index: trunk/BNC/qwt/qwt_scale_div.cpp
===================================================================
--- trunk/BNC/qwt/qwt_scale_div.cpp	(revision 9383)
+++ trunk/BNC/qwt/qwt_scale_div.cpp	(revision 11158)
@@ -1,3 +1,3 @@
-/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
+/******************************************************************************
  * Qwt Widget Library
  * Copyright (C) 1997   Josef Wilgen
@@ -9,89 +9,88 @@
 
 #include "qwt_scale_div.h"
-#include "qwt_math.h"
-#include <qalgorithms.h>
-
-/*!
-  Construct a division without ticks
-
-  \param lowerBound First boundary
-  \param upperBound Second boundary
-
-  \note lowerBound might be greater than upperBound for inverted scales
- */
-QwtScaleDiv::QwtScaleDiv( double lowerBound, double upperBound ):
-    d_lowerBound( lowerBound ),
-    d_upperBound( upperBound )
-{
-}
-
-/*!
-  Construct a scale division
-
-  \param interval Interval
-  \param ticks List of major, medium and minor ticks
-*/
-QwtScaleDiv::QwtScaleDiv( const QwtInterval &interval,
-        QList<double> ticks[NTickTypes] ):
-    d_lowerBound( interval.minValue() ),
-    d_upperBound( interval.maxValue() )
+#include "qwt_interval.h"
+
+/*!
+   Construct a division without ticks
+
+   \param lowerBound First boundary
+   \param upperBound Second boundary
+
+   \note lowerBound might be greater than upperBound for inverted scales
+ */
+QwtScaleDiv::QwtScaleDiv( double lowerBound, double upperBound )
+    : m_lowerBound( lowerBound )
+    , m_upperBound( upperBound )
+{
+}
+
+/*!
+   Construct a scale division
+
+   \param interval Interval
+   \param ticks List of major, medium and minor ticks
+ */
+QwtScaleDiv::QwtScaleDiv( const QwtInterval& interval,
+        QList< double > ticks[NTickTypes] )
+    : m_lowerBound( interval.minValue() )
+    , m_upperBound( interval.maxValue() )
 {
     for ( int i = 0; i < NTickTypes; i++ )
-        d_ticks[i] = ticks[i];
-}
-
-/*!
-  Construct a scale division
-
-  \param lowerBound First boundary
-  \param upperBound Second boundary
-  \param ticks List of major, medium and minor ticks
-
-  \note lowerBound might be greater than upperBound for inverted scales
-*/
+        m_ticks[i] = ticks[i];
+}
+
+/*!
+   Construct a scale division
+
+   \param lowerBound First boundary
+   \param upperBound Second boundary
+   \param ticks List of major, medium and minor ticks
+
+   \note lowerBound might be greater than upperBound for inverted scales
+ */
 QwtScaleDiv::QwtScaleDiv( double lowerBound, double upperBound,
-        QList<double> ticks[NTickTypes] ):
-    d_lowerBound( lowerBound ),
-    d_upperBound( upperBound )
+        QList< double > ticks[NTickTypes] )
+    : m_lowerBound( lowerBound )
+    , m_upperBound( upperBound )
 {
     for ( int i = 0; i < NTickTypes; i++ )
-        d_ticks[i] = ticks[i];
-}
-
-/*!
-  Construct a scale division
-
-  \param lowerBound First boundary
-  \param upperBound Second boundary
-  \param minorTicks List of minor ticks
-  \param mediumTicks List medium ticks
-  \param majorTicks List of major ticks
-
-  \note lowerBound might be greater than upperBound for inverted scales
-*/
+        m_ticks[i] = ticks[i];
+}
+
+/*!
+   Construct a scale division
+
+   \param lowerBound First boundary
+   \param upperBound Second boundary
+   \param minorTicks List of minor ticks
+   \param mediumTicks List medium ticks
+   \param majorTicks List of major ticks
+
+   \note lowerBound might be greater than upperBound for inverted scales
+ */
 QwtScaleDiv::QwtScaleDiv( double lowerBound, double upperBound,
-        const QList<double> &minorTicks,
-        const QList<double> &mediumTicks,
-        const QList<double> &majorTicks ):
-    d_lowerBound( lowerBound ),
-    d_upperBound( upperBound )
-{
-    d_ticks[ MinorTick ] = minorTicks;
-    d_ticks[ MediumTick ] = mediumTicks;
-    d_ticks[ MajorTick ] = majorTicks;
-}
-
-/*!
-  Change the interval
-
-  \param lowerBound First boundary
-  \param upperBound Second boundary
-
-  \note lowerBound might be greater than upperBound for inverted scales
-*/
+        const QList< double >& minorTicks,
+        const QList< double >& mediumTicks,
+        const QList< double >& majorTicks )
+    : m_lowerBound( lowerBound )
+    , m_upperBound( upperBound )
+{
+    m_ticks[ MinorTick ] = minorTicks;
+    m_ticks[ MediumTick ] = mediumTicks;
+    m_ticks[ MajorTick ] = majorTicks;
+}
+
+/*!
+   Change the interval
+
+   \param lowerBound First boundary
+   \param upperBound Second boundary
+
+   \note lowerBound might be greater than upperBound for inverted scales
+ */
 void QwtScaleDiv::setInterval( double lowerBound, double upperBound )
 {
-    d_lowerBound = lowerBound;
-    d_upperBound = upperBound;
+    m_lowerBound = lowerBound;
+    m_upperBound = upperBound;
 }
 
@@ -100,75 +99,75 @@
 
    \param interval Interval
-*/
-void QwtScaleDiv::setInterval( const QwtInterval &interval )
-{
-    d_lowerBound = interval.minValue();
-    d_upperBound = interval.maxValue();
-}
-
-/*!
-  \return lowerBound -> upperBound
-*/
+ */
+void QwtScaleDiv::setInterval( const QwtInterval& interval )
+{
+    m_lowerBound = interval.minValue();
+    m_upperBound = interval.maxValue();
+}
+
+/*!
+   \return lowerBound -> upperBound
+ */
 QwtInterval QwtScaleDiv::interval() const
 {
-    return QwtInterval( d_lowerBound, d_upperBound );
-}
-
-/*!
-  Set the first boundary
-
-  \param lowerBound First boundary
-  \sa lowerBiound(), setUpperBound()
+    return QwtInterval( m_lowerBound, m_upperBound );
+}
+
+/*!
+   Set the first boundary
+
+   \param lowerBound First boundary
+   \sa lowerBound(), setUpperBound()
  */
 void QwtScaleDiv::setLowerBound( double lowerBound  )
 {
-    d_lowerBound = lowerBound;
-}
-
-/*!
-  \return First boundary
-  \sa upperBound()
-*/
+    m_lowerBound = lowerBound;
+}
+
+/*!
+   \return First boundary
+   \sa upperBound()
+ */
 double QwtScaleDiv::lowerBound() const
 {
-    return d_lowerBound;
-}
-
-/*!
-  Set the second boundary
-
-  \param upperBound Second boundary
-  \sa upperBound(), setLowerBound()
+    return m_lowerBound;
+}
+
+/*!
+   Set the second boundary
+
+   \param upperBound Second boundary
+   \sa upperBound(), setLowerBound()
  */
 void QwtScaleDiv::setUpperBound( double upperBound  )
 {
-    d_upperBound = upperBound;
-}
-
-/*!
-  \return upper bound
-  \sa lowerBound()
-*/
+    m_upperBound = upperBound;
+}
+
+/*!
+   \return upper bound
+   \sa lowerBound()
+ */
 double QwtScaleDiv::upperBound() const
 {
-    return d_upperBound;
-}
-
-/*!
-  \return upperBound() - lowerBound()
-*/
+    return m_upperBound;
+}
+
+/*!
+   \return upperBound() - lowerBound()
+ */
 double QwtScaleDiv::range() const
 {
-    return d_upperBound - d_lowerBound;
-}
-
-/*!
-  \brief Equality operator
-  \return true if this instance is equal to other
-*/
-bool QwtScaleDiv::operator==( const QwtScaleDiv &other ) const
-{
-    if ( d_lowerBound != other.d_lowerBound ||
-        d_upperBound != other.d_upperBound )
+    return m_upperBound - m_lowerBound;
+}
+
+/*!
+   \brief Equality operator
+   \return true if this instance is equal to other
+ */
+bool QwtScaleDiv::operator==( const QwtScaleDiv& other ) const
+{
+    if ( m_lowerBound != other.m_lowerBound ||
+        m_upperBound != other.m_upperBound )
     {
         return false;
@@ -177,5 +176,5 @@
     for ( int i = 0; i < NTickTypes; i++ )
     {
-        if ( d_ticks[i] != other.d_ticks[i] )
+        if ( m_ticks[i] != other.m_ticks[i] )
             return false;
     }
@@ -185,8 +184,8 @@
 
 /*!
-  \brief Inequality
-  \return true if this instance is not equal to other
-*/
-bool QwtScaleDiv::operator!=( const QwtScaleDiv &other ) const
+   \brief Inequality
+   \return true if this instance is not equal to other
+ */
+bool QwtScaleDiv::operator!=( const QwtScaleDiv& other ) const
 {
     return ( !( *this == other ) );
@@ -196,5 +195,5 @@
 bool QwtScaleDiv::isEmpty() const
 {
-    return ( d_lowerBound == d_upperBound );
+    return ( m_lowerBound == m_upperBound );
 }
 
@@ -202,17 +201,17 @@
 bool QwtScaleDiv::isIncreasing() const
 {
-    return d_lowerBound <= d_upperBound;
-}
-
-/*!
-  Return if a value is between lowerBound() and upperBound()
-
-  \param value Value
-  \return true/false
-*/
+    return m_lowerBound <= m_upperBound;
+}
+
+/*!
+   Return if a value is between lowerBound() and upperBound()
+
+   \param value Value
+   \return true/false
+ */
 bool QwtScaleDiv::contains( double value ) const
 {
-    const double min = qMin( d_lowerBound, d_upperBound );
-    const double max = qMax( d_lowerBound, d_upperBound );
+    const double min = qMin( m_lowerBound, m_upperBound );
+    const double max = qMax( m_lowerBound, m_upperBound );
 
     return value >= min && value <= max;
@@ -225,9 +224,9 @@
 void QwtScaleDiv::invert()
 {
-    qSwap( d_lowerBound, d_upperBound );
+    qSwap( m_lowerBound, m_upperBound );
 
     for ( int i = 0; i < NTickTypes; i++ )
     {
-        QList<double>& ticks = d_ticks[i];
+        QList< double >& ticks = m_ticks[i];
 
         const int size = ticks.count();
@@ -240,6 +239,6 @@
 
 /*!
-  \return A scale division with inverted boundaries and ticks
-  \sa invert()
+   \return A scale division with inverted boundaries and ticks
+   \sa invert()
  */
 QwtScaleDiv QwtScaleDiv::inverted() const
@@ -261,5 +260,5 @@
 
    \note lowerBound might be greater than upperBound for inverted scales
-*/
+ */
 QwtScaleDiv QwtScaleDiv::bounded(
     double lowerBound, double upperBound ) const
@@ -273,7 +272,7 @@
     for ( int tickType = 0; tickType < QwtScaleDiv::NTickTypes; tickType++ )
     {
-        const QList<double> &ticks = d_ticks[ tickType ];
-
-        QList<double> boundedTicks;
+        const QList< double >& ticks = m_ticks[ tickType ];
+
+        QList< double > boundedTicks;
         for ( int i = 0; i < ticks.size(); i++ )
         {
@@ -293,11 +292,11 @@
     Assign ticks
 
-   \param type MinorTick, MediumTick or MajorTick
+   \param tickType MinorTick, MediumTick or MajorTick
    \param ticks Values of the tick positions
-*/
-void QwtScaleDiv::setTicks( int type, const QList<double> &ticks )
-{
-    if ( type >= 0 && type < NTickTypes )
-        d_ticks[type] = ticks;
+ */
+void QwtScaleDiv::setTicks( int tickType, const QList< double >& ticks )
+{
+    if ( tickType >= 0 && tickType < NTickTypes )
+        m_ticks[tickType] = ticks;
 }
 
@@ -305,18 +304,20 @@
    Return a list of ticks
 
-   \param type MinorTick, MediumTick or MajorTick
+   \param tickType MinorTick, MediumTick or MajorTick
    \return Tick list
-*/
-QList<double> QwtScaleDiv::ticks( int type ) const
-{
-    if ( type >= 0 && type < NTickTypes )
-        return d_ticks[type];
-
-    return QList<double>();
+ */
+QList< double > QwtScaleDiv::ticks( int tickType ) const
+{
+    if ( tickType >= 0 && tickType < NTickTypes )
+        return m_ticks[tickType];
+
+    return QList< double >();
 }
 
 #ifndef QT_NO_DEBUG_STREAM
 
-QDebug operator<<( QDebug debug, const QwtScaleDiv &scaleDiv )
+#include <qdebug.h>
+
+QDebug operator<<( QDebug debug, const QwtScaleDiv& scaleDiv )
 {
     debug << scaleDiv.lowerBound() << "<->" << scaleDiv.upperBound();
