QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
geocoding
qgsabstractgeocoderlocatorfilter.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsabstractgeocoderlocatorfilter.h
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
#ifndef QGSABSTRACTGEOCODERLOCATORFILTER_H
17
#define QGSABSTRACTGEOCODERLOCATORFILTER_H
18
19
#include "qgis_core.h"
20
#include "
qgslocatorfilter.h
"
21
22
class
QgsGeocoderInterface
;
23
class
QgsGeocoderResult
;
24
39
class
CORE_EXPORT
QgsAbstractGeocoderLocatorFilter
:
public
QgsLocatorFilter
SIP_ABSTRACT
40
{
41
Q_OBJECT
42
43
public
:
44
64
QgsAbstractGeocoderLocatorFilter
(
const
QString &name,
const
QString &displayName,
65
const
QString &prefix,
66
QgsGeocoderInterface
*geocoder,
67
const
QgsRectangle
&boundingBox =
QgsRectangle
() );
68
69
QString
name
()
const override
;
70
QString
displayName
()
const override
;
71
QString
prefix
()
const override
;
72
void
fetchResults
(
const
QString &
string
,
const
QgsLocatorContext
&context,
QgsFeedback
*feedback )
override
;
73
void
triggerResult
(
const
QgsLocatorResult
&result )
override
;
74
78
QgsGeocoderInterface
*geocoder()
const
;
79
83
const
QgsRectangle
boundingBox
() {
return
mBoundingBox; }
84
90
QgsGeocoderResult
locatorResultToGeocoderResult(
const
QgsLocatorResult
&result )
const
;
91
97
QgsLocatorResult
geocoderResultToLocatorResult(
const
QgsGeocoderResult
&result );
98
99
private
:
100
104
virtual
void
handleGeocodeResult(
const
QgsGeocoderResult
&result ) = 0;
105
106
QString mName;
107
QString mDisplayName;
108
QString mPrefix;
109
QgsGeocoderInterface
*mGeocoder =
nullptr
;
110
QgsRectangle
mBoundingBox;
111
112
};
113
114
#endif // QGSABSTRACTGEOCODERLOCATORFILTER_H
QgsLocatorFilter
Abstract base class for filters which collect locator results.
Definition:
qgslocatorfilter.h:152
QgsLocatorFilter::prefix
virtual QString prefix() const
Returns the search prefix character(s) for this filter.
Definition:
qgslocatorfilter.h:228
QgsLocatorFilter::name
virtual QString name() const =0
Returns the unique name for the filter.
QgsRectangle
A rectangle specified with double values.
Definition:
qgsrectangle.h:41
QgsLocatorResult
Encapsulates properties of an individual matching result found by a QgsLocatorFilter.
Definition:
qgslocatorfilter.h:38
QgsLocatorContext
Encapsulates the properties relating to the context of a locator search.
Definition:
qgslocatorcontext.h:32
QgsAbstractGeocoderLocatorFilter
An abstract base class which implements a locator filter populated from a QgsGeocoderInterface.
Definition:
qgsabstractgeocoderlocatorfilter.h:39
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition:
qgsfeedback.h:44
QgsLocatorFilter::displayName
virtual QString displayName() const =0
Returns a translated, user-friendly name for the filter.
QgsAbstractGeocoderLocatorFilter::boundingBox
const QgsRectangle boundingBox()
Returns the WGS84 bounding box attached to the filter.
Definition:
qgsabstractgeocoderlocatorfilter.h:83
QgsGeocoderResult
Represents a matching result from a geocoder search.
Definition:
qgsgeocoderresult.h:40
QgsLocatorFilter::fetchResults
virtual void fetchResults(const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback)=0
Retrieves the filter results for a specified search string.
QgsLocatorFilter::triggerResult
virtual void triggerResult(const QgsLocatorResult &result)=0
Triggers a filter result from this filter.
QgsGeocoderInterface
Interface for geocoders.
Definition:
qgsgeocoder.h:36
qgslocatorfilter.h
SIP_ABSTRACT
#define SIP_ABSTRACT
Definition:
qgis_sip.h:208
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17