QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsRasterIdentifyResult Class Reference

Raster identify results container. More...

#include <qgsrasteridentifyresult.h>

Public Member Functions

 QgsRasterIdentifyResult ()
 
 QgsRasterIdentifyResult (QgsRaster::IdentifyFormat theFormat, const QMap< int, QVariant > &theResults)
 Constructor. More...
 
 QgsRasterIdentifyResult (const QgsError &theError)
 Constructor. More...
 
virtual ~QgsRasterIdentifyResult ()
 
QgsError error () const
 Get error. More...
 
QgsRaster::IdentifyFormat format () const
 Get results format. More...
 
bool isValid () const
 Returns true if valid. More...
 
QMap< QString, QVariantparams () const
 Get map of optional parameters. More...
 
QMap< int, QVariantresults () const
 Get results. More...
 
void setError (const QgsError &theError)
 Set error. More...
 
void setParams (const QMap< QString, QVariant > &theParams)
 Set map of optional parameters. More...
 

Detailed Description

Raster identify results container.

Definition at line 29 of file qgsrasteridentifyresult.h.

Constructor & Destructor Documentation

◆ QgsRasterIdentifyResult() [1/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( )

Definition at line 25 of file qgsrasteridentifyresult.cpp.

◆ QgsRasterIdentifyResult() [2/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( QgsRaster::IdentifyFormat  theFormat,
const QMap< int, QVariant > &  theResults 
)

Constructor.

Creates valid result.

Parameters
theFormatthe result format
theResultsthe results

Definition at line 31 of file qgsrasteridentifyresult.cpp.

◆ QgsRasterIdentifyResult() [3/3]

QgsRasterIdentifyResult::QgsRasterIdentifyResult ( const QgsError theError)

Constructor.

Creates invalid result with error.

Parameters
theErrorthe error

Definition at line 38 of file qgsrasteridentifyresult.cpp.

◆ ~QgsRasterIdentifyResult()

QgsRasterIdentifyResult::~QgsRasterIdentifyResult ( )
virtual

Definition at line 45 of file qgsrasteridentifyresult.cpp.

Member Function Documentation

◆ error()

QgsError QgsRasterIdentifyResult::error ( ) const
inline

Get error.

Definition at line 67 of file qgsrasteridentifyresult.h.

◆ format()

QgsRaster::IdentifyFormat QgsRasterIdentifyResult::format ( ) const
inline

Get results format.

Definition at line 51 of file qgsrasteridentifyresult.h.

◆ isValid()

bool QgsRasterIdentifyResult::isValid ( ) const
inline

Returns true if valid.

Definition at line 48 of file qgsrasteridentifyresult.h.

◆ params()

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

Get map of optional parameters.

Definition at line 64 of file qgsrasteridentifyresult.h.

◆ results()

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

Get 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 58 of file qgsrasteridentifyresult.h.

◆ setError()

void QgsRasterIdentifyResult::setError ( const QgsError theError)
inline

Set error.

Definition at line 70 of file qgsrasteridentifyresult.h.

◆ setParams()

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

Set map of optional parameters.

Definition at line 61 of file qgsrasteridentifyresult.h.


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