QgsLocatorModelBridge class

The QgsLocatorModelBridge class provides the core functionality to be used in a locator widget.

Constructors, destructors, conversion operators

QgsLocatorModelBridge(QObject* parent = nullptr) explicit
Constructor of QgsLocatorModelBridge.

Public functions

auto hasQueueRequested() const -> bool
Returns true if some text to be search is pending in the queue.
auto isRunning() const -> bool
Returns true if the a search is currently running.
auto locator() const -> QgsLocator*
Returns the locator.
auto performSearch(const QString& text) -> Q_INVOKABLE void
Perform a search.
auto proxyModel() const -> Q_INVOKABLE QgsLocatorProxyModel*
Returns the proxy model.
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.

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 slots

void invalidateResults()
This will invalidate current search 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.