QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsabstractlayermetadataprovider.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsabstractlayermetadataprovider.cpp - QgsAbstractLayerMetadataProvider
3
4 ---------------------
5 begin : 17.8.2022
6 copyright : (C) 2022 by Alessandro Pasotti
7 email : elpaso at itopen dot it
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
17#include "qgsprovidermetadata.h"
18#include "qgsproviderregistry.h"
19#include "qgsfeedback.h"
20
21QList<QgsLayerMetadataProviderResult> QgsLayerMetadataSearchResults::metadata() const
22{
23 return mMetadata;
24}
25
27{
28 mMetadata.push_back( metadata );
29}
30
31
33{
34 return mErrors;
35}
36
37void QgsLayerMetadataSearchResults::addError( const QString &error )
38{
39 mErrors.push_back( error );
40}
41
42
44 : QgsLayerMetadata( metadata )
45{
46
47}
48
50{
51 return mGeographicExtent;
52}
53
55{
56 mGeographicExtent = geographicExtent;
57}
58
60{
61 return mGeometryType;
62}
63
65{
66 mGeometryType = geometryType;
67}
68
70{
71 return mAuthid;
72}
73
74void QgsLayerMetadataProviderResult::setAuthid( const QString &authid )
75{
76 mAuthid = authid;
77}
78
80{
81 return mUri;
82}
83
84void QgsLayerMetadataProviderResult::setUri( const QString &newUri )
85{
86 mUri = newUri;
87}
88
90{
91 return mDataProviderName;
92}
93
94void QgsLayerMetadataProviderResult::setDataProviderName( const QString &dataProviderName )
95{
96 mDataProviderName = dataProviderName;
97}
98
100{
101 return mLayerType;
102}
103
105{
106 mLayerType = layerType;
107}
108
110{
111 return mStandardUri;
112}
113
114void QgsLayerMetadataProviderResult::setStandardUri( const QString &standardUri )
115{
116 mStandardUri = standardUri;
117}
118
119
Result record of layer metadata provider search.
const QgsPolygon & geographicExtent() const
Returns the layer extent in EPSG:4326.
const QString & standardUri() const
Returns the metadata standard URI (usually "http://mrcc.com/qgis.dtd")
void setDataProviderName(const QString &dataProviderName)
Sets the data provider name to dataProviderName.
void setGeographicExtent(const QgsPolygon &geographicExtent)
Sets the layer extent in EPSG:4326 to geographicExtent.
const QString & dataProviderName() const
Returns the data provider name.
QgsLayerMetadataProviderResult()=default
Default constructor.
void setLayerType(QgsMapLayerType layerType)
Sets the layer type to layerType.
void setAuthid(const QString &authid)
Sets the layer authid.
QgsMapLayerType layerType() const
Returns the layer type.
const QgsWkbTypes::GeometryType & geometryType() const
Returns the layer geometry type.
void setUri(const QString &Uri)
Sets the layer data source URI to Uri.
void setGeometryType(const QgsWkbTypes::GeometryType &geometryType)
Sets the layer geometry type to geometryType.
const QString & uri() const
Returns the layer data source URI.
void setStandardUri(const QString &standardUri)
Sets the metadata standard URI to standardUri.
const QString & authid() const
Returns the layer CRS authid.
void addError(const QString &error)
Adds a error to the list of errors.
void addMetadata(const QgsLayerMetadataProviderResult &metadata)
Adds a Metadata record to the list of results.
QStringList errors() const
Returns the list of errors occurred during a metadata search.
QList< QgsLayerMetadataProviderResult > metadata() const
Returns the list of metadata results.
A structured metadata store for a map layer.
Polygon geometry type.
Definition: qgspolygon.h:34
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:141
QgsMapLayerType
Types of layers that can be added to a map.
Definition: qgis.h:47