QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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
40class GUI_EXPORT QgsSourceSelectProviderRegistry : public QObject
41{
42 Q_OBJECT
43
44 public:
45
48
53
55 QList< QgsSourceSelectProvider *> providers();
56
58 void addProvider( QgsSourceSelectProvider *provider SIP_TRANSFER );
59
64 bool removeProvider( QgsSourceSelectProvider *provider SIP_TRANSFER );
65
71 void initializeFromProviderGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
72
74 QgsSourceSelectProvider *providerByName( const QString &name );
75
77 QList<QgsSourceSelectProvider *> providersByKey( const QString &providerKey );
78
86 QgsAbstractDataSourceWidget *createSelectionWidget(
87 const QString &name,
88 QWidget *parent,
89 Qt::WindowFlags fl,
91 );
92
93 signals:
94
100 void providerAdded( const QString &name );
101
107 void providerRemoved( const QString &name );
108
109 private:
110#ifdef SIP_RUN
112#endif
113
115 QList<QgsSourceSelectProvider *> mProviders;
116
117};
118
119#endif // QGSSOURCESELECTPROVIDERREGISTRY_H
Abstract base Data Source Widget to create connections and add layers This class provides common func...
A registry / canonical manager of GUI parts of data providers.
WidgetMode
Different ways a source select dialog can be used.
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDial...
QgsSourceSelectProviderRegistry & operator=(const QgsSourceSelectProviderRegistry &rh)=delete
QgsDataItemProviderRegistry cannot be copied.
QgsSourceSelectProviderRegistry(const QgsSourceSelectProviderRegistry &rh)=delete
QgsDataItemProviderRegistry cannot be copied.
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.
This is the interface for those who want to add entries to the QgsDataSourceManagerDialog.
#define SIP_TRANSFER
Definition qgis_sip.h:36