QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | Protected Attributes | List of all members
QgsSymbolLayerMetadata Class Reference

Convenience metadata class that uses static functions to create symbol layer and its widget. More...

#include <qgssymbollayerregistry.h>

Inheritance diagram for QgsSymbolLayerMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsSymbolLayerMetadata (const QString &name, const QString &visibleName, QgsSymbol::SymbolType type, QgsSymbolLayerCreateFunc pfCreate, QgsSymbolLayerCreateFromSldFunc pfCreateFromSld=nullptr, QgsSymbolLayerPathResolverFunc pfPathResolver=nullptr, QgsSymbolLayerWidgetFunc pfWidget=nullptr)
 
QgsSymbolLayerCreateFromSldFunc createFromSldFunction () const
 
QgsSymbolLayerCreateFunc createFunction () const
 
QgsSymbolLayercreateSymbolLayer (const QgsStringMap &map) override
 Create a symbol layer of this type given the map of properties. More...
 
QgsSymbolLayercreateSymbolLayerFromSld (QDomElement &elem) override
 Create a symbol layer of this type given the map of properties. More...
 
QgsSymbolLayerWidgetcreateSymbolLayerWidget (QgsVectorLayer *vl) override
 Create widget for symbol layer of this type. Can return NULL if there's no GUI. More...
 
QgsSymbolLayerPathResolverFunc pathResolverFunction () const
 
void resolvePaths (QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving) override
 Resolve paths in symbol layer's properties (if there are any paths). More...
 
void setWidgetFunction (QgsSymbolLayerWidgetFunc f)
 
QgsSymbolLayerWidgetFunc widgetFunction () const
 

Protected Attributes

QgsSymbolLayerCreateFromSldFunc mCreateFromSldFunc
 
QgsSymbolLayerCreateFunc mCreateFunc
 
QgsSymbolLayerPathResolverFunc mPathResolverFunc
 
QgsSymbolLayerWidgetFunc mWidgetFunc
 

Detailed Description

Convenience metadata class that uses static functions to create symbol layer and its widget.

Definition at line 86 of file qgssymbollayerregistry.h.

Constructor & Destructor Documentation

QgsSymbolLayerMetadata::QgsSymbolLayerMetadata ( const QString &  name,
const QString &  visibleName,
QgsSymbol::SymbolType  type,
QgsSymbolLayerCreateFunc  pfCreate,
QgsSymbolLayerCreateFromSldFunc  pfCreateFromSld = nullptr,
QgsSymbolLayerPathResolverFunc  pfPathResolver = nullptr,
QgsSymbolLayerWidgetFunc  pfWidget = nullptr 
)
inline
Note
not available in Python bindings

Definition at line 90 of file qgssymbollayerregistry.h.

Member Function Documentation

QgsSymbolLayerCreateFromSldFunc QgsSymbolLayerMetadata::createFromSldFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 108 of file qgssymbollayerregistry.h.

QgsSymbolLayerCreateFunc QgsSymbolLayerMetadata::createFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 104 of file qgssymbollayerregistry.h.

QgsSymbolLayer* QgsSymbolLayerMetadata::createSymbolLayer ( const QgsStringMap map)
inlineoverridevirtual

Create a symbol layer of this type given the map of properties.

Implements QgsSymbolLayerAbstractMetadata.

Definition at line 115 of file qgssymbollayerregistry.h.

QgsSymbolLayer* QgsSymbolLayerMetadata::createSymbolLayerFromSld ( QDomElement &  )
inlineoverridevirtual

Create a symbol layer of this type given the map of properties.

Reimplemented from QgsSymbolLayerAbstractMetadata.

Definition at line 117 of file qgssymbollayerregistry.h.

QgsSymbolLayerWidget* QgsSymbolLayerMetadata::createSymbolLayerWidget ( QgsVectorLayer )
inlineoverridevirtual

Create widget for symbol layer of this type. Can return NULL if there's no GUI.

Reimplemented from QgsSymbolLayerAbstractMetadata.

Definition at line 116 of file qgssymbollayerregistry.h.

QgsSymbolLayerPathResolverFunc QgsSymbolLayerMetadata::pathResolverFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 110 of file qgssymbollayerregistry.h.

void QgsSymbolLayerMetadata::resolvePaths ( QgsStringMap properties,
const QgsPathResolver pathResolver,
bool  saving 
)
inlineoverridevirtual

Resolve paths in symbol layer's properties (if there are any paths).

When saving is true, paths are converted from absolute to relative, when saving is false, paths are converted from relative to absolute. This ensures that paths in project files can be relative, but in symbol layer instances the paths are always absolute

Since
QGIS 3.0

Reimplemented from QgsSymbolLayerAbstractMetadata.

Definition at line 118 of file qgssymbollayerregistry.h.

void QgsSymbolLayerMetadata::setWidgetFunction ( QgsSymbolLayerWidgetFunc  f)
inline
Note
not available in Python bindings

Definition at line 113 of file qgssymbollayerregistry.h.

QgsSymbolLayerWidgetFunc QgsSymbolLayerMetadata::widgetFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 106 of file qgssymbollayerregistry.h.

Member Data Documentation

QgsSymbolLayerCreateFromSldFunc QgsSymbolLayerMetadata::mCreateFromSldFunc
protected

Definition at line 127 of file qgssymbollayerregistry.h.

QgsSymbolLayerCreateFunc QgsSymbolLayerMetadata::mCreateFunc
protected

Definition at line 125 of file qgssymbollayerregistry.h.

QgsSymbolLayerPathResolverFunc QgsSymbolLayerMetadata::mPathResolverFunc
protected

Definition at line 128 of file qgssymbollayerregistry.h.

QgsSymbolLayerWidgetFunc QgsSymbolLayerMetadata::mWidgetFunc
protected

Definition at line 126 of file qgssymbollayerregistry.h.


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