QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgsprovidersourcewidgetproviderregistry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprovidersourcewidgetproviderregistry.h
3  --------------------------------------
4  Date : December 2020
5  Copyright : (C) 2020 by Nyall Dawson
6  Email : nyall dot dawson at gmail dot com
7 ****************************************************************************/
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 
17 #ifndef QGSPROVIDERSOURCEWIDGETPROVIDERREGISTRY_H
18 #define QGSPROVIDERSOURCEWIDGETPROVIDERREGISTRY_H
19 
20 #include <QWidget>
21 
22 #include "qgis_gui.h"
23 #include "qgis_sip.h"
24 #include "qgsguiutils.h"
25 
29 
40 {
41  public:
42 
45 
50 
52  QList< QgsProviderSourceWidgetProvider *> providers();
53 
55  void addProvider( QgsProviderSourceWidgetProvider *provider SIP_TRANSFER );
56 
61  bool removeProvider( QgsProviderSourceWidgetProvider *provider SIP_TRANSFER );
62 
67  void initializeFromProviderGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
68 
70  QgsProviderSourceWidgetProvider *providerByName( const QString &name );
71 
73  QList<QgsProviderSourceWidgetProvider *> providersByKey( const QString &providerKey );
74 
80  QgsProviderSourceWidget *createWidget( QgsMapLayer *layer, QWidget *parent SIP_TRANSFERTHIS = nullptr ) SIP_TRANSFERBACK;
81 
82  private:
83 #ifdef SIP_RUN
85 #endif
86 
88  QList<QgsProviderSourceWidgetProvider *> mProviders;
89 };
90 
91 #endif // QGSPROVIDERSOURCEWIDGETPROVIDERREGISTRY_H
Base class for all map layer types.
Definition: qgsmaplayer.h:70
A registry / canonical manager of GUI parts of data providers.
This class keeps a list of provider source widget providers.
QgsProviderSourceWidgetProviderRegistry & operator=(const QgsProviderSourceWidgetProviderRegistry &rh)=delete
QgsProviderSourceWidgetProviderRegistry cannot be copied.
QgsProviderSourceWidgetProviderRegistry(const QgsProviderSourceWidgetProviderRegistry &rh)=delete
QgsProviderSourceWidgetProviderRegistry cannot be copied.
An interface for providers of widgets designed to configure a data provider's source.
Base class for widgets which allow customization of a provider's source URI.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_TRANSFERBACK
Definition: qgis_sip.h:48