QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsrasteridentifyresult.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasteridentifyresult.h
3  --------------------------------------
4  Date : Apr 8, 2013
5  Copyright : (C) 2013 by Radim Blazek
6  email : radim dot blazek at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSRASTERIDENTIFYRESULT_H
19 #define QGSRASTERIDENTIFYRESULT_H
20 
21 #include "qgis.h"
22 #include "qgslogger.h"
23 #include "qgsrasterdataprovider.h"
24 #include "qgsraster.h"
25 
29 class CORE_EXPORT QgsRasterIdentifyResult
30 {
31  public:
33 
39 
43  QgsRasterIdentifyResult( const QgsError& theError );
44 
45  virtual ~QgsRasterIdentifyResult();
46 
48  bool isValid() const { return mValid; }
49 
51  QgsRaster::IdentifyFormat format() const { return mFormat; }
52 
58  QMap<int, QVariant> results() const { return mResults; }
59 
61  void setParams( const QMap<QString, QVariant> & theParams ) { mParams = theParams; }
62 
64  QMap<QString, QVariant> params() const { return mParams; }
65 
67  QgsError error() const { return mError; }
68 
70  void setError( const QgsError & theError ) { mError = theError;}
71 
72  private:
74  bool mValid;
75 
78 
80  // TODO: better hierarchy (sublayer multiple feature sets)?
81  // TODO?: results are not consistent for different formats (per band x per sublayer)
82  QMap<int, QVariant> mResults;
83 
86 
88  QgsError mError;
89 };
90 
91 #endif
92 
93 
void setError(const QgsError &theError)
Set error.
IdentifyFormat
Definition: qgsraster.h:54
Raster identify results container.
bool isValid() const
Returns true if valid.
QMap< int, QVariant > results() const
Get results.
QgsRaster::IdentifyFormat format() const
Get results format.
void setParams(const QMap< QString, QVariant > &theParams)
Set map of optional parameters.
QgsError is container for error messages (report).
Definition: qgserror.h:80
QgsError error() const
Get error.
QMap< QString, QVariant > params() const
Get map of optional parameters.