Skip to content

Class QfLocatorFilter

ClassList > QfLocatorFilter

More...

  • #include <qflocatorfilter.h>

Inherits the following classes: QgsLocatorFilter

Public Properties

Type Name
property int delay
property QString description
property QString displayName
property QfLocatorModelSuperBridge * locatorBridge
property QString name
property QVariantMap parameters
property QString prefix
property QUrl source

Public Signals

Type Name
signal void delayChanged
Emitted when the fetch result delay has changed.
signal void descriptionChanged
Emitted when the description has changed.
signal void displayNameChanged
Emitted when the display name has changed.
signal void locatorBridgeChanged
Emitted when the locator bridge has changed.
signal void nameChanged
Emitted when the name has changed.
signal void parametersChanged
Emitted when the parameters object has changed.
signal void prefixChanged
Emitted when the prefix has changed.
signal void sourceChanged
Emitted when the source has changed.

Public Functions

Type Name
QfLocatorFilter (QObject * parent=nullptr)
QfLocatorFilter * clone () override const
Clone the locator filter.
int delay () const
Returns the delay before which the fetching of results is triggered.
QString description () override const
QString displayName () override const
void fetchResults (const QString & string, const QgsLocatorContext & context, QgsFeedback * feedback) override
QfLocatorModelSuperBridge * locatorBridge () const
QString name () override const
QVariantMap parameters () const
QString prefix () override const
Priority priority () override const
void setDelay (int delay)
Sets the delay before which the fetching of results is triggered.
void setDescription (const QString & description)
void setDisplayName (const QString & displayName)
void setLocatorBridge (QfLocatorModelSuperBridge * locatorBridge)
void setName (const QString & name)
void setParameters (const QVariantMap & parameters)
void setPrefix (const QString & prefix)
void setSource (const QUrl & source)
QUrl source () const
void triggerResult (const QgsLocatorResult & result) override
void triggerResultFromAction (const QgsLocatorResult & result, const int actionId) override

Detailed Description

QfLocatorFilter is a locator filter item for QField plugins to integrate with locator searches.

Public Properties Documentation

property delay [1/2]

int QfLocatorFilter::delay;

property description [1/2]

QString QfLocatorFilter::description;

property displayName [1/2]

QString QfLocatorFilter::displayName;

property locatorBridge [1/2]

QfLocatorModelSuperBridge * QfLocatorFilter::locatorBridge;

property name [1/2]

QString QfLocatorFilter::name;

property parameters [1/2]

QVariantMap QfLocatorFilter::parameters;

property prefix [1/2]

QString QfLocatorFilter::prefix;

property source [1/2]

QUrl QfLocatorFilter::source;

Public Signals Documentation

signal delayChanged

Emitted when the fetch result delay has changed.

void QfLocatorFilter::delayChanged;


signal descriptionChanged

Emitted when the description has changed.

void QfLocatorFilter::descriptionChanged;


signal displayNameChanged

Emitted when the display name has changed.

void QfLocatorFilter::displayNameChanged;


signal locatorBridgeChanged

Emitted when the locator bridge has changed.

void QfLocatorFilter::locatorBridgeChanged;


signal nameChanged

Emitted when the name has changed.

void QfLocatorFilter::nameChanged;


signal parametersChanged

Emitted when the parameters object has changed.

void QfLocatorFilter::parametersChanged;


signal prefixChanged

Emitted when the prefix has changed.

void QfLocatorFilter::prefixChanged;


signal sourceChanged

Emitted when the source has changed.

void QfLocatorFilter::sourceChanged;


Public Functions Documentation

function QfLocatorFilter

explicit QfLocatorFilter::QfLocatorFilter (
    QObject * parent=nullptr
) 

function clone

Clone the locator filter.

QfLocatorFilter * QfLocatorFilter::clone () override const


function delay [2/2]

Returns the delay before which the fetching of results is triggered.

inline int QfLocatorFilter::delay () const


function description [2/2]

inline QString QfLocatorFilter::description () override const

function displayName [2/2]

inline QString QfLocatorFilter::displayName () override const

function fetchResults

void QfLocatorFilter::fetchResults (
    const QString & string,
    const QgsLocatorContext & context,
    QgsFeedback * feedback
) override

function locatorBridge [2/2]

inline QfLocatorModelSuperBridge * QfLocatorFilter::locatorBridge () const

Returns the locator bridge object.


function name [2/2]

inline QString QfLocatorFilter::name () override const

function parameters [2/2]

inline QVariantMap QfLocatorFilter::parameters () const

Returns additional locator filter parameters which will possed onto the source QML that will process the locator filter results.


function prefix [2/2]

inline QString QfLocatorFilter::prefix () override const

function priority

inline Priority QfLocatorFilter::priority () override const

function setDelay

Sets the delay before which the fetching of results is triggered.

void QfLocatorFilter::setDelay (
    int delay
) 


function setDescription

void QfLocatorFilter::setDescription (
    const QString & description
) 

Sets a description for the filter.


function setDisplayName

void QfLocatorFilter::setDisplayName (
    const QString & displayName
) 

Sets a translated, user-friendly name for the filter.


function setLocatorBridge

void QfLocatorFilter::setLocatorBridge (
    QfLocatorModelSuperBridge * locatorBridge
) 

Sets the locator bridge object.


function setName

void QfLocatorFilter::setName (
    const QString & name
) 

Sets the unique name of the filter. This should be an untranslated string identifying the filter.


function setParameters

void QfLocatorFilter::setParameters (
    const QVariantMap & parameters
) 

Sets additional locator filter parameters which will possed onto the source QML that will process the locator filter results.


function setPrefix

void QfLocatorFilter::setPrefix (
    const QString & prefix
) 

Sets the search prefix character(s) for this filter. Prefix a search with these characters will restrict the locator search to only include results from this filter.

Note:

The prefix must be >= 3 characters otherwise it will be ignored.


function setSource

void QfLocatorFilter::setSource (
    const QUrl & source
) 

Setsthe source QML file which will process the locator filter results.


function source [2/2]

inline QUrl QfLocatorFilter::source () const

Returns the source QML file which will process the locator filter results.


function triggerResult

void QfLocatorFilter::triggerResult (
    const QgsLocatorResult & result
) override

function triggerResultFromAction

void QfLocatorFilter::triggerResultFromAction (
    const QgsLocatorResult & result,
    const int actionId
) override


The documentation for this class was generated from the following file src/core/locator/qflocatorfilter.h