QGIS API Documentation  3.6.0-Noosa (5873452)
Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
QgsSymbolLayerWidget Class Referenceabstract

#include <qgssymbollayerwidget.h>

Inheritance diagram for QgsSymbolLayerWidget:
Inheritance graph
[legend]

Signals

void changed ()
 Should be emitted whenever configuration changes happened on this symbol layer configuration. More...
 
void symbolChanged ()
 Should be emitted whenever the sub symbol changed on this symbol layer configuration. More...
 

Public Member Functions

 QgsSymbolLayerWidget (QWidget *parent, QgsVectorLayer *vl=nullptr)
 Constructor for QgsSymbolLayerWidget. More...
 
QgsSymbolWidgetContext context () const
 Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. More...
 
virtual void setContext (const QgsSymbolWidgetContext &context)
 Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. More...
 
virtual void setSymbolLayer (QgsSymbolLayer *layer)=0
 
virtual QgsSymbolLayersymbolLayer ()=0
 
const QgsVectorLayervectorLayer () const
 Returns the vector layer associated with the widget. More...
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 

Protected Slots

void updateDataDefinedProperty ()
 

Protected Member Functions

QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context. More...
 
void registerDataDefinedButton (QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key)
 Registers a data defined override button. More...
 

Detailed Description

Definition at line 34 of file qgssymbollayerwidget.h.

Constructor & Destructor Documentation

◆ QgsSymbolLayerWidget()

QgsSymbolLayerWidget::QgsSymbolLayerWidget ( QWidget *  parent,
QgsVectorLayer vl = nullptr 
)
inline

Constructor for QgsSymbolLayerWidget.

Parameters
vlassociated vector layer
parentparent widget

Definition at line 45 of file qgssymbollayerwidget.h.

Member Function Documentation

◆ changed

void QgsSymbolLayerWidget::changed ( )
signal

Should be emitted whenever configuration changes happened on this symbol layer configuration.

If the subsymbol is changed, symbolChanged() should be emitted instead.

◆ context()

QgsSymbolWidgetContext QgsSymbolLayerWidget::context ( ) const

Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

See also
setContext()
Since
QGIS 3.0

Definition at line 114 of file qgssymbollayerwidget.cpp.

◆ createExpressionContext()

QgsExpressionContext QgsSymbolLayerWidget::createExpressionContext ( ) const
overrideprotectedvirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Since
QGIS 3.0

Implements QgsExpressionContextGenerator.

Definition at line 61 of file qgssymbollayerwidget.cpp.

◆ registerDataDefinedButton()

void QgsSymbolLayerWidget::registerDataDefinedButton ( QgsPropertyOverrideButton button,
QgsSymbolLayer::Property  key 
)
protected

Registers a data defined override button.

Handles setting up connections for the button and initializing the button to show the correct descriptions and help text for the associated property.

Since
QGIS 3.0

Definition at line 119 of file qgssymbollayerwidget.cpp.

◆ setContext()

void QgsSymbolLayerWidget::setContext ( const QgsSymbolWidgetContext context)
virtual

Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

Parameters
contextsymbol widget context
See also
context()
Since
QGIS 3.0

Reimplemented in QgsSVGFillSymbolLayerWidget, QgsRasterMarkerSymbolLayerWidget, and QgsSvgMarkerSymbolLayerWidget.

Definition at line 98 of file qgssymbollayerwidget.cpp.

◆ setSymbolLayer()

virtual void QgsSymbolLayerWidget::setSymbolLayer ( QgsSymbolLayer layer)
pure virtual

◆ symbolChanged

void QgsSymbolLayerWidget::symbolChanged ( )
signal

Should be emitted whenever the sub symbol changed on this symbol layer configuration.

Normally changed() should be preferred.

See also
changed()

◆ symbolLayer()

virtual QgsSymbolLayer* QgsSymbolLayerWidget::symbolLayer ( )
pure virtual

◆ updateDataDefinedProperty

void QgsSymbolLayerWidget::updateDataDefinedProperty ( )
protectedslot

Definition at line 168 of file qgssymbollayerwidget.cpp.

◆ vectorLayer()

const QgsVectorLayer* QgsSymbolLayerWidget::vectorLayer ( ) const
inline

Returns the vector layer associated with the widget.

Since
QGIS 2.12

Definition at line 72 of file qgssymbollayerwidget.h.


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