QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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...
 
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 ( 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

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.

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 112 of file qgssymbollayerwidget.cpp.

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 59 of file qgssymbollayerwidget.cpp.

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 117 of file qgssymbollayerwidget.cpp.

void QgsSymbolLayerWidget::setContext ( const QgsSymbolWidgetContext context)

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

Definition at line 96 of file qgssymbollayerwidget.cpp.

virtual void QgsSymbolLayerWidget::setSymbolLayer ( QgsSymbolLayer layer)
pure virtual
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()
virtual QgsSymbolLayer* QgsSymbolLayerWidget::symbolLayer ( )
pure virtual
void QgsSymbolLayerWidget::updateDataDefinedProperty ( )
protectedslot

Definition at line 166 of file qgssymbollayerwidget.cpp.

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: