Class: QgsLocatorModel¶
-
class
qgis.core.
QgsLocatorModel
(parent: QObject = None)¶ Bases:
PyQt5.QtCore.QAbstractTableModel
Constructor for QgsLocatorModel.
An abstract list model for displaying the results of locator searches.
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: Enums
Methods
Adds a new
result
to the model.Resets the model and clears all existing results.
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).
Signals
Attributes
-
NoGroup
= 9999¶
-
ResultActionsRole
= 263¶
-
ResultDataRole
= 257¶
-
ResultFilterGroupSortingRole
= 262¶
-
ResultFilterNameRole
= 261¶
-
ResultFilterPriorityRole
= 259¶
-
ResultScoreRole
= 260¶
-
ResultTypeRole
= 258¶
-
class
Role
¶ Bases:
int
-
addResult
(self, result: QgsLocatorResult)¶ Adds a new
result
to the model.
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
clear
(self)¶ Resets the model and clears all existing results.
See also
-
columnCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
connectNotify
()¶
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any¶
-
decodeData
()¶
-
deferredClear
(self)¶ 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). Using deferredClear() instead of clear() can avoid the visually distracting frequent clears which may occur if the model is being updated quickly multiple times as a result of users typing in a search query.
See also
-
disconnectNotify
()¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶
-
isSignalConnected
()¶
-
persistentIndexList
()¶
-
receivers
()¶
-
resetInternalData
()¶
-
roleNames
(self) → Dict[int, QByteArray]¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
timerEvent
()¶
-