Class: QgsLocatorModelBridge¶
Provides the core functionality to be used in a locator widget.
Added in version 3.6.
Class Hierarchy¶
Base classes¶
Methods
Returns |
|
This will invalidate current search results |
|
Returns |
|
Returns the locator |
|
Perform a search |
|
Returns the proxy model |
|
This will call filters implementation of selection/deselection of results |
|
Sets the coordinate transform context, which should be used whenever the locator constructs a coordinate transform. |
|
Returns the coordinate transform context, which should be used whenever the locator constructs a coordinate transform. |
|
Triggers the result at given index and with optional actionId if an additional action was triggered |
|
Update the canvas CRS used to create search context |
|
Update the canvas extent used to create search context |
Signals
Emitted when the running status changes |
|
Emitted when a result is added |
|
Emitted when the results are cleared |
- class qgis.core.QgsLocatorModelBridge[source]¶
Bases:
QObject
- __init__(parent: QObject | None = None)
Constructor of QgsLocatorModelBridge
- Parameters:
parent (Optional[QObject] = None)
- hasQueueRequested(self) bool [source]¶
Returns
True
if some text to be search is pending in the queue- Return type:
bool
- locator(self) QgsLocator | None [source]¶
Returns the locator
- Return type:
Optional[QgsLocator]
- proxyModel(self) QgsLocatorProxyModel | None [source]¶
Returns the proxy model
- Return type:
Optional[QgsLocatorProxyModel]
- selectionChanged(self, selected: QItemSelection, deselected: QItemSelection)[source]¶
This will call filters implementation of selection/deselection of results
Added in version 3.40.
- Parameters:
selected (QItemSelection)
deselected (QItemSelection)
- setTransformContext(self, context: QgsCoordinateTransformContext)[source]¶
Sets the coordinate transform
context
, which should be used whenever the locator constructs a coordinate transform.See also
Added in version 3.18.
- Parameters:
context (QgsCoordinateTransformContext)
- transformContext(self) QgsCoordinateTransformContext [source]¶
Returns the coordinate transform context, which should be used whenever the locator constructs a coordinate transform.
See also
Added in version 3.18.
- Return type:
- triggerResult(self, index: QModelIndex, actionId: int = -1)[source]¶
Triggers the result at given
index
and with optionalactionId
if an additional action was triggered- Parameters:
index (QModelIndex)
actionId (int = -1)
- updateCanvasCrs(self, crs: QgsCoordinateReferenceSystem)[source]¶
Update the canvas CRS used to create search context
- Parameters:
- updateCanvasExtent(self, extent: QgsRectangle)[source]¶
Update the canvas extent used to create search context
- Parameters:
extent (QgsRectangle)