Class: QgsHistoryEntryModel¶
An item model representing history entries in a hierarchical tree structure.
Added in version 3.32.
Class Hierarchy¶
Base classes¶
Methods
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
parentobject.If
providerIdis specified then the model will contain only items from the matching history provider. Ifbackendsis specified then the model will be filtered to only matching backends.If no
registryis specified then the singletonQgsHistoryProviderRegistryfromQgsGui.historyProviderRegistry()will be used.- Parameters:
providerId (Optional[str] = '')
backends (Union[Qgis.HistoryProviderBackends, Qgis.HistoryProviderBackend] = Qgis.HistoryProviderBackend.LocalProfile)
registry (Optional[QgsHistoryProviderRegistry] = None)
context (
QgsHistoryWidgetContext= QgsHistoryWidgetContext())parent (Optional[QObject] = None)
- 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]