QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
The QgsLayerMetadataResultsModel class handles the metadata fetching from the registered layer metadata providers. More...
#include <qgslayermetadataresultsmodel.h>
Public Types | |
enum | Roles { Metadata = Qt::ItemDataRole::UserRole } |
The Roles enum represents the user roles for the model. More... | |
enum | Sections { Identifier , Title , Abstract , DataProviderName , GeometryType } |
The Sections enum represents the data columns. More... | |
Public Slots | |
void | cancel () |
Cancels the results fetching. More... | |
void | resultsReady (const QgsLayerMetadataSearchResults &results) |
Triggered when metadata results have been fetched and can be added to the model. More... | |
Signals | |
void | progressChanged (int progress) |
Emitted when the progress changed to progress. More... | |
Public Member Functions | |
QgsLayerMetadataResultsModel (const QgsMetadataSearchContext &searchContext, QObject *parent=nullptr) | |
Constructs a QgsLayerMetadataResultsModel from a searchContext and an optional parent. More... | |
~QgsLayerMetadataResultsModel () | |
int | columnCount (const QModelIndex &parent) const override |
QVariant | data (const QModelIndex &index, int role) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
void | reload () |
Load/Reload model data synchronously. More... | |
void | reloadAsync () |
Load/Reload model data asynchronously using threads. More... | |
int | rowCount (const QModelIndex &parent) const override |
The QgsLayerMetadataResultsModel class handles the metadata fetching from the registered layer metadata providers.
Definition at line 71 of file qgslayermetadataresultsmodel.h.
The Roles enum represents the user roles for the model.
Enumerator | |
---|---|
Metadata | Layer metadata role. |
Definition at line 102 of file qgslayermetadataresultsmodel.h.
The Sections enum represents the data columns.
Enumerator | |
---|---|
Identifier | Metadata identifier. |
Title | Metadata title. |
Abstract | Metadata abstract. |
DataProviderName | Layer data provider name. |
GeometryType | Layer geometry type. |
Definition at line 111 of file qgslayermetadataresultsmodel.h.
|
explicit |
Constructs a QgsLayerMetadataResultsModel from a searchContext and an optional parent.
Definition at line 26 of file qgslayermetadataresultsmodel.cpp.
QgsLayerMetadataResultsModel::~QgsLayerMetadataResultsModel | ( | ) |
Definition at line 34 of file qgslayermetadataresultsmodel.cpp.
|
slot |
Cancels the results fetching.
Definition at line 196 of file qgslayermetadataresultsmodel.cpp.
|
override |
Definition at line 44 of file qgslayermetadataresultsmodel.cpp.
|
override |
Definition at line 49 of file qgslayermetadataresultsmodel.cpp.
|
override |
Definition at line 115 of file qgslayermetadataresultsmodel.cpp.
|
signal |
Emitted when the progress changed to progress.
void QgsLayerMetadataResultsModel::reload | ( | ) |
Load/Reload model data synchronously.
Definition at line 140 of file qgslayermetadataresultsmodel.cpp.
void QgsLayerMetadataResultsModel::reloadAsync | ( | ) |
Load/Reload model data asynchronously using threads.
Definition at line 158 of file qgslayermetadataresultsmodel.cpp.
|
slot |
Triggered when metadata results have been fetched and can be added to the model.
Definition at line 184 of file qgslayermetadataresultsmodel.cpp.
|
override |
Definition at line 39 of file qgslayermetadataresultsmodel.cpp.