QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
18#include "qgsfeedback.h"
19#include "qgsprovidermetadata.h"
20#include "qgsproviderregistry.h"
21
22QList<QgsLayerMetadataProviderResult> QgsLayerMetadataSearchResults::metadata() const
23{
24 return mMetadata;
25}
26
31
32
34{
35 return mErrors;
36}
37
38void QgsLayerMetadataSearchResults::addError( const QString &error )
39{
40 mErrors.push_back( error );
41}
42
43
49
51{
52 return mGeographicExtent;
53}
54
59
64
69
71{
72 return mAuthid;
73}
74
76{
77 mAuthid = authid;
78}
79
81{
82 return mUri;
83}
84
85void QgsLayerMetadataProviderResult::setUri( const QString &newUri )
86{
87 mUri = newUri;
88}
89
91{
92 return mDataProviderName;
93}
94
96{
97 mDataProviderName = dataProviderName;
98}
99
101{
102 return mLayerType;
103}
104
109
111{
112 return mStandardUri;
113}
114
116{
117 mStandardUri = standardUri;
118}
119
120
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:358
LayerType
Types of layers that can be added to a map.
Definition qgis.h:190
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.
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.
QgsLayerMetadata()=default
Polygon geometry type.
Definition qgspolygon.h:33