QGIS/python/core/raster/qgsrasteridentifyresult.sip

48 lines
1.4 KiB
Plaintext
Raw Normal View History

2013-04-08 18:25:44 +02:00
class QgsRasterIdentifyResult
{
%TypeHeaderCode
#include <qgsrasteridentifyresult.h>
%End
public:
QgsRasterIdentifyResult();
2014-01-27 09:22:24 +01:00
/** \brief Constructor. Creates valid result.
* @param theFormat the result format
* @param theResults the results
*/
QgsRasterIdentifyResult( QgsRaster::IdentifyFormat theFormat, QMap<int, QVariant> theResults );
2013-04-08 18:25:44 +02:00
2014-01-27 09:22:24 +01:00
/** \brief Constructor. Creates invalid result with error.
* @param theError the error
*/
2013-04-08 18:25:44 +02:00
QgsRasterIdentifyResult( QgsError theError );
virtual ~QgsRasterIdentifyResult();
2014-01-27 09:22:24 +01:00
/** \brief Returns true if valid */
2013-04-08 18:25:44 +02:00
bool isValid() const;
2014-01-27 09:22:24 +01:00
/** \brief Get results format */
QgsRaster::IdentifyFormat format() const;
2013-04-08 18:25:44 +02:00
2014-01-27 09:22:24 +01:00
/** \brief 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).
*/
2013-04-08 18:25:44 +02:00
QMap<int, QVariant> results() const;
2014-01-27 09:22:24 +01:00
/** Set map of optional parameters */
2013-04-08 18:25:44 +02:00
void setParams( const QMap<QString, QVariant> & theParams );
2014-01-27 09:22:24 +01:00
/** Get map of optional parameters */
2013-04-08 18:25:44 +02:00
QMap<QString, QVariant> params() const;
2014-01-27 09:22:24 +01:00
/** \brief Get error */
2013-04-08 18:25:44 +02:00
QgsError error() const;
2014-01-27 09:22:24 +01:00
/** \brief Set error */
2013-04-08 18:25:44 +02:00
void setError( const QgsError & theError );
};