Class: QgsHistoryEntryModel

class qgis.gui.QgsHistoryEntryModel

Bases: PyQt5.QtCore.QAbstractItemModel

An item model representing history entries in a hierarchical tree structure.

Added in version 3.32.

QgsHistoryEntryModel(providerId: str = ‘’, backends: Union[Qgis.HistoryProviderBackends, Qgis.HistoryProviderBackend] = Qgis.HistoryProviderBackend.LocalProfile, registry: QgsHistoryProviderRegistry = None, context: QgsHistoryWidgetContext = QgsHistoryWidgetContext(), parent: QObject = None) Constructor for QgsHistoryEntryModel, with the specified parent object.

If providerId is specified then the model will contain only items from the matching history provider. If backends is specified then the model will be filtered to only matching backends.

If no registry is specified then the singleton QgsHistoryProviderRegistry from QgsGui.historyProviderRegistry() will be used.

beginInsertColumns(self, QModelIndex, int, int)
beginInsertRows(self, QModelIndex, int, int)
beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool
beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool
beginRemoveColumns(self, QModelIndex, int, int)
beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
columnCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex())

Return type:

int

connectNotify(self, QMetaMethod)
createIndex(self, int, int, object: object = 0) QModelIndex
customEvent(self, QEvent)
data(self, index: QModelIndex, role: int = Qt.DisplayRole) Any
Parameters:
  • index (QModelIndex)

  • role (int = Qt.DisplayRole)

Return type:

Any

decodeData(self, int, int, QModelIndex, QDataStream) bool
disconnectNotify(self, QMetaMethod)
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
flags(self, index: QModelIndex) Qt.ItemFlags
Parameters:

index (QModelIndex)

Return type:

Qt.ItemFlags

index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex
Parameters:
  • row (int)

  • column (int)

  • parent (QModelIndex = QModelIndex())

Return type:

QModelIndex

index2node(self, index: QModelIndex) QgsHistoryEntryNode

Returns node for given index. Returns root node for invalid index.

Parameters:

index (QModelIndex)

Return type:

QgsHistoryEntryNode

isSignalConnected(self, QMetaMethod) bool
parent(self, child: QModelIndex) QModelIndex
Parameters:

child (QModelIndex)

Return type:

QModelIndex

persistentIndexList(self) List[QModelIndex]
receivers(self, PYQT_SIGNAL) int
resetInternalData(self)
rowCount(self, parent: QModelIndex = QModelIndex()) int
Parameters:

parent (QModelIndex = QModelIndex())

Return type:

int

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)