QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsdataitemproviderregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdataitemproviderregistry.h
3 --------------------------------------
4 Date : March 2015
5 Copyright : (C) 2015 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSDATAITEMPROVIDERREGISTRY_H
17#define QGSDATAITEMPROVIDERREGISTRY_H
18
19#include <QList>
20#include <QMap>
21#include <QObject>
22
23#include "qgis_sip.h"
24
25#include "qgis_core.h"
26
28
38class CORE_EXPORT QgsDataItemProviderRegistry : public QObject
39{
40 Q_OBJECT
41 public:
42
44
46
51
55 QList<QgsDataItemProvider *> providers() const;
56
61 QgsDataItemProvider *provider( const QString &providerName ) const;
62
67 void addProvider( QgsDataItemProvider *provider SIP_TRANSFER );
68
73 void removeProvider( QgsDataItemProvider *provider );
74
81 QString dataProviderKey( const QString &dataItemProviderName );
82
83 signals:
84
90
96
97 private:
98#ifdef SIP_RUN
100#endif
101
103 QList<QgsDataItemProvider *> mProviders;
104
106 QMap<QString, QString> mDataItemProviderOrigin;
107
108};
109
110#endif // QGSDATAITEMPROVIDERREGISTRY_H
This class keeps a list of data item providers that may add items to the browser tree.
void providerWillBeRemoved(QgsDataItemProvider *provider)
Emitted when a data item provider is about to be removed.
QgsDataItemProviderRegistry & operator=(const QgsDataItemProviderRegistry &rh)=delete
QgsDataItemProviderRegistry cannot be copied.
void providerAdded(QgsDataItemProvider *provider)
Emitted when a new data item provider has been added.
QgsDataItemProviderRegistry(const QgsDataItemProviderRegistry &rh)=delete
QgsDataItemProviderRegistry cannot be copied.
This is the interface for those who want to add custom data items to the browser tree.
#define SIP_TRANSFER
Definition qgis_sip.h:36