Class: QgsLayerMetadataResultsModel

class qgis.gui.QgsLayerMetadataResultsModel

Bases: PyQt5.QtCore.QAbstractTableModel

The QgsLayerMetadataResultsModel class handles the metadata fetching from the registered layer metadata providers.

New in version 3.28.

QgsLayerMetadataResultsModel(searchContext: QgsMetadataSearchContext, parent: QObject = None) Constructs a QgsLayerMetadataResultsModel from a searchContext and an optional parent.

Enums

CustomRole

Bases: enum.IntEnum

Roles

alias of CustomRole

Methods

beginInsertColumns

beginInsertRows

beginMoveColumns

beginMoveRows

beginRemoveColumns

beginRemoveRows

beginResetModel

cancel

Cancels the results fetching.

changePersistentIndex

changePersistentIndexList

childEvent

columnCount

param parent:

connectNotify

createIndex

customEvent

data

param index:

decodeData

disconnectNotify

encodeData

endInsertColumns

endInsertRows

endMoveColumns

endMoveRows

endRemoveColumns

endRemoveRows

endResetModel

headerData

param section:

isSignalConnected

persistentIndexList

receivers

reload

Load/Reload model data synchronously.

reloadAsync

Load/Reload model data asynchronously using threads.

resetInternalData

resultsReady

Triggered when metadata results have been fetched and can be added to the model.

rowCount

param parent:

sender

senderSignalIndex

timerEvent

Signals

progressChanged

pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL

Attributes

Abstract

DataProviderName

GeometryType

Identifier

Title

Abstract = 2
class CustomRole(value)

Bases: enum.IntEnum

The Roles enum represents the user roles for the model.

Note

Prior to QGIS 3.36 this was available as QgsLayerMetadataResultsModel.Roles

New in version 3.36.

  • Metadata: Layer metadata role

baseClass

alias of QgsLayerMetadataResultsModel

DataProviderName = 3
GeometryType = 4
Identifier = 0
Roles

alias of CustomRole

class Sections

Bases: int

Title = 1
beginInsertColumns(self, QModelIndex, int, int)
beginInsertRows(self, QModelIndex, int, int)
beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool
beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool
beginRemoveColumns(self, QModelIndex, int, int)
beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
cancel(self)

Cancels the results fetching.

changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
childEvent(self, QChildEvent)
columnCount(self, parent: QModelIndex) int
Parameters:

parent (QModelIndex) –

Return type:

int

connectNotify(self, QMetaMethod)
createIndex(self, int, int, object: object = 0) QModelIndex
customEvent(self, QEvent)
data(self, index: QModelIndex, role: int) Any
Parameters:
  • index (QModelIndex) –

  • role (int) –

Return type:

Any

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)
headerData(self, section: int, orientation: Qt.Orientation, role: int) Any
Parameters:
  • section (int) –

  • orientation (Qt.Orientation) –

  • role (int) –

Return type:

Any

isSignalConnected(self, QMetaMethod) bool
persistentIndexList(self) List[QModelIndex]
progressChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Parameters:
  • name (str = ...) –

  • revision (int = ...) –

  • arguments (Sequence = ...) –

Return type:

PYQT_SIGNAL

receivers(self, PYQT_SIGNAL) int
reload(self)

Load/Reload model data synchronously.

reloadAsync(self)

Load/Reload model data asynchronously using threads.

resetInternalData(self)
resultsReady(self, results: QgsLayerMetadataSearchResults)

Triggered when metadata results have been fetched and can be added to the model.

Parameters:

results (QgsLayerMetadataSearchResults) –

rowCount(self, parent: QModelIndex) int
Parameters:

parent (QModelIndex) –

Return type:

int

sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)