Class: QgsHistoryEntryModel

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

Added in version 3.32.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsHistoryEntryModel

Base classes

QAbstractItemModel

QObject

Methods

index2node

Returns node for given index.

class qgis.gui.QgsHistoryEntryModel[source]

Bases: QAbstractItemModel

__init__(providerId: str | None = '', backends: Qgis.HistoryProviderBackends | Qgis.HistoryProviderBackend = Qgis.HistoryProviderBackend.LocalProfile, registry: QgsHistoryProviderRegistry | None = None, context: QgsHistoryWidgetContext = QgsHistoryWidgetContext(), parent: QObject | None = 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.

Parameters:
index2node(self, index: QModelIndex) QgsHistoryEntryNode | None[source]

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

Parameters:

index (QModelIndex)

Return type:

Optional[QgsHistoryEntryNode]