QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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.
 
void symbolChanged ()
 Should be emitted whenever the sub symbol changed on this symbol layer configuration.
 

Public Member Functions

 QgsSymbolLayerWidget (QWidget *parent, QgsVectorLayer *vl=nullptr)
 Constructor for QgsSymbolLayerWidget.
 
QgsSymbolWidgetContext context () const
 Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
 
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.
 
virtual void setSymbolLayer (QgsSymbolLayer *layer)=0
 
virtual QgsSymbolLayersymbolLayer ()=0
 
const QgsVectorLayervectorLayer () const
 Returns the vector layer associated with the widget.
 
- 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.
 
void registerDataDefinedButton (QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key)
 Registers a data defined override button.
 

Detailed Description

Definition at line 36 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 47 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 135 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 66 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 140 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, QgsSVGFillSymbolLayerWidget, and QgsLinearReferencingSymbolLayerWidget.

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

◆ vectorLayer()

const QgsVectorLayer * QgsSymbolLayerWidget::vectorLayer ( ) const
inline

Returns the vector layer associated with the widget.

Definition at line 71 of file qgssymbollayerwidget.h.


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