QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
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
 
virtual QgsExpressionContext createExpressionContext () const =0
 This method needs to be reimplemented in all classes which implement this interface and return an expression context. More...
 

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 37 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 48 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()

Definition at line 132 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.

Implements QgsExpressionContextGenerator.

Definition at line 63 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.

Definition at line 137 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()

Reimplemented in QgsSimpleLineSymbolLayerWidget, QgsMarkerLineSymbolLayerWidget, QgsHashedLineSymbolLayerWidget, QgsSvgMarkerSymbolLayerWidget, QgsRasterMarkerSymbolLayerWidget, QgsAnimatedMarkerSymbolLayerWidget, and QgsSVGFillSymbolLayerWidget.

Definition at line 122 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 186 of file qgssymbollayerwidget.cpp.

◆ vectorLayer()

const QgsVectorLayer * QgsSymbolLayerWidget::vectorLayer ( ) const
inline

Returns the vector layer associated with the widget.

Definition at line 72 of file qgssymbollayerwidget.h.


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