QGIS API Documentation 3.43.0-Master (b60ef06885e)
qgssourceselectproviderregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssourceselectproviderregistry.h - QgsSourceSelectProviderRegistry
3
4 ---------------------
5 begin : 1.9.2017
6 copyright : (C) 2017 by Alessandro Pasotti
7 email : apasotti at boundlessgeo dot com
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 QGSSOURCESELECTPROVIDERREGISTRY_H
17#define QGSSOURCESELECTPROVIDERREGISTRY_H
18
19#include <QList>
20#include <QObject>
21#include "qgis_gui.h"
22#include "qgis_sip.h"
23
24#include "qgsproviderregistry.h"
25
29
41class GUI_EXPORT QgsSourceSelectProviderRegistry : public QObject
42{
43 Q_OBJECT
44
45 public:
48
51
53 QList<QgsSourceSelectProvider *> providers();
54
56 void addProvider( QgsSourceSelectProvider *provider SIP_TRANSFER );
57
62 bool removeProvider( QgsSourceSelectProvider *provider SIP_TRANSFER );
63
69 void initializeFromProviderGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
70
72 QgsSourceSelectProvider *providerByName( const QString &name );
73
75 QList<QgsSourceSelectProvider *> providersByKey( const QString &providerKey );
76
84 QgsAbstractDataSourceWidget *createSelectionWidget(
85 const QString &name,
86 QWidget *parent,
87 Qt::WindowFlags fl,
89 );
90
91 signals:
92
98 void providerAdded( const QString &name );
99
105 void providerRemoved( const QString &name );
106
107 private:
108#ifdef SIP_RUN
110#endif
111
113 QList<QgsSourceSelectProvider *> mProviders;
114};
115
116#endif // QGSSOURCESELECTPROVIDERREGISTRY_H
Abstract base class for Data Source widgets to create connections and add layers.
A registry / canonical manager of GUI parts of data providers.
WidgetMode
Different ways a source select dialog can be used.
A registry for QgsSourceSelectProvider source select providers.
QgsSourceSelectProviderRegistry & operator=(const QgsSourceSelectProviderRegistry &rh)=delete
QgsSourceSelectProviderRegistry(const QgsSourceSelectProviderRegistry &rh)=delete
void providerRemoved(const QString &name)
Emitted whenever a provider is removed from the registry.
void providerAdded(const QString &name)
Emitted whenever a provider is added to the registry.
An interface for pages shown in a QgsDataSourceManagerDialog.
#define SIP_TRANSFER
Definition qgis_sip.h:36