Index: trunk/BNC/qwt/qwt_arrow_button.cpp
===================================================================
--- trunk/BNC/qwt/qwt_arrow_button.cpp	(revision 8127)
+++ trunk/BNC/qwt/qwt_arrow_button.cpp	(revision 11158)
@@ -1,3 +1,3 @@
-/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
+/******************************************************************************
  * Qwt Widget Library
  * Copyright (C) 1997   Josef Wilgen
@@ -9,10 +9,10 @@
 
 #include "qwt_arrow_button.h"
-#include "qwt_math.h"
+#include "qwt.h"
+
 #include <qpainter.h>
 #include <qstyle.h>
 #include <qstyleoption.h>
 #include <qevent.h>
-#include <qapplication.h>
 
 static const int MaxNum = 3;
@@ -22,5 +22,5 @@
 class QwtArrowButton::PrivateData
 {
-public:
+  public:
     int num;
     Qt::ArrowType arrowType;
@@ -30,5 +30,5 @@
 {
     QStyleOptionButton option;
-    option.init( btn );
+    option.initFrom( btn );
     option.features = QStyleOptionButton::None;
     if ( btn->isFlat() )
@@ -49,20 +49,19 @@
 
 /*!
-  \param num Number of arrows
-  \param arrowType see Qt::ArrowType in the Qt docs.
-  \param parent Parent widget
-*/
-QwtArrowButton::QwtArrowButton( int num,
-        Qt::ArrowType arrowType, QWidget *parent ):
-    QPushButton( parent )
-{
-    d_data = new PrivateData;
-    d_data->num = qBound( 1, num, MaxNum );
-    d_data->arrowType = arrowType;
+   \param num Number of arrows
+   \param arrowType see Qt::ArrowType in the Qt docs.
+   \param parent Parent widget
+ */
+QwtArrowButton::QwtArrowButton( int num, Qt::ArrowType arrowType, QWidget* parent )
+    : QPushButton( parent )
+{
+    m_data = new PrivateData;
+    m_data->num = qBound( 1, num, MaxNum );
+    m_data->arrowType = arrowType;
 
     setAutoRepeat( true );
     setAutoDefault( false );
 
-    switch ( d_data->arrowType )
+    switch ( m_data->arrowType )
     {
         case Qt::LeftArrow:
@@ -80,27 +79,27 @@
 QwtArrowButton::~QwtArrowButton()
 {
-    delete d_data;
-    d_data = NULL;
-}
-
-/*!
-  \brief The direction of the arrows
-*/
+    delete m_data;
+    m_data = NULL;
+}
+
+/*!
+   \brief The direction of the arrows
+ */
 Qt::ArrowType QwtArrowButton::arrowType() const
 {
-    return d_data->arrowType;
-}
-
-/*!
-  \brief The number of arrows
-*/
+    return m_data->arrowType;
+}
+
+/*!
+   \brief The number of arrows
+ */
 int QwtArrowButton::num() const
 {
-    return d_data->num;
-}
-
-/*!
-  \return the bounding rectangle for the label
-*/
+    return m_data->num;
+}
+
+/*!
+   \return the bounding rectangle for the label
+ */
 QRect QwtArrowButton::labelRect() const
 {
@@ -128,6 +127,6 @@
    Paint event handler
    \param event Paint event
-*/
-void QwtArrowButton::paintEvent( QPaintEvent *event )
+ */
+void QwtArrowButton::paintEvent( QPaintEvent* event )
 {
     QPushButton::paintEvent( event );
@@ -137,13 +136,13 @@
 
 /*!
-  \brief Draw the button label
-
-  \param painter Painter
-  \sa The Qt Manual for QPushButton
-*/
-void QwtArrowButton::drawButtonLabel( QPainter *painter )
-{
-    const bool isVertical = d_data->arrowType == Qt::UpArrow ||
-        d_data->arrowType == Qt::DownArrow;
+   \brief Draw the button label
+
+   \param painter Painter
+   \sa The Qt Manual for QPushButton
+ */
+void QwtArrowButton::drawButtonLabel( QPainter* painter )
+{
+    const bool isVertical = m_data->arrowType == Qt::UpArrow ||
+        m_data->arrowType == Qt::DownArrow;
 
     const QRect r = labelRect();
@@ -162,8 +161,8 @@
 
     QRect contentsSize; // aligned rect where to paint all arrows
-    if ( d_data->arrowType == Qt::LeftArrow || d_data->arrowType == Qt::RightArrow )
-    {
-        contentsSize.setWidth( d_data->num * arrow.width()
-            + ( d_data->num - 1 ) * Spacing );
+    if ( m_data->arrowType == Qt::LeftArrow || m_data->arrowType == Qt::RightArrow )
+    {
+        contentsSize.setWidth( m_data->num * arrow.width()
+            + ( m_data->num - 1 ) * Spacing );
         contentsSize.setHeight( arrow.height() );
     }
@@ -171,6 +170,6 @@
     {
         contentsSize.setWidth( arrow.width() );
-        contentsSize.setHeight( d_data->num * arrow.height()
-            + ( d_data->num - 1 ) * Spacing );
+        contentsSize.setHeight( m_data->num * arrow.height()
+            + ( m_data->num - 1 ) * Spacing );
     }
 
@@ -180,7 +179,7 @@
 
     painter->save();
-    for ( int i = 0; i < d_data->num; i++ )
-    {
-        drawArrow( painter, arrowRect, d_data->arrowType );
+    for ( int i = 0; i < m_data->num; i++ )
+    {
+        drawArrow( painter, arrowRect, m_data->arrowType );
 
         int dx = 0;
@@ -199,5 +198,5 @@
     {
         QStyleOptionFocusRect option;
-        option.init( this );
+        option.initFrom( this );
         option.backgroundColor = palette().color( QPalette::Window );
 
@@ -213,7 +212,7 @@
     \param r Rectangle where to paint the arrow
     \param arrowType Arrow type
-*/
-void QwtArrowButton::drawArrow( QPainter *painter,
-    const QRect &r, Qt::ArrowType arrowType ) const
+ */
+void QwtArrowButton::drawArrow( QPainter* painter,
+    const QRect& r, Qt::ArrowType arrowType ) const
 {
     QPolygon pa( 3 );
@@ -256,15 +255,15 @@
 
 /*!
-  \return a size hint
-*/
+   \return a size hint
+ */
 QSize QwtArrowButton::sizeHint() const
 {
     const QSize hint = minimumSizeHint();
-    return hint.expandedTo( QApplication::globalStrut() );
-}
-
-/*!
-  \brief Return a minimum size hint
-*/
+    return qwtExpandedToGlobalStrut( hint );
+}
+
+/*!
+   \brief Return a minimum size hint
+ */
 QSize QwtArrowButton::minimumSizeHint() const
 {
@@ -274,11 +273,11 @@
         2 * Margin + ( MaxNum - 1 ) * Spacing + MaxNum * asz.width(),
         2 * Margin + asz.height()
-    );
-
-    if ( d_data->arrowType == Qt::UpArrow || d_data->arrowType == Qt::DownArrow )
+        );
+
+    if ( m_data->arrowType == Qt::UpArrow || m_data->arrowType == Qt::DownArrow )
         sz.transpose();
 
     QStyleOption styleOption;
-    styleOption.init( this );
+    styleOption.initFrom( this );
 
     sz = style()->sizeFromContents( QStyle::CT_PushButton,
@@ -294,7 +293,7 @@
    \param boundingSize Bounding size
    \return Size of the arrow
-*/
+ */
 QSize QwtArrowButton::arrowSize( Qt::ArrowType arrowType,
-    const QSize &boundingSize ) const
+    const QSize& boundingSize ) const
 {
     QSize bs = boundingSize;
@@ -323,7 +322,7 @@
 
 /*!
-  \brief autoRepeat for the space keys
-*/
-void QwtArrowButton::keyPressEvent( QKeyEvent *event )
+   \brief autoRepeat for the space keys
+ */
+void QwtArrowButton::keyPressEvent( QKeyEvent* event )
 {
     if ( event->isAutoRepeat() && event->key() == Qt::Key_Space )
