Index: trunk/BNC/qwt/qwt_compass_rose.cpp
===================================================================
--- trunk/BNC/qwt/qwt_compass_rose.cpp	(revision 9383)
+++ trunk/BNC/qwt/qwt_compass_rose.cpp	(revision 11158)
@@ -1,3 +1,3 @@
-/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
+/******************************************************************************
  * Qwt Widget Library
  * Copyright (C) 1997   Josef Wilgen
@@ -10,5 +10,5 @@
 #include "qwt_compass_rose.h"
 #include "qwt_point_polar.h"
-#include "qwt_painter.h"
+
 #include <qpainter.h>
 #include <qpainterpath.h>
@@ -21,5 +21,9 @@
 
     QPointF pos;
+#if QT_VERSION >= 0x050e00
+    if ( line1.intersects( line2, &pos ) == QLineF::NoIntersection )
+#else
     if ( line1.intersect( line2, &pos ) == QLineF::NoIntersection )
+#endif
         return QPointF();
 
@@ -27,12 +31,34 @@
 }
 
+//! Constructor
+QwtCompassRose::QwtCompassRose()
+{
+}
+
+//! Destructor
+QwtCompassRose::~QwtCompassRose()
+{
+}
+
+//! Assign a palette
+void QwtCompassRose::setPalette( const QPalette& p )
+{
+    m_palette = p;
+}
+
+//! \return Current palette
+const QPalette& QwtCompassRose::palette() const
+{
+    return m_palette;
+}
+
 class QwtSimpleCompassRose::PrivateData
 {
-public:
-    PrivateData():
-        width( 0.2 ),
-        numThorns( 8 ),
-        numThornLevels( -1 ),
-        shrinkFactor( 0.9 )
+  public:
+    PrivateData()
+        : width( 0.2 )
+        , numThorns( 8 )
+        , numThornLevels( -1 )
+        , shrinkFactor( 0.9 )
     {
     }
@@ -49,11 +75,11 @@
    \param numThorns Number of thorns
    \param numThornLevels Number of thorn levels
-*/
+ */
 QwtSimpleCompassRose::QwtSimpleCompassRose(
     int numThorns, int numThornLevels )
 {
-    d_data = new PrivateData();
-    d_data->numThorns = numThorns;
-    d_data->numThornLevels = numThornLevels;
+    m_data = new PrivateData();
+    m_data->numThorns = numThorns;
+    m_data->numThornLevels = numThornLevels;
 
     const QColor dark( 128, 128, 255 );
@@ -70,26 +96,26 @@
 QwtSimpleCompassRose::~QwtSimpleCompassRose()
 {
-    delete d_data;
-}
-
-/*!
-  Set the Factor how to shrink the thorns with each level
-  The default value is 0.9.
-
-  \param factor Shrink factor
-  \sa shrinkFactor()
-*/
+    delete m_data;
+}
+
+/*!
+   Set the Factor how to shrink the thorns with each level
+   The default value is 0.9.
+
+   \param factor Shrink factor
+   \sa shrinkFactor()
+ */
 void QwtSimpleCompassRose::setShrinkFactor( double factor )
 {
-    d_data->shrinkFactor = factor;
-}
-
-/*!
-  \return Factor how to shrink the thorns with each level
-  \sa setShrinkFactor()
-*/
+    m_data->shrinkFactor = factor;
+}
+
+/*!
+   \return Factor how to shrink the thorns with each level
+   \sa setShrinkFactor()
+ */
 double QwtSimpleCompassRose::shrinkFactor() const
 {
-    return d_data->shrinkFactor;
+    return m_data->shrinkFactor;
 }
 
@@ -102,6 +128,6 @@
    \param north Position
    \param cg Color group
-*/
-void QwtSimpleCompassRose::draw( QPainter *painter, const QPointF &center,
+ */
+void QwtSimpleCompassRose::draw( QPainter* painter, const QPointF& center,
     double radius, double north, QPalette::ColorGroup cg ) const
 {
@@ -109,6 +135,6 @@
     pal.setCurrentColorGroup( cg );
 
-    drawRose( painter, pal, center, radius, north, d_data->width,
-        d_data->numThorns, d_data->numThornLevels, d_data->shrinkFactor );
+    drawRose( painter, pal, center, radius, north, m_data->width,
+        m_data->numThorns, m_data->numThornLevels, m_data->shrinkFactor );
 }
 
@@ -125,9 +151,9 @@
    \param numThornLevels Number of thorn levels
    \param shrinkFactor Factor to shrink the thorns with each level
-*/
+ */
 void QwtSimpleCompassRose::drawRose(
-    QPainter *painter,
-    const QPalette &palette,
-    const QPointF &center, double radius, double north, double width,
+    QPainter* painter,
+    const QPalette& palette,
+    const QPointF& center, double radius, double north, double width,
     int numThorns, int numThornLevels, double shrinkFactor )
 {
@@ -153,5 +179,5 @@
     for ( int j = 1; j <= numThornLevels; j++ )
     {
-        double step =  qPow( 2.0, j ) * M_PI / numThorns;
+        double step = std::pow( 2.0, j ) * M_PI / numThorns;
         if ( step > M_PI_2 )
             break;
@@ -203,31 +229,31 @@
 
    \param width Width
-*/
+ */
 void QwtSimpleCompassRose::setWidth( double width )
 {
-    d_data->width = width;
-    if ( d_data->width < 0.03 )
-        d_data->width = 0.03;
-
-    if ( d_data->width > 0.4 )
-        d_data->width = 0.4;
-}
-
-/*!
-  \return Width of the rose
-  \sa setWidth()
+    m_data->width = width;
+    if ( m_data->width < 0.03 )
+        m_data->width = 0.03;
+
+    if ( m_data->width > 0.4 )
+        m_data->width = 0.4;
+}
+
+/*!
+   \return Width of the rose
+   \sa setWidth()
  */
 double QwtSimpleCompassRose::width() const
 {
-    return d_data->width;
-}
-
-/*!
-  Set the number of thorns on one level
-  The number is aligned to a multiple of 4, with a minimum of 4
-
-  \param numThorns Number of thorns
-  \sa numThorns(), setNumThornLevels()
-*/
+    return m_data->width;
+}
+
+/*!
+   Set the number of thorns on one level
+   The number is aligned to a multiple of 4, with a minimum of 4
+
+   \param numThorns Number of thorns
+   \sa numThorns(), setNumThornLevels()
+ */
 void QwtSimpleCompassRose::setNumThorns( int numThorns )
 {
@@ -238,5 +264,5 @@
         numThorns += 4 - numThorns % 4;
 
-    d_data->numThorns = numThorns;
+    m_data->numThorns = numThorns;
 }
 
@@ -244,19 +270,19 @@
    \return Number of thorns
    \sa setNumThorns(), setNumThornLevels()
-*/
+ */
 int QwtSimpleCompassRose::numThorns() const
 {
-    return d_data->numThorns;
-}
-
-/*!
-  Set the of thorns levels
-
-  \param numThornLevels Number of thorns levels
-  \sa setNumThorns(), numThornLevels()
-*/
+    return m_data->numThorns;
+}
+
+/*!
+   Set the of thorns levels
+
+   \param numThornLevels Number of thorns levels
+   \sa setNumThorns(), numThornLevels()
+ */
 void QwtSimpleCompassRose::setNumThornLevels( int numThornLevels )
 {
-    d_data->numThornLevels = numThornLevels;
+    m_data->numThornLevels = numThornLevels;
 }
 
@@ -264,7 +290,7 @@
    \return Number of thorn levels
    \sa setNumThorns(), setNumThornLevels()
-*/
+ */
 int QwtSimpleCompassRose::numThornLevels() const
 {
-    return d_data->numThornLevels;
-}
+    return m_data->numThornLevels;
+}
