QGIS API Documentation 3.99.0-Master (26c88405ac0)
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 "qgis_gui.h"
20#include "qgis_sip.h"
21#include "qgsproviderregistry.h"
22
23#include <QList>
24#include <QObject>
25
29
41class GUI_EXPORT QgsSourceSelectProviderRegistry : public QObject
42{
43 Q_OBJECT
44
45 public:
48
51
53 QList<QgsSourceSelectProvider *> providers();
54
57
63
70
72 QgsSourceSelectProvider *providerByName( const QString &name );
73
75 QList<QgsSourceSelectProvider *> providersByKey( const QString &providerKey );
76
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.
QgsAbstractDataSourceWidget * createSelectionWidget(const QString &name, QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode)
Gets select widget from provider with name.
void initializeFromProviderGuiRegistry(QgsProviderGuiRegistry *providerGuiRegistry)
Initializes the registry.
QgsSourceSelectProviderRegistry & operator=(const QgsSourceSelectProviderRegistry &rh)=delete
QgsSourceSelectProviderRegistry(const QgsSourceSelectProviderRegistry &rh)=delete
QList< QgsSourceSelectProvider * > providersByKey(const QString &providerKey)
Returns a (possibly empty) list of providers by data providerkey.
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.
QList< QgsSourceSelectProvider * > providers()
Gets list of available providers.
QgsSourceSelectProvider * providerByName(const QString &name)
Returns a provider by name or nullptr if not found.
void addProvider(QgsSourceSelectProvider *provider)
Add a provider implementation. Takes ownership of the object.
bool removeProvider(QgsSourceSelectProvider *provider)
Remove provider implementation from the list (provider object is deleted).
An interface for pages shown in a QgsDataSourceManagerDialog.
#define SIP_TRANSFER
Definition qgis_sip.h:36