QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
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
48
50{
51 return mGeographicExtent;
52}
53
55{
56 mGeographicExtent = geographicExtent;
57}
58
63
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
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:255
LayerType
Types of layers that can be added to a map.
Definition qgis.h:114
Result record of layer metadata provider search.
Qgis::GeometryType geometryType() const
Returns the layer geometry type.
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.
void setGeometryType(Qgis::GeometryType geometryType)
Sets the layer geometry type to geometryType.
void setLayerType(Qgis::LayerType layerType)
Sets the layer type to layerType.
const QString & dataProviderName() const
Returns the data provider name.
QgsLayerMetadataProviderResult()=default
Default constructor.
void setAuthid(const QString &authid)
Sets the layer authid.
void setUri(const QString &Uri)
Sets the layer data source URI to Uri.
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.
Qgis::LayerType layerType() const
Returns the layer type.
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:33