QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsMapLayerConfigWidgetFactory Class Referenceabstract

#include <qgsmaplayerconfigwidgetfactory.h>

Public Member Functions

 QgsMapLayerConfigWidgetFactory ()
 Constructor. More...
 
 QgsMapLayerConfigWidgetFactory (QString title, QIcon icon)
 Constructor. More...
 
virtual ~QgsMapLayerConfigWidgetFactory ()
 Destructor. More...
 
virtual QgsMapLayerConfigWidgetcreateWidget (QgsMapLayer *layer, QgsMapCanvas *canvas, bool dockWidget=true, QWidget *parent=0) const =0
 Factory fucntion to create the widget on demand as needed by the dock. More...
 
virtual QIcon icon () const
 The icon that will be shown in the UI for the panel. More...
 
void setIcon (const QIcon &icon)
 Set the icon for the factory object. More...
 
void setSupportLayerPropertiesDialog (bool supports)
 Set support flag for style dock. More...
 
void setSupportsStyleDock (bool supports)
 Set support flag for style dock. More...
 
void setTitle (const QString &title)
 Set the title for the interface. More...
 
virtual bool supportLayerPropertiesDialog () const
 Flag if widget is supported for use in layer properties dialog. More...
 
virtual bool supportsLayer (QgsMapLayer *layer) const
 Check if the layer is supported for this widget. More...
 
virtual bool supportsStyleDock () const
 Flag if widget is supported for use in style dock. More...
 
virtual QString title () const
 The title of the panel. More...
 

Detailed Description

Note
added in QGIS 2.16 Factory class for creating custom map layer property pages

Definition at line 28 of file qgsmaplayerconfigwidgetfactory.h.

Constructor & Destructor Documentation

◆ QgsMapLayerConfigWidgetFactory() [1/2]

QgsMapLayerConfigWidgetFactory::QgsMapLayerConfigWidgetFactory ( )

Constructor.

Definition at line 18 of file qgsmaplayerconfigwidgetfactory.cpp.

◆ QgsMapLayerConfigWidgetFactory() [2/2]

QgsMapLayerConfigWidgetFactory::QgsMapLayerConfigWidgetFactory ( QString  title,
QIcon  icon 
)

Constructor.

Definition at line 23 of file qgsmaplayerconfigwidgetfactory.cpp.

◆ ~QgsMapLayerConfigWidgetFactory()

QgsMapLayerConfigWidgetFactory::~QgsMapLayerConfigWidgetFactory ( )
virtual

Destructor.

Definition at line 29 of file qgsmaplayerconfigwidgetfactory.cpp.

Member Function Documentation

◆ createWidget()

virtual QgsMapLayerConfigWidget* QgsMapLayerConfigWidgetFactory::createWidget ( QgsMapLayer layer,
QgsMapCanvas canvas,
bool  dockWidget = true,
QWidget parent = 0 
) const
pure virtual

Factory fucntion to create the widget on demand as needed by the dock.

Note
This function is called each time the panel is selected. Keep it light for better UX.
Parameters
layerThe active layer in the dock.
canvasThe map canvas.
dockWidgetTrue of the widget will be shown a dock style widget.
parentThe parent of the widget.
Returns
A new QgsMapStylePanel which is shown in the map style dock.

◆ icon()

virtual QIcon QgsMapLayerConfigWidgetFactory::icon ( ) const
inlinevirtual

The icon that will be shown in the UI for the panel.

Returns
A QIcon for the panel icon.

Definition at line 45 of file qgsmaplayerconfigwidgetfactory.h.

◆ setIcon()

void QgsMapLayerConfigWidgetFactory::setIcon ( const QIcon icon)
inline

Set the icon for the factory object.

Parameters
iconThe icon to show in the interface.

Definition at line 51 of file qgsmaplayerconfigwidgetfactory.h.

◆ setSupportLayerPropertiesDialog()

void QgsMapLayerConfigWidgetFactory::setSupportLayerPropertiesDialog ( bool  supports)
inline

Set support flag for style dock.

Parameters
supportsTrue if this widget is supported in the style dock.

Definition at line 90 of file qgsmaplayerconfigwidgetfactory.h.

◆ setSupportsStyleDock()

void QgsMapLayerConfigWidgetFactory::setSupportsStyleDock ( bool  supports)
inline

Set support flag for style dock.

Parameters
supportsTrue if this widget is supported in the style dock.

Definition at line 78 of file qgsmaplayerconfigwidgetfactory.h.

◆ setTitle()

void QgsMapLayerConfigWidgetFactory::setTitle ( const QString title)
inline

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.
Parameters
titleThe title to set.

Definition at line 66 of file qgsmaplayerconfigwidgetfactory.h.

◆ supportLayerPropertiesDialog()

virtual bool QgsMapLayerConfigWidgetFactory::supportLayerPropertiesDialog ( ) const
inlinevirtual

Flag if widget is supported for use in layer properties dialog.

Returns
True if supported

Definition at line 84 of file qgsmaplayerconfigwidgetfactory.h.

◆ supportsLayer()

bool QgsMapLayerConfigWidgetFactory::supportsLayer ( QgsMapLayer layer) const
virtual

Check if the layer is supported for this widget.

Returns
True if this layer is supported for this widget

Definition at line 33 of file qgsmaplayerconfigwidgetfactory.cpp.

◆ supportsStyleDock()

virtual bool QgsMapLayerConfigWidgetFactory::supportsStyleDock ( ) const
inlinevirtual

Flag if widget is supported for use in style dock.

Returns
True if supported

Definition at line 72 of file qgsmaplayerconfigwidgetfactory.h.

◆ title()

virtual QString QgsMapLayerConfigWidgetFactory::title ( ) const
inlinevirtual

The title of the panel.

Note
This may or may not be shown to the user.
Returns
Title of the panel

Definition at line 58 of file qgsmaplayerconfigwidgetfactory.h.


The documentation for this class was generated from the following files: