/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/layertree/qgslayertreeembeddedwidgetregistry.h               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsLayerTreeEmbeddedWidgetProvider
{
%Docstring(signature="appended")
Provider interface to be implemented in order to introduce new kinds of
embedded widgets for use in layer tree. Embedded widgets are assigned
per individual map layers and they are shown before any legend entries.

.. seealso:: :py:class:`QgsLayerTreeEmbeddedWidgetRegistry`
%End

%TypeHeaderCode
#include "qgslayertreeembeddedwidgetregistry.h"
%End
  public:
    virtual ~QgsLayerTreeEmbeddedWidgetProvider();

    virtual QString id() const = 0;
%Docstring
Unique name of the provider (among other providers)
%End

    virtual QString name() const = 0;
%Docstring
Human readable name - may be translatable with
:py:func:`~QgsLayerTreeEmbeddedWidgetProvider.tr`
%End

    virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 /Factory/;
%Docstring
Factory to create widgets. The returned widget is owned by the caller.
The widgetIndex argument may be used to identify which widget is being
created (useful when using multiple widgets from the same provider for
one layer).
%End

    virtual bool supportsLayer( QgsMapLayer *layer ) = 0;
%Docstring
Whether it makes sense to use this widget for a particular layer
%End
};

class QgsLayerTreeEmbeddedWidgetRegistry
{
%Docstring(signature="appended")
Registry of widgets that may be embedded into layer tree view. Embedded
widgets are assigned per individual map layers and they are shown before
any legend entries. Layer tree must have UseEmbeddedWidgets flag enabled
in order to show assigned widgets.

:py:class:`QgsLayerTreeEmbeddedWidgetRegistry` is not usually directly
created, but rather accessed through
:py:func:`QgsGui.layerTreeEmbeddedWidgetRegistry()`.

.. seealso:: :py:class:`QgsLayerTreeEmbeddedWidgetRegistry`
%End

%TypeHeaderCode
#include "qgslayertreeembeddedwidgetregistry.h"
%End
  public:
    QgsLayerTreeEmbeddedWidgetRegistry();
%Docstring
Constructor for QgsLayerTreeEmbeddedWidgetRegistry

QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but
rather accessed through
:py:func:`QgsGui.layerTreeEmbeddedWidgetRegistry()`.
%End

    ~QgsLayerTreeEmbeddedWidgetRegistry();


    QStringList providers() const;
%Docstring
Returns list of all registered providers
%End

    QgsLayerTreeEmbeddedWidgetProvider *provider( const QString &providerId ) const;
%Docstring
Gets provider object from the provider's ID
%End

    bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider /Transfer/ );
%Docstring
Register a provider, takes ownership of the object. Returns ``True`` on
success, ``False`` if the provider is already registered.
%End

    bool removeProvider( const QString &providerId );
%Docstring
Unregister a provider, the provider object is deleted. Returns ``True``
on success, ``False`` if the provider was not registered.
%End

  protected:

  private:
    QgsLayerTreeEmbeddedWidgetRegistry( const QgsLayerTreeEmbeddedWidgetRegistry &other );
};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/layertree/qgslayertreeembeddedwidgetregistry.h               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/
