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
Returns
True
if some text to be search is pending in the queueThis will invalidate current search results
Returns
True
if the a search is currently runningReturns the locator
Perform a search
Returns the proxy model
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 optionalactionId
if an additional action was triggeredUpdate the canvas CRS used to create search context
Update the canvas extent used to create search context
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_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¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type
PYQT_SIGNAL
- isSignalConnected(self, QMetaMethod) bool ¶
- locator(self) QgsLocator ¶
Returns the locator
- Return type
- performSearch(self, text: str)¶
Perform a search
- Parameters
text (str) –
- proxyModel(self) QgsLocatorProxyModel ¶
Returns the proxy model
- Return type
- receivers(self, PYQT_SIGNAL) int ¶
- resultAdded¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type
PYQT_SIGNAL
- resultsCleared¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type
PYQT_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.See also
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.
See also
New in version 3.18.
- Return type
- triggerResult(self, index: QModelIndex, actionId: int = -1)¶
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)¶
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) –