QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSLEGENDSYMBOLITEM_H
17 #define QGSLEGENDSYMBOLITEM_H
23 #include "qgis_core.h"
49 QgsLegendSymbolItem(
QgsSymbol *symbol,
const QString &label,
const QString &ruleKey,
bool checkable =
false,
int scaleMinDenom = -1,
int scaleMaxDenom = -1,
int level = 0,
const QString &parentRuleKey = QString() );
58 QString
label()
const {
return mLabel; }
68 bool isScaleOK(
double scale )
const;
83 int level()
const {
return mLevel; }
123 bool mCheckable =
false;
125 QgsSymbol *mOriginalSymbolPointer =
nullptr;
135 int mScaleMinDenom = -1;
136 int mScaleMaxDenom = -1;
146 #endif // QGSLEGENDSYMBOLITEM_H
int scaleMinDenom() const
Min scale denominator of the scale range.
QString ruleKey() const
Returns unique identifier of the rule for identification of the item within renderer.
QgsSymbol * legacyRuleKey() const
Used for older code that identifies legend entries from symbol pointer within renderer.
int scaleMaxDenom() const
Max scale denominator of the scale range.
QString label() const
Returns text label.
QgsSymbol * symbol() const
Returns associated symbol. May be nullptr.
bool isCheckable() const
Returns whether the item is user-checkable - whether renderer supports enabling/disabling it.
int level() const
Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0.
QList< QgsLegendSymbolItem > QgsLegendSymbolList
QString parentRuleKey() const
Key of the parent legend node.