Skip to content
Permalink
Browse files
changed std::map to QMap in QgsRasterLayer::identify(), updated PyQGIS
git-svn-id: http://svn.osgeo.org/qgis/trunk@8443 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed May 15, 2008
1 parent 070879c commit 127b6567ded646447d21baba5f335f2b97c32f05
Showing with 7 additions and 7 deletions.
  1. +1 −2 python/core/qgsrasterlayer.sip
  2. +3 −3 src/app/qgsmaptoolidentify.cpp
  3. +1 −1 src/core/raster/qgsrasterlayer.cpp
  4. +2 −1 src/core/raster/qgsrasterlayer.h
@@ -78,8 +78,7 @@ public:
*
* \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
*
@@ -131,7 +131,7 @@ void QgsMapToolIdentify::identifyRasterLayer(QgsRasterLayer* layer, const QgsPoi
if (!layer)
return;

std::map<QString, QString> attributes;
QMap<QString, QString> attributes;
layer->identify(point, attributes);

if(!mResults)
@@ -152,10 +152,10 @@ void QgsMapToolIdentify::identifyRasterLayer(QgsRasterLayer* layer, const QgsPoi
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() );
@@ -4804,7 +4804,7 @@ bool QgsRasterLayer::readXML_( QDomNode & layer_node )



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();
@@ -128,6 +128,7 @@
#include <QDateTime>
#include <QVector>
#include <QList>
#include <QMap>

#include "qgis.h"
#include "qgspoint.h"
@@ -247,7 +248,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
*
* \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
*

0 comments on commit 127b656

Please sign in to comment.