Class: QgsLocatorModelBridge

class qgis.core.QgsLocatorModelBridge

Bases: PyQt5.QtCore.QObject

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

New in version 3.6.

QgsLocatorModelBridge(parent: QObject = None) Constructor of QgsLocatorModelBridge

Methods

childEvent

connectNotify

customEvent

disconnectNotify

hasQueueRequested

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

invalidateResults

This will invalidate current search results

isRunning

Returns True if the a search is currently running

isSignalConnected

locator

Returns the locator

performSearch

Perform a search

proxyModel

Returns the proxy model

receivers

sender

senderSignalIndex

setTransformContext

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

timerEvent

transformContext

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

triggerResult

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

updateCanvasCrs

Update the canvas CRS used to create search context

updateCanvasExtent

Update the canvas extent used to create search context

Signals

isRunningChanged

Emitted when the running status changes [signal]

resultAdded

Emitted when a result is added [signal]

resultsCleared

Emitted when the results are cleared [signal]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
hasQueueRequested(self)bool

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

Return type

bool

invalidateResults(self)

This will invalidate current search results

isRunning(self)bool

Returns True if the a search is currently running

Return type

bool

isRunningChanged

Emitted when the running status changes [signal]

isSignalConnected(self, QMetaMethod)bool
locator(self)QgsLocator

Returns the locator

Return type

QgsLocator

performSearch(self, text: str)

Perform a search

Parameters

text (str) –

proxyModel(self)QgsLocatorProxyModel

Returns the proxy model

Return type

QgsLocatorProxyModel

receivers(self, PYQT_SIGNAL)int
resultAdded

Emitted when a result is added [signal]

resultsCleared

Emitted when the results are cleared [signal]

sender(self)QObject
senderSignalIndex(self)int
setTransformContext(self, context: QgsCoordinateTransformContext)

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

New in version 3.18.

Parameters

context (QgsCoordinateTransformContext) –

timerEvent(self, QTimerEvent)
transformContext(self)QgsCoordinateTransformContext

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

New in version 3.18.

Return type

QgsCoordinateTransformContext

triggerResult(self, index: QModelIndex, actionId: int = - 1)

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

Parameters
  • index (QModelIndex) –

  • actionId (int = -1) –

updateCanvasCrs(self, crs: QgsCoordinateReferenceSystem)

Update the canvas CRS used to create search context

Parameters

crs (QgsCoordinateReferenceSystem) –

updateCanvasExtent(self, extent: QgsRectangle)

Update the canvas extent used to create search context

Parameters

extent (QgsRectangle) –