QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
geocoding
qgsgeocoderresult.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeocoderresult.cpp
3
---------------
4
Date : August 2020
5
Copyright : (C) 2020 by Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgsgeocoderresult.h
"
17
18
QgsGeocoderResult
QgsGeocoderResult::errorResult
(
const
QString &errorMessage )
19
{
20
QgsGeocoderResult
result;
21
result.mIsValid =
false
;
22
result.mErrorString = errorMessage;
23
return
result;
24
}
25
26
QgsGeocoderResult::QgsGeocoderResult
(
const
QString &
identifier
,
const
QgsGeometry
&
geometry
,
const
QgsCoordinateReferenceSystem
&
crs
)
27
: mIsValid( true )
28
, mIdentifier(
identifier
)
29
, mGeometry(
geometry
)
30
, mCrs(
crs
)
31
{}
32
33
QString
QgsGeocoderResult::group
()
const
34
{
35
return
mGroup;
36
}
37
38
void
QgsGeocoderResult::setGroup
(
const
QString &
group
)
39
{
40
mGroup =
group
;
41
}
42
43
QString
QgsGeocoderResult::description
()
const
44
{
45
return
mDescription;
46
}
47
48
void
QgsGeocoderResult::setDescription
(
const
QString &
description
)
49
{
50
mDescription =
description
;
51
}
52
53
QIcon
QgsGeocoderResult::icon
()
const
54
{
55
return
mIcon;
56
}
57
58
void
QgsGeocoderResult::setIcon
(
const
QIcon &
icon
)
59
{
60
mIcon =
icon
;
61
}
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsGeocoderResult::description
QString description() const
Returns the optional description for the result.
Definition
qgsgeocoderresult.cpp:43
QgsGeocoderResult::group
QString group() const
Returns the optional group value for the result.
Definition
qgsgeocoderresult.cpp:33
QgsGeocoderResult::QgsGeocoderResult
QgsGeocoderResult(const QString &identifier, const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs)
Constructor for a valid QgsGeocoderResult, with the specified geometry and crs.
Definition
qgsgeocoderresult.cpp:26
QgsGeocoderResult::identifier
QString identifier() const
Returns the identifier string for the result.
Definition
qgsgeocoderresult.h:68
QgsGeocoderResult::setDescription
void setDescription(const QString &description)
Sets an optional description for the result.
Definition
qgsgeocoderresult.cpp:48
QgsGeocoderResult::crs
QgsCoordinateReferenceSystem crs() const
Returns the coordinate reference system for the calculated geometry().
Definition
qgsgeocoderresult.h:98
QgsGeocoderResult::setGroup
void setGroup(const QString &group)
Sets the optional group value for the result.
Definition
qgsgeocoderresult.cpp:38
QgsGeocoderResult::geometry
QgsGeometry geometry() const
Returns the resultant geometry resulting from the geocoding operation.
Definition
qgsgeocoderresult.h:79
QgsGeocoderResult::errorResult
static QgsGeocoderResult errorResult(const QString &errorMessage)
Creates an invalid error result, with the specified errorMessage string.
Definition
qgsgeocoderresult.cpp:18
QgsGeocoderResult::icon
QIcon icon() const
Returns the optional icon for the result.
Definition
qgsgeocoderresult.cpp:53
QgsGeocoderResult::setIcon
void setIcon(const QIcon &icon)
Sets an optional icon for the result.
Definition
qgsgeocoderresult.cpp:58
QgsGeometry
A geometry is the spatial representation of a feature.
Definition
qgsgeometry.h:267
qgsgeocoderresult.h
Generated on
for QGIS API Documentation by
1.17.0