QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSSYMBOLLAYERREFERENCE_H
17 #define QGSSYMBOLLAYERREFERENCE_H
20 #include "qgis_core.h"
62 : mSymbolKey( key ), mIndexPath( { index } )
69 : mSymbolKey( key ), mIndexPath( { indexPath } )
91 return ( mSymbolKey == other.mSymbolKey && mIndexPath == other.mIndexPath );
97 return ( mSymbolKey == other.mSymbolKey ) ?
98 mIndexPath < other.mIndexPath
99 : mSymbolKey < other.mSymbolKey;
107 QVector<int> mIndexPath;
125 : mLayerId( layerId ), mSymbolLayerId( symbolLayer )
141 return mLayerId == other.mLayerId &&
142 mSymbolLayerId == other.mSymbolLayerId;
152 return qHash(
id.symbolKey() ) ^
qHash(
id.symbolLayerIndexPath() );
QgsSymbolLayerId(QString key, const QVector< int > &indexPath)
QgsSymbolLayerId constructor with a symbol key and an index path.
bool operator==(const QgsSymbolLayerId &other) const
Equality operator.
QgsSymbolLayerId(QString key, int index)
QgsSymbolLayerId constructor with a symbol key and a unique symbol layer index.
bool operator==(const QgsSymbolLayerReference &other) const
Comparison operator.
QgsSymbolLayerId symbolLayerId() const
The symbol layer's id.
uint qHash(const QgsSymbolLayerId &id)
QVector< int > symbolLayerIndexPath() const
Returns the symbol layer index path inside the symbol.
QgsSymbolLayerReference(const QString &layerId, const QgsSymbolLayerId &symbolLayer)
Constructor.
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList
bool operator<(const QgsSymbolLayerId &other) const
Comparison operator, for storage in a QSet or QMap.
CORE_EXPORT QgsSymbolLayerReferenceList stringToSymbolLayerReferenceList(const QString &)
Utilitary function to parse a string originated from symbolLayerReferenceListToString into a QgsSymbo...
We may need stable references to symbol layers, when pointers to symbol layers is not usable (when a ...
QString symbolKey() const
Returns the key associated to the symbol.
QString layerId() const
The referenced vector layer / feature renderer.
CORE_EXPORT QString symbolLayerReferenceListToString(const QgsSymbolLayerReferenceList &)
Utilitary function to turn a QgsSymbolLayerReferenceList into a string.