QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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 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()
Since
QGIS 3.0

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.

Since
QGIS 3.0

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.

Since
QGIS 3.0

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()
Since
QGIS 3.0

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.

Since
QGIS 2.12

Definition at line 75 of file qgssymbollayerwidget.h.


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