QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
qgslayermetadataproviderregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayermetadataproviderregistry.h - QgsLayerMetadataProviderRegistry
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 ***************************************************************************/
16#ifndef QGSLAYERMETADATAPROVIDERREGISTRY_H
17#define QGSLAYERMETADATAPROVIDERREGISTRY_H
18
19#include <QObject>
20
21#include "qgis_core.h"
22#include "qgis.h"
23
24#include "qgslayermetadata.h"
26
27class QgsFeedback;
28
29#ifdef SIP_RUN
30% ModuleHeaderCode
32% End
33#endif
34
44class CORE_EXPORT QgsLayerMetadataProviderRegistry : public QObject
45{
46
47 Q_OBJECT
48 public:
49
51 explicit QgsLayerMetadataProviderRegistry( QObject *parent = nullptr );
52
54 void registerLayerMetadataProvider( QgsAbstractLayerMetadataProvider *metadataProvider SIP_TRANSFER );
55
57 void unregisterLayerMetadataProvider( QgsAbstractLayerMetadataProvider *metadataProvider );
58
60 QList<QgsAbstractLayerMetadataProvider *> layerMetadataProviders() const;
61
63 QgsAbstractLayerMetadataProvider *layerMetadataProviderFromId( const QString &id );
64
69 const QgsLayerMetadataSearchResults search( const QgsMetadataSearchContext &searchContext, const QString &searchString = QString(), const QgsRectangle &geographicExtent = QgsRectangle(), QgsFeedback *feedback = nullptr );
70
71 private:
72
73 QHash<QString, QgsAbstractLayerMetadataProvider *> mMetadataProviders;
74
75};
76
77#endif // QGSLAYERMETADATAPROVIDERREGISTRY_H
Layer metadata provider backend interface.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
Registry of layer metadata provider backends.
Container of result records from a layer metadata search.
A rectangle specified with double values.
Definition: qgsrectangle.h:42
#define SIP_TRANSFER
Definition: qgis_sip.h:36