/************************************************************************
 * 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(signature="appended")
This class keeps a list of provider source widget providers.

:py:class:`QgsProviderSourceWidgetProviderRegistry` is not usually directly created, but rather accessed through
:py:class:`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 :py:class:`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   *
 ************************************************************************/
