Subgroup: Locator
Class: QgsLocatorAutomaticModel¶
-
class
qgis.core.
QgsLocatorAutomaticModel
¶ Bases:
qgis._core.QgsLocatorModel
A QgsLocatorModel which has is associated directly with a
QgsLocator
, and is automatically populated with results from locator searches.Use this QgsLocatorModel subclass when you want the connections between a QgsLocator and the model to be automatically created for you. If more flexibility in model behavior is required, use the base QgsLocatorModel class instead and setup the connections manually.
Note that this class should generally be used with a
QgsLocatorProxyModel
in order to ensure correct sorting of results by priority and match level.New in version 3.0: Methods
addResult
Adds a new result
to the model.beginInsertColumns
beginInsertRows
beginMoveColumns
beginMoveRows
beginRemoveColumns
beginRemoveRows
beginResetModel
blockSignals
buddy
canDropMimeData
canFetchMore
changePersistentIndex
changePersistentIndexList
childEvent
children
clear
Resets the model and clears all existing results. columnCount
connectNotify
createContext
Returns a new locator context for searches. createIndex
customEvent
data
decodeData
deferredClear
Resets the model and clears all existing results after a short delay, or whenever the next result is added to the model (whichever occurs first). deleteLater
disconnect
disconnectNotify
dropMimeData
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
encodeData
endInsertColumns
endInsertRows
endMoveColumns
endMoveRows
endRemoveColumns
endRemoveRows
endResetModel
event
eventFilter
fetchMore
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] flags
hasChildren
hasIndex
headerData
index
inherits
insertColumn
insertColumns
insertRow
insertRows
installEventFilter
isSignalConnected
isWidgetType
isWindowType
itemData
killTimer
locator
Returns a pointer to the locator utilized by this model. match
metaObject
mimeData
mimeTypes
moveColumn
moveColumns
moveRow
moveRows
moveToThread
objectName
parent
persistentIndexList
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeColumn
removeColumns
removeEventFilter
removeRow
removeRows
resetInternalData
revert
roleNames
rowCount
search
Enqueues a search for a specified string
within the model.sender
senderSignalIndex
setData
setHeaderData
setItemData
setObjectName
setParent
setProperty
sibling
signalsBlocked
sort
span
startTimer
submit
supportedDragActions
supportedDropActions
thread
timerEvent
tr
Attributes
HorizontalSortHint
NoLayoutChangeHint
ResultDataRole
ResultFilterNameRole
ResultFilterPriorityRole
ResultScoreRole
ResultTypeRole
VerticalSortHint
columnsAboutToBeInserted
columnsAboutToBeInserted(self, QModelIndex, int, int) [signal] columnsAboutToBeMoved
columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsAboutToBeRemoved
columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal] columnsInserted
columnsInserted(self, QModelIndex, int, int) [signal] columnsMoved
columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsRemoved
columnsRemoved(self, QModelIndex, int, int) [signal] dataChanged
dataChanged(self, QModelIndex, QModelIndex, Iterable[int] = []) [signal] destroyed
destroyed(self, QObject = None) [signal] layoutAboutToBeChanged
layoutAboutToBeChanged(self, object = QList<QPersistentModelIndex>(), QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] layoutChanged
layoutChanged(self, Iterable[QPersistentModelIndex] = [], QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] modelAboutToBeReset
modelAboutToBeReset(self) [signal] modelReset
modelReset(self) [signal] objectNameChanged
objectNameChanged(self, str) [signal] rowsAboutToBeInserted
rowsAboutToBeInserted(self, QModelIndex, int, int) [signal] rowsAboutToBeMoved
rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsAboutToBeRemoved
rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal] rowsInserted
rowsInserted(self, QModelIndex, int, int) [signal] rowsMoved
rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsRemoved
rowsRemoved(self, QModelIndex, int, int) [signal] staticMetaObject
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
connectNotify
()¶
-
createContext
(self) → QgsLocatorContext¶ Returns a new locator context for searches. The default implementation returns a default constructed
QgsLocatorContext
. Subclasses can override this method to implement custom context creation logic.
-
createIndex
()¶
-
customEvent
()¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
isSignalConnected
()¶
-
locator
(self) → QgsLocator¶ Returns a pointer to the locator utilized by this model.
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
search
(self, string: str)¶ Enqueues a search for a specified
string
within the model.Note that the search may not begin immediately if an existing search request is still running. In this case the existing search must be completely terminated before the new search can begin. The model handles this situation automatically, and will trigger a search for the new search string as soon as possible.
-
sender
()¶
-
senderSignalIndex
()¶
-
timerEvent
()¶
-