QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
|
An abstract base class which implements a locator filter populated from a QgsGeocoderInterface. More...
#include <qgsabstractgeocoderlocatorfilter.h>
Public Member Functions | |
QgsAbstractGeocoderLocatorFilter (const QString &name, const QString &displayName, const QString &prefix, QgsGeocoderInterface *geocoder) | |
Constructor for QgsAbstractGeocoderLocatorFilter. More... | |
QString | displayName () const override |
void | fetchResults (const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback) override |
QgsGeocoderInterface * | geocoder () const |
Returns the geocoder attached to the filter. More... | |
QgsLocatorResult | geocoderResultToLocatorResult (const QgsGeocoderResult &result) |
Converts a geocoder result to a locator result. More... | |
QgsGeocoderResult | locatorResultToGeocoderResult (const QgsLocatorResult &result) const |
Converts a locator result to a geocoder result. More... | |
QString | name () const override |
QString | prefix () const override |
void | triggerResult (const QgsLocatorResult &result) override |
An abstract base class which implements a locator filter populated from a QgsGeocoderInterface.
This base class implements the required logic to bridge a class which implements the QgsGeocoderInterface interface to a QgsLocatorFilter. It allows easy creation of a locator filter from a geocoder.
Definition at line 39 of file qgsabstractgeocoderlocatorfilter.h.
QgsAbstractGeocoderLocatorFilter::QgsAbstractGeocoderLocatorFilter | ( | const QString & | name, |
const QString & | displayName, | ||
const QString & | prefix, | ||
QgsGeocoderInterface * | geocoder | ||
) |
Constructor for QgsAbstractGeocoderLocatorFilter.
The name argument specifies a unique name for the filter. This should be an untranslated string identifying the filter.
The displayName argument must specify a translated, user-friendly name for the filter.
The prefix argument specifies the prefix character(s) for this filter. Prefixing a search with these characters will restrict the locator search to only include results from this filter. The prefix must consist of at least three characters.
The geocoder must specify an instance of a class which implements the QgsGeocoderInterface interface. Ownership of geocoder is not transferred, and the caller must ensure that geocoder exists for the lifetime of this filter.
Definition at line 20 of file qgsabstractgeocoderlocatorfilter.cpp.
|
override |
Definition at line 34 of file qgsabstractgeocoderlocatorfilter.cpp.
|
override |
Definition at line 44 of file qgsabstractgeocoderlocatorfilter.cpp.
QgsGeocoderInterface * QgsAbstractGeocoderLocatorFilter::geocoder | ( | ) | const |
Returns the geocoder attached to the filter.
Definition at line 67 of file qgsabstractgeocoderlocatorfilter.cpp.
QgsLocatorResult QgsAbstractGeocoderLocatorFilter::geocoderResultToLocatorResult | ( | const QgsGeocoderResult & | result | ) |
Converts a geocoder result to a locator result.
Definition at line 85 of file qgsabstractgeocoderlocatorfilter.cpp.
QgsGeocoderResult QgsAbstractGeocoderLocatorFilter::locatorResultToGeocoderResult | ( | const QgsLocatorResult & | result | ) | const |
Converts a locator result to a geocoder result.
Definition at line 72 of file qgsabstractgeocoderlocatorfilter.cpp.
|
override |
Definition at line 29 of file qgsabstractgeocoderlocatorfilter.cpp.
|
override |
Definition at line 39 of file qgsabstractgeocoderlocatorfilter.cpp.
|
override |
Definition at line 61 of file qgsabstractgeocoderlocatorfilter.cpp.