Index: trunk/BNC/qwt/qwt_plot_dict.cpp
===================================================================
--- trunk/BNC/qwt/qwt_plot_dict.cpp	(revision 9383)
+++ trunk/BNC/qwt/qwt_plot_dict.cpp	(revision 11158)
@@ -1,3 +1,3 @@
-/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
+/******************************************************************************
  * Qwt Widget Library
  * Copyright (C) 1997   Josef Wilgen
@@ -9,29 +9,30 @@
 
 #include "qwt_plot_dict.h"
+#include <algorithm>
 
 class QwtPlotDict::PrivateData
 {
-public:
+  public:
 
-    class ItemList: public QList<QwtPlotItem *>
+    class ItemList : public QList< QwtPlotItem* >
     {
-    public:
-        void insertItem( QwtPlotItem *item )
+      public:
+        void insertItem( QwtPlotItem* item )
         {
             if ( item == NULL )
                 return;
 
-            QList<QwtPlotItem *>::iterator it =
-                qUpperBound( begin(), end(), item, LessZThan() );
+            QList< QwtPlotItem* >::iterator it =
+                std::upper_bound( begin(), end(), item, LessZThan() );
             insert( it, item );
         }
 
-        void removeItem( QwtPlotItem *item )
+        void removeItem( QwtPlotItem* item )
         {
             if ( item == NULL )
                 return;
 
-            QList<QwtPlotItem *>::iterator it =
-                qLowerBound( begin(), end(), item, LessZThan() );
+            QList< QwtPlotItem* >::iterator it =
+                std::lower_bound( begin(), end(), item, LessZThan() );
 
             for ( ; it != end(); ++it )
@@ -44,10 +45,10 @@
             }
         }
-    private:
+      private:
         class LessZThan
         {
-        public:
-            inline bool operator()( const QwtPlotItem *item1,
-                const QwtPlotItem *item2 ) const
+          public:
+            inline bool operator()( const QwtPlotItem* item1,
+                const QwtPlotItem* item2 ) const
             {
                 return item1->z() < item2->z();
@@ -65,9 +66,9 @@
    Auto deletion is enabled.
    \sa setAutoDelete(), QwtPlotItem::attach()
-*/
+ */
 QwtPlotDict::QwtPlotDict()
 {
-    d_data = new QwtPlotDict::PrivateData;
-    d_data->autoDelete = true;
+    m_data = new QwtPlotDict::PrivateData;
+    m_data->autoDelete = true;
 }
 
@@ -77,9 +78,9 @@
    If autoDelete() is on, all attached items will be deleted
    \sa setAutoDelete(), autoDelete(), QwtPlotItem::attach()
-*/
+ */
 QwtPlotDict::~QwtPlotDict()
 {
-    detachItems( QwtPlotItem::Rtti_PlotItem, d_data->autoDelete );
-    delete d_data;
+    detachItems( QwtPlotItem::Rtti_PlotItem, m_data->autoDelete );
+    delete m_data;
 }
 
@@ -91,8 +92,8 @@
 
    \sa autoDelete(), insertItem()
-*/
+ */
 void QwtPlotDict::setAutoDelete( bool autoDelete )
 {
-    d_data->autoDelete = autoDelete;
+    m_data->autoDelete = autoDelete;
 }
 
@@ -100,30 +101,30 @@
    \return true if auto deletion is enabled
    \sa setAutoDelete(), insertItem()
-*/
+ */
 bool QwtPlotDict::autoDelete() const
 {
-    return d_data->autoDelete;
+    return m_data->autoDelete;
 }
 
 /*!
-  Insert a plot item
+   Insert a plot item
 
-  \param item PlotItem
-  \sa removeItem()
+   \param item PlotItem
+   \sa removeItem()
  */
-void QwtPlotDict::insertItem( QwtPlotItem *item )
+void QwtPlotDict::insertItem( QwtPlotItem* item )
 {
-    d_data->itemList.insertItem( item );
+    m_data->itemList.insertItem( item );
 }
 
 /*!
-  Remove a plot item
+   Remove a plot item
 
-  \param item PlotItem
-  \sa insertItem()
+   \param item PlotItem
+   \sa insertItem()
  */
-void QwtPlotDict::removeItem( QwtPlotItem *item )
+void QwtPlotDict::removeItem( QwtPlotItem* item )
 {
-    d_data->itemList.removeItem( item );
+    m_data->itemList.removeItem( item );
 }
 
@@ -134,12 +135,12 @@
                otherwise only those items of the type rtti.
    \param autoDelete If true, delete all detached items
-*/
+ */
 void QwtPlotDict::detachItems( int rtti, bool autoDelete )
 {
-    PrivateData::ItemList list = d_data->itemList;
+    PrivateData::ItemList list = m_data->itemList;
     QwtPlotItemIterator it = list.constBegin();
     while ( it != list.constEnd() )
     {
-        QwtPlotItem *item = *it;
+        QwtPlotItem* item = *it;
 
         ++it; // increment before removing item from the list
@@ -155,33 +156,33 @@
 
 /*!
-  \brief A QwtPlotItemList of all attached plot items.
+   \brief A QwtPlotItemList of all attached plot items.
 
-  Use caution when iterating these lists, as removing/detaching an item will
-  invalidate the iterator. Instead you can place pointers to objects to be
-  removed in a removal list, and traverse that list later.
+   Use caution when iterating these lists, as removing/detaching an item will
+   invalidate the iterator. Instead you can place pointers to objects to be
+   removed in a removal list, and traverse that list later.
 
-  \return List of all attached plot items.
-*/
-const QwtPlotItemList &QwtPlotDict::itemList() const
+   \return List of all attached plot items.
+ */
+const QwtPlotItemList& QwtPlotDict::itemList() const
 {
-    return d_data->itemList;
+    return m_data->itemList;
 }
 
 /*!
-  \return List of all attached plot items of a specific type.
-  \param rtti See QwtPlotItem::RttiValues
-  \sa QwtPlotItem::rtti()
-*/
+   \return List of all attached plot items of a specific type.
+   \param rtti See QwtPlotItem::RttiValues
+   \sa QwtPlotItem::rtti()
+ */
 QwtPlotItemList QwtPlotDict::itemList( int rtti ) const
 {
     if ( rtti == QwtPlotItem::Rtti_PlotItem )
-        return d_data->itemList;
+        return m_data->itemList;
 
     QwtPlotItemList items;
 
-    PrivateData::ItemList list = d_data->itemList;
+    PrivateData::ItemList list = m_data->itemList;
     for ( QwtPlotItemIterator it = list.constBegin(); it != list.constEnd(); ++it )
     {
-        QwtPlotItem *item = *it;
+        QwtPlotItem* item = *it;
         if ( item->rtti() == rtti )
             items += item;
