QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsLocatorModelBridge Class Reference

Provides the core functionality to be used in a locator widget. More...

#include <qgslocatormodelbridge.h>

Inheritance diagram for QgsLocatorModelBridge:

Public Slots

void invalidateResults ()
 This will invalidate current search results.
void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 This will call filters implementation of selection/deselection of results.
void updateCanvasCrs (const QgsCoordinateReferenceSystem &crs)
 Update the canvas CRS used to create search context.
void updateCanvasExtent (const QgsRectangle &extent)
 Update the canvas extent used to create search context.

Signals

void isRunningChanged ()
 Emitted when the running status changes.
void resultAdded ()
 Emitted when a result is added.
void resultsCleared ()
 Emitted when the results are cleared.

Public Member Functions

 QgsLocatorModelBridge (QObject *parent=nullptr)
 Constructor of QgsLocatorModelBridge.
 ~QgsLocatorModelBridge () override=default
bool hasQueueRequested () const
 Returns true if some text to be search is pending in the queue.
bool isRunning () const
 Returns true if the a search is currently running.
QgsLocatorlocator () const
 Returns the locator.
Q_INVOKABLE void performSearch (const QString &text)
 Perform a search.
Q_INVOKABLE QgsLocatorProxyModelproxyModel () const
 Returns the proxy model.
void setTransformContext (const QgsCoordinateTransformContext &context)
 Sets the coordinate transform context, which should be used whenever the locator constructs a coordinate transform.
QgsCoordinateTransformContext transformContext () const
 Returns the coordinate transform context, which should be used whenever the locator constructs a coordinate transform.
void triggerResult (const QModelIndex &index, const int actionId=-1)
 Triggers the result at given index and with optional actionId if an additional action was triggered.

Properties

bool isRunning

Detailed Description

Provides the core functionality to be used in a locator widget.

Since
QGIS 3.6

Definition at line 42 of file qgslocatormodelbridge.h.

Constructor & Destructor Documentation

◆ QgsLocatorModelBridge()

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

Constructor of QgsLocatorModelBridge.

Definition at line 28 of file qgslocatormodelbridge.cpp.

◆ ~QgsLocatorModelBridge()

QgsLocatorModelBridge::~QgsLocatorModelBridge ( )
overridedefault

Member Function Documentation

◆ hasQueueRequested()

bool QgsLocatorModelBridge::hasQueueRequested ( ) const

Returns true if some text to be search is pending in the queue.

Definition at line 162 of file qgslocatormodelbridge.cpp.

◆ invalidateResults

void QgsLocatorModelBridge::invalidateResults ( )
slot

This will invalidate current search results.

Definition at line 90 of file qgslocatormodelbridge.cpp.

◆ isRunning()

bool QgsLocatorModelBridge::isRunning ( ) const

Returns true if the a search is currently running.

Definition at line 40 of file qgslocatormodelbridge.cpp.

◆ isRunningChanged

void QgsLocatorModelBridge::isRunningChanged ( )
signal

Emitted when the running status changes.

◆ locator()

QgsLocator * QgsLocatorModelBridge::locator ( ) const

Returns the locator.

Definition at line 152 of file qgslocatormodelbridge.cpp.

◆ performSearch()

void QgsLocatorModelBridge::performSearch ( const QString & text)

Perform a search.

Definition at line 130 of file qgslocatormodelbridge.cpp.

◆ proxyModel()

QgsLocatorProxyModel * QgsLocatorModelBridge::proxyModel ( ) const

Returns the proxy model.

Definition at line 157 of file qgslocatormodelbridge.cpp.

◆ resultAdded

void QgsLocatorModelBridge::resultAdded ( )
signal

Emitted when a result is added.

◆ resultsCleared

void QgsLocatorModelBridge::resultsCleared ( )
signal

Emitted when the results are cleared.

◆ selectionChanged

void QgsLocatorModelBridge::selectionChanged ( const QItemSelection & selected,
const QItemSelection & deselected )
slot

This will call filters implementation of selection/deselection of results.

Since
QGIS 3.40

Definition at line 58 of file qgslocatormodelbridge.cpp.

◆ setTransformContext()

void QgsLocatorModelBridge::setTransformContext ( const QgsCoordinateTransformContext & context)
inline

Sets the coordinate transform context, which should be used whenever the locator constructs a coordinate transform.

See also
transformContext()
Since
QGIS 3.18

Definition at line 85 of file qgslocatormodelbridge.h.

◆ transformContext()

QgsCoordinateTransformContext QgsLocatorModelBridge::transformContext ( ) const
inline

Returns the coordinate transform context, which should be used whenever the locator constructs a coordinate transform.

See also
setTransformContext()
Since
QGIS 3.18

Definition at line 76 of file qgslocatormodelbridge.h.

◆ triggerResult()

void QgsLocatorModelBridge::triggerResult ( const QModelIndex & index,
const int actionId = -1 )

Triggers the result at given index and with optional actionId if an additional action was triggered.

Definition at line 45 of file qgslocatormodelbridge.cpp.

◆ updateCanvasCrs

void QgsLocatorModelBridge::updateCanvasCrs ( const QgsCoordinateReferenceSystem & crs)
slot

Update the canvas CRS used to create search context.

Definition at line 101 of file qgslocatormodelbridge.cpp.

◆ updateCanvasExtent

void QgsLocatorModelBridge::updateCanvasExtent ( const QgsRectangle & extent)
slot

Update the canvas extent used to create search context.

Definition at line 96 of file qgslocatormodelbridge.cpp.

Property Documentation

◆ isRunning

bool QgsLocatorModelBridge::isRunning
read

Definition at line 45 of file qgslocatormodelbridge.h.


The documentation for this class was generated from the following files: