| QGIS API Documentation
    3.16.0-Hannover (43b64b13f3)
    | 
We may need stable references to symbol layers, when pointers to symbol layers is not usable (when a symbol or a feature renderer is cloned for example). More...
#include <qgssymbollayerreference.h>
| Public Member Functions | |
| QgsSymbolLayerId () | |
| QgsSymbolLayerId (const QgsSymbolLayerId &other)=default | |
| Default copy constructor.  More... | |
| QgsSymbolLayerId (QString key, const QVector< int > &indexPath) | |
| QgsSymbolLayerId constructor with a symbol key and an index path.  More... | |
| QgsSymbolLayerId (QString key, int index) | |
| QgsSymbolLayerId constructor with a symbol key and a unique symbol layer index.  More... | |
| bool | operator< (const QgsSymbolLayerId &other) const | 
| Comparison operator, for storage in a QSet or QMap.  More... | |
| QgsSymbolLayerId & | operator= (const QgsSymbolLayerId &other)=default | 
| Default assignment operator.  More... | |
| bool | operator== (const QgsSymbolLayerId &other) const | 
| Equality operator.  More... | |
| QString | symbolKey () const | 
| Returns the key associated to the symbol.  More... | |
| QVector< int > | symbolLayerIndexPath () const | 
| Returns the symbol layer index path inside the symbol.  More... | |
We may need stable references to symbol layers, when pointers to symbol layers is not usable (when a symbol or a feature renderer is cloned for example).
A symbol layer identifier consists of:
For a symbol in a QgsSingleSymbolRenderer that has two symbol layers, it will give:
For a QgsRuleBasedRenderer each rule key is the symbol key.
For a symbol with a symbol layer that has a sub symbol (say a QgsArrowSymbolLayer), path to symbol layers of the sub symbol are given by a list of indexes:
Definition at line 53 of file qgssymbollayerreference.h.
| 
 | inline | 
Definition at line 56 of file qgssymbollayerreference.h.
| 
 | inline | 
QgsSymbolLayerId constructor with a symbol key and a unique symbol layer index.
Definition at line 61 of file qgssymbollayerreference.h.
| 
 | inline | 
QgsSymbolLayerId constructor with a symbol key and an index path.
Definition at line 68 of file qgssymbollayerreference.h.
| 
 | default | 
Default copy constructor.
| 
 | inline | 
Comparison operator, for storage in a QSet or QMap.
Definition at line 95 of file qgssymbollayerreference.h.
| 
 | default | 
Default assignment operator.
| 
 | inline | 
Equality operator.
Definition at line 89 of file qgssymbollayerreference.h.
| 
 | inline | 
Returns the key associated to the symbol.
Definition at line 81 of file qgssymbollayerreference.h.
| 
 | inline | 
Returns the symbol layer index path inside the symbol.
Definition at line 86 of file qgssymbollayerreference.h.