QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsproviderguiregistry.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsproviderrguiegistry.h
3 -------------------
4 begin : June 2019
5 copyright : (C) 2019 by Peter Petrik
6 email : zilolv at google dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPROVIDERGUIREGISTRY_H
19#define QGSPROVIDERGUIREGISTRY_H
20
21#include <map>
22
23#include "qgis_gui.h"
24#include "qgis_sip.h"
25
26#include <QDir>
27#include <QMainWindow>
28#include <QString>
29#include <QStringList>
30
39class QgsMapLayer;
40
53class GUI_EXPORT QgsProviderGuiRegistry
54{
55 public:
57 QgsProviderGuiRegistry( const QString &pluginPath );
58
60
62 QStringList providerList() const;
63
65 const QgsProviderGuiMetadata *providerMetadata( const QString &providerKey ) const;
66
71 void registerGuis( QMainWindow *widget );
72
77 virtual const QList<QgsDataItemGuiProvider *> dataItemGuiProviders( const QString &providerKey ) SIP_FACTORY;
78
83 virtual QList<QgsSourceSelectProvider *> sourceSelectProviders( const QString &providerKey ) SIP_FACTORY;
84
89 virtual QList<QgsProjectStorageGuiProvider *> projectStorageGuiProviders( const QString &providerKey ) SIP_FACTORY;
90
96 virtual QList<QgsSubsetStringEditorProvider *> subsetStringEditorProviders( const QString &providerKey ) SIP_FACTORY;
97
103 virtual QList<QgsProviderSourceWidgetProvider *> sourceWidgetProviders( const QString &providerKey ) SIP_FACTORY;
104
112 virtual QList<const QgsMapLayerConfigWidgetFactory *> mapLayerConfigWidgetFactories( QgsMapLayer *layer = nullptr );
113
115 SIP_SKIP typedef std::map<QString, QgsProviderGuiMetadata *> GuiProviders;
116
117 private:
118
124 void loadDynamicProviders( const QString &pluginPath );
125
131 void loadStaticProviders();
132
134 GuiProviders mProviders;
135};
136
137#endif
Abstract base class for providers which affect how QgsDataItem items behave within the application GU...
Factory class for creating custom map layer property pages.
Base class for all map layer types.
Definition qgsmaplayer.h:80
Abstract interface for project storage GUI - to be implemented by various backends and registered in ...
Holds data for the GUI part of the data providers.
virtual const QList< QgsDataItemGuiProvider * > dataItemGuiProviders(const QString &providerKey)
Returns all data item gui providers registered in provider with providerKey.
virtual QList< QgsSubsetStringEditorProvider * > subsetStringEditorProviders(const QString &providerKey)
Returns all subset string editor providers registered in provider with providerKey.
const QgsProviderGuiMetadata * providerMetadata(const QString &providerKey) const
Returns metadata of the provider or nullptr if not found.
virtual QList< QgsProjectStorageGuiProvider * > projectStorageGuiProviders(const QString &providerKey)
Returns all project storage gui providers registered in provider with providerKey.
virtual QList< const QgsMapLayerConfigWidgetFactory * > mapLayerConfigWidgetFactories(QgsMapLayer *layer=nullptr)
Returns all map layer config widget factories associated with the registered providers.
std::map< QString, QgsProviderGuiMetadata * > GuiProviders
Type for data provider metadata associative container.
QgsProviderGuiRegistry(const QString &pluginPath)
Creates registry and loads static provider plugins.
virtual QList< QgsSourceSelectProvider * > sourceSelectProviders(const QString &providerKey)
Returns all source select providers registered in provider with providerKey.
virtual QList< QgsProviderSourceWidgetProvider * > sourceWidgetProviders(const QString &providerKey)
Returns all source widget providers registered in provider with providerKey.
void registerGuis(QMainWindow *widget)
Called during GUI initialization - allows providers to do its internal initialization of GUI componen...
QStringList providerList() const
Returns list of available providers by their keys.
An interface for providers of widgets designed to configure a data provider's source.
An interface for pages shown in a QgsDataSourceManagerDialog.
An interface for widgets which edit a subset string.
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_FACTORY
Definition qgis_sip.h:84