QGIS/python/gui/auto_generated/qgsprovidersourcewidgetproviderregistry.sip.in
Nyall Dawson d5c3b4b8a5 Add API to allow creation of widgets for customising a layer's source
This adds api in the provider gui to allow a provider to create a custom
widget which exposes options to customise and change the layer's source.

E.g. a file based layer provider could expose a widget for selecting
a new file path, and an online one could expose widgets for changing
the host, authentication, etc.
2020-12-26 09:51:34 +10:00

84 lines
3.0 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprovidersourcewidgetproviderregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsProviderSourceWidgetProviderRegistry
{
%Docstring
This class keeps a list of provider source widget providers.
QgsProviderSourceWidgetProviderRegistry is not usually directly created, but rather accessed through
QgsGui.QgsProviderSourceWidgetProviderRegistry().
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgsprovidersourcewidgetproviderregistry.h"
%End
public:
QgsProviderSourceWidgetProviderRegistry();
~QgsProviderSourceWidgetProviderRegistry();
QList< QgsProviderSourceWidgetProvider *> providers();
%Docstring
Gets list of available providers
%End
void addProvider( QgsProviderSourceWidgetProvider *provider /Transfer/ );
%Docstring
Add a ``provider`` implementation. Takes ownership of the object.
%End
bool removeProvider( QgsProviderSourceWidgetProvider *provider /Transfer/ );
%Docstring
Remove ``provider`` implementation from the list (``provider`` object is deleted)
:return: ``True`` if the provider was actually removed and deleted
%End
void initializeFromProviderGuiRegistry( QgsProviderGuiRegistry *providerGuiRegistry );
%Docstring
Initializes the registry. The registry needs to be passed explicitly
(instead of using singleton) because this gets called from QgsGui constructor.
%End
QgsProviderSourceWidgetProvider *providerByName( const QString &name );
%Docstring
Returns a provider by ``name`` or ``None`` if not found
%End
QList<QgsProviderSourceWidgetProvider *> providersByKey( const QString &providerKey );
%Docstring
Returns a (possibly empty) list of providers by data ``providerkey``
%End
QgsProviderSourceWidget *createWidget( QgsMapLayer *layer, QWidget *parent /TransferThis/ = 0 ) /TransferBack/;
%Docstring
Creates a new widget to configure the source of the specified ``layer``.
It may return ``None`` if no provider was found.
The returned object must be destroyed by the caller.
%End
private:
QgsProviderSourceWidgetProviderRegistry( const QgsProviderSourceWidgetProviderRegistry &rh );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprovidersourcewidgetproviderregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/