QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
raster
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_core.h"
22
#include "
qgis_sip.h
"
23
#include "
qgserror.h
"
24
#include "
qgsraster.h
"
25
30
class
CORE_EXPORT
QgsRasterIdentifyResult
31
{
32
public
:
33
QgsRasterIdentifyResult
() =
default
;
34
40
QgsRasterIdentifyResult
(
Qgis::RasterIdentifyFormat
format
,
const
QMap<int, QVariant> &
results
);
41
46
QgsRasterIdentifyResult
(
const
QgsError
&
error
);
47
48
virtual
~QgsRasterIdentifyResult
() =
default
;
49
51
bool
isValid
()
const
{
return
mValid; }
52
54
Qgis::RasterIdentifyFormat
format
()
const
{
return
mFormat; }
55
63
QMap<int, QVariant>
results
()
const
{
return
mResults; }
64
66
void
setParams
(
const
QMap<QString, QVariant> &
params
) { mParams =
params
; }
67
69
QMap<QString, QVariant>
params
()
const
{
return
mParams; }
70
72
QgsError
error
()
const
{
return
mError; }
73
75
void
setError
(
const
QgsError
&
error
) { mError =
error
; }
76
77
private
:
79
bool
mValid =
false
;
80
82
Qgis::RasterIdentifyFormat
mFormat =
Qgis::RasterIdentifyFormat::Undefined
;
83
84
// TODO: better hierarchy (sublayer multiple feature sets)?
85
// TODO?: results are not consistent for different formats (per band x per sublayer)
86
88
QMap<int, QVariant> mResults;
89
91
QMap<QString, QVariant> mParams;
92
94
QgsError
mError;
95
};
96
97
#endif
Qgis::RasterIdentifyFormat
RasterIdentifyFormat
Raster identify formats.
Definition
qgis.h:5387
Qgis::RasterIdentifyFormat::Undefined
@ Undefined
Undefined.
Definition
qgis.h:5388
QgsError
A container for error messages.
Definition
qgserror.h:83
QgsRasterIdentifyResult::params
QMap< QString, QVariant > params() const
Gets map of optional parameters.
Definition
qgsrasteridentifyresult.h:69
QgsRasterIdentifyResult::setError
void setError(const QgsError &error)
Sets the last error.
Definition
qgsrasteridentifyresult.h:75
QgsRasterIdentifyResult::setParams
void setParams(const QMap< QString, QVariant > ¶ms)
Sets map of optional parameters.
Definition
qgsrasteridentifyresult.h:66
QgsRasterIdentifyResult::error
QgsError error() const
Returns the last error.
Definition
qgsrasteridentifyresult.h:72
QgsRasterIdentifyResult::isValid
bool isValid() const
Returns true if valid.
Definition
qgsrasteridentifyresult.h:51
QgsRasterIdentifyResult::results
QMap< int, QVariant > results() const
Returns the identify results.
Definition
qgsrasteridentifyresult.h:63
QgsRasterIdentifyResult::format
Qgis::RasterIdentifyFormat format() const
Returns the results format.
Definition
qgsrasteridentifyresult.h:54
QgsRasterIdentifyResult::~QgsRasterIdentifyResult
virtual ~QgsRasterIdentifyResult()=default
QgsRasterIdentifyResult::QgsRasterIdentifyResult
QgsRasterIdentifyResult()=default
qgis_sip.h
qgserror.h
qgsraster.h
Generated on
for QGIS API Documentation by
1.17.0