Class: QgsLayerMetadataResultsModel

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

Added in version 3.28.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsLayerMetadataResultsModel

Base classes

QAbstractTableModel

QAbstractItemModel

QObject

Enums

CustomRole

The Roles enum represents the user roles for the model.

Roles

Sections

Methods

cancel

Cancels the results fetching.

reload

Load/Reload model data synchronously.

reloadAsync

Load/Reload model data asynchronously using threads.

resultsReady

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

Signals

progressChanged

Emitted when the progress changed to progress.

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(*values)

Bases: IntEnum

Abstract = 2
DataProviderName = 3
GeometryType = 4
Identifier = 0
Title = 1
Title = 1
cancel(self)[source]

Cancels the results fetching.

signal progressChanged(progress: int)[source]

Emitted when the progress changed to progress.

Parameters:

progress (int)

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)