[QGIS Commit] r8443 - in trunk/qgis: python/core src/app src/core/raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu May 15 12:50:00 EDT 2008


Author: wonder
Date: 2008-05-15 12:50:00 -0400 (Thu, 15 May 2008)
New Revision: 8443

Modified:
   trunk/qgis/python/core/qgsrasterlayer.sip
   trunk/qgis/src/app/qgsmaptoolidentify.cpp
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
   trunk/qgis/src/core/raster/qgsrasterlayer.h
Log:
changed std::map to QMap in QgsRasterLayer::identify(), updated PyQGIS


Modified: trunk/qgis/python/core/qgsrasterlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterlayer.sip	2008-05-15 13:15:09 UTC (rev 8442)
+++ trunk/qgis/python/core/qgsrasterlayer.sip	2008-05-15 16:50:00 UTC (rev 8443)
@@ -78,8 +78,7 @@
      *
      * \param point[in]  a coordinate in the CRS of this layer.
      */
-    // TODO: wrap
-    //void identify(const QgsPoint & point, std::map<QString,QString>& results);
+    void identify(const QgsPoint & point, QMap<QString,QString>& results /Out/);
 
     /** \brief Identify arbitrary details from the WMS server found on the point position
      *

Modified: trunk/qgis/src/app/qgsmaptoolidentify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.cpp	2008-05-15 13:15:09 UTC (rev 8442)
+++ trunk/qgis/src/app/qgsmaptoolidentify.cpp	2008-05-15 16:50:00 UTC (rev 8443)
@@ -131,7 +131,7 @@
   if (!layer)
     return;
   
-  std::map<QString, QString> attributes;
+  QMap<QString, QString> attributes;
   layer->identify(point, attributes);
   
   if(!mResults)
@@ -152,10 +152,10 @@
   mResults->setTitle( layer->name() );
   mResults->setColumnText ( 0, QObject::tr("Band") );
 
-  std::map<QString, QString>::iterator it;
+  QMap<QString, QString>::iterator it;
   for (it = attributes.begin(); it != attributes.end(); it++)
   {
-    mResults->addAttribute(it->first, it->second);
+    mResults->addAttribute(it.key(), it.value());
   }
 
   mResults->addAttribute( tr("(clicked coordinate)"), point.stringRep() );

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-05-15 13:15:09 UTC (rev 8442)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2008-05-15 16:50:00 UTC (rev 8443)
@@ -4804,7 +4804,7 @@
 
 
 
-void QgsRasterLayer::identify(const QgsPoint& point, std::map<QString,QString>& results)
+void QgsRasterLayer::identify(const QgsPoint& point, QMap<QString,QString>& results)
 {
   double x = point.x();
   double y = point.y();

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h	2008-05-15 13:15:09 UTC (rev 8442)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h	2008-05-15 16:50:00 UTC (rev 8443)
@@ -128,6 +128,7 @@
 #include <QDateTime>
 #include <QVector>
 #include <QList>
+#include <QMap>
 
 #include "qgis.h"
 #include "qgspoint.h"
@@ -247,7 +248,7 @@
      *
      * \param point[in]  a coordinate in the CRS of this layer.
      */
-    void identify(const QgsPoint & point, std::map<QString,QString>& results);
+    void identify(const QgsPoint & point, QMap<QString,QString>& results);
 
     /** \brief Identify arbitrary details from the WMS server found on the point position
      *



More information about the QGIS-commit mailing list