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
parent
object.If
providerId
is specified then the model will contain only items from the matching history provider. Ifbackends
is specified then the model will be filtered to only matching backends.If no
registry
is specified then the singletonQgsHistoryProviderRegistry
fromQgsGui.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]