Class: QgsLayerMetadataResultsModel

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

Added in version 3.28.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLayerMetadataResultsModel

Base classes

QAbstractTableModel

QAbstractItemModel

QObject

class qgis.gui.QgsLayerMetadataResultsModel[source]

Bases: QAbstractTableModel

__init__(searchContext: QgsMetadataSearchContext, parent: QObject | None = None)

Constructs a QgsLayerMetadataResultsModel from a searchContext and an optional parent.

Parameters:
Abstract = 2
class CustomRole(*values)

Bases: IntEnum

The Roles enum represents the user roles for the model.

Note

Prior to QGIS 3.36 this was available as QgsLayerMetadataResultsModel.Roles

Added in version 3.36.

  • Metadata: Layer metadata role

DataProviderName = 3
GeometryType = 4
Identifier = 0
Roles

alias of CustomRole

class Sections

Bases: int

Title = 1
cancel(self)[source]

Cancels the results fetching.

signal progressChanged[source]

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.

reload(self)[source]

Load/Reload model data synchronously.

reloadAsync(self)[source]

Load/Reload model data asynchronously using threads.

resultsReady(self, results: QgsLayerMetadataSearchResults)[source]

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

Parameters:

results (QgsLayerMetadataSearchResults)