mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
173 lines
4.7 KiB
Plaintext
173 lines
4.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgsmaplayerconfigwidgetfactory.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsMapLayerConfigWidgetFactory
|
|
{
|
|
%Docstring(signature="appended")
|
|
Factory class for creating custom map layer property pages.
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmaplayerconfigwidgetfactory.h"
|
|
%End
|
|
public:
|
|
enum class ParentPage
|
|
{
|
|
NoParent,
|
|
Temporal,
|
|
};
|
|
|
|
QgsMapLayerConfigWidgetFactory();
|
|
|
|
QgsMapLayerConfigWidgetFactory( const QString &title, const QIcon &icon );
|
|
%Docstring
|
|
Constructor
|
|
%End
|
|
|
|
virtual ~QgsMapLayerConfigWidgetFactory();
|
|
|
|
virtual QIcon icon() const;
|
|
%Docstring
|
|
The icon that will be shown in the UI for the panel.
|
|
|
|
:return: A QIcon for the panel icon.
|
|
%End
|
|
|
|
void setIcon( const QIcon &icon );
|
|
%Docstring
|
|
Set the icon for the factory object.
|
|
|
|
:param icon: The icon to show in the interface.
|
|
%End
|
|
|
|
virtual QString title() const;
|
|
%Docstring
|
|
The title of the panel.
|
|
|
|
:return: Title of the panel
|
|
|
|
.. note::
|
|
|
|
This may or may not be shown to the user.
|
|
%End
|
|
|
|
void setTitle( const QString &title );
|
|
%Docstring
|
|
Set the title for the interface
|
|
|
|
.. note::
|
|
|
|
Not all users may show this as a label
|
|
e.g style dock uses this as a tooltip.
|
|
|
|
:param title: The title to set.
|
|
%End
|
|
|
|
virtual bool supportsStyleDock() const;
|
|
%Docstring
|
|
Flag if widget is supported for use in style dock. The default
|
|
implementation returns ``False``.
|
|
|
|
:return: ``True`` if supported
|
|
%End
|
|
|
|
void setSupportsStyleDock( bool supports );
|
|
%Docstring
|
|
Set support flag for style dock
|
|
|
|
:param supports: ``True`` if this widget is supported in the style dock.
|
|
%End
|
|
|
|
virtual bool supportLayerPropertiesDialog() const;
|
|
%Docstring
|
|
Flag if widget is supported for use in layer properties dialog. The
|
|
default implementation returns ``False``.
|
|
|
|
:return: ``True`` if supported
|
|
%End
|
|
|
|
virtual QString layerPropertiesPagePositionHint() const;
|
|
%Docstring
|
|
Returns a tab name hinting at where this page should be inserted into
|
|
the layer properties tab list.
|
|
|
|
If the returned string is non-empty, the config widget page will be
|
|
inserted before the existing page with matching object name.
|
|
|
|
The default implementation returns an empty string, which causes the
|
|
widget to be placed at the end of the dialog page list.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
void setSupportLayerPropertiesDialog( bool supports );
|
|
%Docstring
|
|
Set support flag for style dock
|
|
|
|
:param supports: ``True`` if this widget is supported in the style dock.
|
|
%End
|
|
|
|
virtual bool supportsLayer( QgsMapLayer *layer ) const;
|
|
%Docstring
|
|
Check if the layer is supported for this widget.
|
|
|
|
:return: ``True`` if this layer is supported for this widget
|
|
%End
|
|
|
|
virtual bool supportsLayerTreeGroup( QgsLayerTreeGroup *group ) const;
|
|
%Docstring
|
|
Check if a layer tree group is supported for this widget.
|
|
|
|
:return: ``True`` if the group is supported for this widget
|
|
|
|
.. versionadded:: 3.24
|
|
%End
|
|
|
|
virtual ParentPage parentPage() const;
|
|
%Docstring
|
|
Returns the associated parent page, for factories which create
|
|
sub-components of a standard page.
|
|
|
|
The default implementation returns
|
|
QgsMapLayerConfigWidgetFactory.ParentPage.NoParent, indicating that the
|
|
factory creates top-level pages which are not subcomponents.
|
|
|
|
.. versionadded:: 3.20
|
|
%End
|
|
|
|
virtual QgsMapLayerConfigWidget *createWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget = true, QWidget *parent = 0 ) const = 0 /Factory/;
|
|
%Docstring
|
|
Factory function to create the widget on demand as needed by the dock.
|
|
|
|
:param layer: The active layer in the dock.
|
|
:param canvas: The map canvas.
|
|
:param dockWidget: ``True`` of the widget will be shown a dock style
|
|
widget.
|
|
:param parent: The parent of the widget.
|
|
|
|
:return: A new :py:class:`QgsMapStylePanel` which is shown in the map
|
|
style dock.
|
|
|
|
.. note::
|
|
|
|
This function is called each time the panel is selected. Keep it light for better UX.
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgsmaplayerconfigwidgetfactory.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|