QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Public Member Functions | List of all members
QgsRasterIdentifyResult Class Reference

Raster identify results container. More...

#include <qgsrasteridentifyresult.h>

Public Member Functions

 QgsRasterIdentifyResult ()=default
 Constructor for QgsRasterIdentifyResult. More...
 QgsRasterIdentifyResult (const QgsError &error)
 Constructor. More...
 QgsRasterIdentifyResult (QgsRaster::IdentifyFormat format, const QMap< int, QVariant > &results)
 Constructor. More...
virtual ~QgsRasterIdentifyResult ()=default
QgsError error () const
 Returns the last error. More...
QgsRaster::IdentifyFormat format () const
 Returns the results format. More...
bool isValid () const
 Returns true if valid. More...
QMap< QString, QVariant > params () const
 Gets map of optional parameters. More...
QMap< int, QVariant > results () const
 Returns the identify results. More...
void setError (const QgsError &error)
 Sets the last error. More...
void setParams (const QMap< QString, QVariant > &params)
 Sets map of optional parameters. More...

Detailed Description

Raster identify results container.

Definition at line 30 of file qgsrasteridentifyresult.h.

Constructor & Destructor Documentation

◆ QgsRasterIdentifyResult() [1/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( )

Constructor for QgsRasterIdentifyResult.

◆ QgsRasterIdentifyResult() [2/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( QgsRaster::IdentifyFormat  format,
const QMap< int, QVariant > &  results 


Creates valid result.

formatthe result format
resultsthe results

Definition at line 25 of file qgsrasteridentifyresult.cpp.

◆ QgsRasterIdentifyResult() [3/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( const QgsError error)


Creates invalid result with error.

errorthe error

Definition at line 32 of file qgsrasteridentifyresult.cpp.

◆ ~QgsRasterIdentifyResult()

virtual QgsRasterIdentifyResult::~QgsRasterIdentifyResult ( )

Member Function Documentation

◆ error()

QgsError QgsRasterIdentifyResult::error ( ) const

Returns the last error.

Definition at line 75 of file qgsrasteridentifyresult.h.

◆ format()

QgsRaster::IdentifyFormat QgsRasterIdentifyResult::format ( ) const

Returns the results format.

Definition at line 58 of file qgsrasteridentifyresult.h.

◆ isValid()

bool QgsRasterIdentifyResult::isValid ( ) const

Returns true if valid.

Definition at line 55 of file qgsrasteridentifyresult.h.

◆ params()

QMap<QString, QVariant> QgsRasterIdentifyResult::params ( ) const

Gets map of optional parameters.

Definition at line 72 of file qgsrasteridentifyresult.h.

◆ results()

QMap<int, QVariant> QgsRasterIdentifyResult::results ( ) const

Returns the identify results.

Results are different for each format: QgsRaster::IdentifyFormatValue: map of values for each band, keys are band numbers (from 1). QgsRaster::IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer (WMS) QgsRaster::IdentifyFormatHtml: map of HTML strings for each sublayer (WMS).

Definition at line 66 of file qgsrasteridentifyresult.h.

◆ setError()

void QgsRasterIdentifyResult::setError ( const QgsError error)

Sets the last error.

Definition at line 78 of file qgsrasteridentifyresult.h.

◆ setParams()

void QgsRasterIdentifyResult::setParams ( const QMap< QString, QVariant > &  params)

Sets map of optional parameters.

Definition at line 69 of file qgsrasteridentifyresult.h.

The documentation for this class was generated from the following files: