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.

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

Metadata

Title

Abstract = 2
DataProviderName = 3
GeometryType = 4
Identifier = 0
Metadata = 256
class Roles

Bases: int

class Sections

Bases: int

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

Cancels the results fetching.

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

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