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 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.

Methods

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

changePersistentIndex

changePersistentIndexList

childEvent

columnCount

param parent:

connectNotify

createIndex

customEvent

data

param index:

decodeData

disconnectNotify

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

flags

param index:

index

param row:

index2node

Returns node for given index.

isSignalConnected

parent

param child:

persistentIndexList

receivers

resetInternalData

rowCount

param parent:

sender

senderSignalIndex

timerEvent

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:

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)