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

Stores metadata about one symbol layer class. More...

#include <qgssymbollayerregistry.h>

Inheritance diagram for QgsSymbolLayerAbstractMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsSymbolLayerAbstractMetadata (const QString &name, const QString &visibleName, QgsSymbol::SymbolType type)
 
virtual ~QgsSymbolLayerAbstractMetadata ()=default
 
virtual QgsSymbolLayercreateSymbolLayer (const QgsStringMap &map)=0
 Create a symbol layer of this type given the map of properties. More...
 
virtual QgsSymbolLayercreateSymbolLayerFromSld (QDomElement &)
 Create a symbol layer of this type given the map of properties. More...
 
virtual QgsSymbolLayerWidgetcreateSymbolLayerWidget (QgsVectorLayer *)
 Create widget for symbol layer of this type. Can return NULL if there's no GUI. More...
 
QString name () const
 
virtual void resolvePaths (QgsStringMap &properties, const QgsPathResolver &pathResolver, bool saving)
 Resolve paths in symbol layer's properties (if there are any paths). More...
 
QgsSymbol::SymbolType type () const
 
QString visibleName () const
 

Protected Attributes

QString mName
 
QgsSymbol::SymbolType mType
 
QString mVisibleName
 

Detailed Description

Stores metadata about one symbol layer class.

Note
It's necessary to implement createSymbolLayer() function. In C++ you can use QgsSymbolLayerMetadata convenience class.

Definition at line 34 of file qgssymbollayerregistry.h.

Constructor & Destructor Documentation

QgsSymbolLayerAbstractMetadata::QgsSymbolLayerAbstractMetadata ( const QString &  name,
const QString &  visibleName,
QgsSymbol::SymbolType  type 
)
inline

Definition at line 37 of file qgssymbollayerregistry.h.

virtual QgsSymbolLayerAbstractMetadata::~QgsSymbolLayerAbstractMetadata ( )
virtualdefault

Member Function Documentation

virtual QgsSymbolLayer* QgsSymbolLayerAbstractMetadata::createSymbolLayer ( const QgsStringMap map)
pure virtual

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

Implemented in QgsSymbolLayerMetadata.

virtual QgsSymbolLayer* QgsSymbolLayerAbstractMetadata::createSymbolLayerFromSld ( QDomElement &  )
inlinevirtual

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

Reimplemented in QgsSymbolLayerMetadata.

Definition at line 54 of file qgssymbollayerregistry.h.

virtual QgsSymbolLayerWidget* QgsSymbolLayerAbstractMetadata::createSymbolLayerWidget ( QgsVectorLayer )
inlinevirtual

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

Reimplemented in QgsSymbolLayerMetadata.

Definition at line 52 of file qgssymbollayerregistry.h.

QString QgsSymbolLayerAbstractMetadata::name ( ) const
inline

Definition at line 45 of file qgssymbollayerregistry.h.

virtual void QgsSymbolLayerAbstractMetadata::resolvePaths ( QgsStringMap properties,
const QgsPathResolver pathResolver,
bool  saving 
)
inlinevirtual

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 in QgsSymbolLayerMetadata.

Definition at line 64 of file qgssymbollayerregistry.h.

QgsSymbol::SymbolType QgsSymbolLayerAbstractMetadata::type ( ) const
inline

Definition at line 47 of file qgssymbollayerregistry.h.

QString QgsSymbolLayerAbstractMetadata::visibleName ( ) const
inline

Definition at line 46 of file qgssymbollayerregistry.h.

Member Data Documentation

QString QgsSymbolLayerAbstractMetadata::mName
protected

Definition at line 72 of file qgssymbollayerregistry.h.

QgsSymbol::SymbolType QgsSymbolLayerAbstractMetadata::mType
protected

Definition at line 74 of file qgssymbollayerregistry.h.

QString QgsSymbolLayerAbstractMetadata::mVisibleName
protected

Definition at line 73 of file qgssymbollayerregistry.h.


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