Class: QgsHistoryEntryModel¶
- class qgis.gui.QgsHistoryEntryModel¶
Bases:
PyQt5.QtCore.QAbstractItemModel
An item model representing history entries in a hierarchical tree structure.
New 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 forQgsHistoryEntryModel
, with the specifiedparent
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.Methods
beginInsertColumns
beginInsertRows
beginMoveColumns
beginMoveRows
beginRemoveColumns
beginRemoveRows
changePersistentIndex
- param parent:
createIndex
- param index:
decodeData
- param index:
- param row:
Returns node for given index.
- param child:
- param parent:
- QgsHistoryEntryModel.beginInsertColumns(self, QModelIndex, int, int)
- QgsHistoryEntryModel.beginInsertRows(self, QModelIndex, int, int)
- QgsHistoryEntryModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
- QgsHistoryEntryModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
- QgsHistoryEntryModel.beginRemoveColumns(self, QModelIndex, int, int)
- QgsHistoryEntryModel.beginRemoveRows(self, QModelIndex, int, int)
- beginResetModel(self)¶
- QgsHistoryEntryModel.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)¶
- QgsHistoryEntryModel.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
- QgsHistoryEntryModel.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:
- 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)¶