The class stores information about one class/rule of a vector layer renderer in a unified way that can be used by legend model for rendering of legend.
More...
#include <qgslegendsymbolitem.h>
The class stores information about one class/rule of a vector layer renderer in a unified way that can be used by legend model for rendering of legend.
- See also
- QgsSymbolLegendNode
- Since
- QGIS 2.6
Definition at line 36 of file qgslegendsymbolitem.h.
◆ QgsLegendSymbolItem() [1/3]
QgsLegendSymbolItem::QgsLegendSymbolItem |
( |
| ) |
|
|
default |
◆ QgsLegendSymbolItem() [2/3]
QgsLegendSymbolItem::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() |
|
) |
| |
Construct item.
Does not take ownership of symbol (makes internal clone)
- Since
- QGIS 2.8
Definition at line 21 of file qgslegendsymbolitem.cpp.
◆ ~QgsLegendSymbolItem()
QgsLegendSymbolItem::~QgsLegendSymbolItem |
( |
| ) |
|
◆ QgsLegendSymbolItem() [3/3]
◆ dataDefinedSizeLegendSettings()
Returns extra information for data-defined size legend rendering.
Normally it returns nullptr
.
- Since
- QGIS 3.0
Definition at line 92 of file qgslegendsymbolitem.cpp.
◆ isCheckable()
bool QgsLegendSymbolItem::isCheckable |
( |
| ) |
const |
|
inline |
Returns whether the item is user-checkable - whether renderer supports enabling/disabling it.
Definition at line 62 of file qgslegendsymbolitem.h.
◆ isScaleOK()
bool QgsLegendSymbolItem::isScaleOK |
( |
double |
scale | ) |
const |
Determine whether given scale is within the scale range. Returns true
if scale or scale range is invalid (value <= 0)
Definition at line 66 of file qgslegendsymbolitem.cpp.
◆ label()
QString QgsLegendSymbolItem::label |
( |
| ) |
const |
|
inline |
◆ legacyRuleKey()
QgsSymbol * QgsLegendSymbolItem::legacyRuleKey |
( |
| ) |
const |
|
inline |
Used for older code that identifies legend entries from symbol pointer within renderer.
Definition at line 65 of file qgslegendsymbolitem.h.
◆ level()
int QgsLegendSymbolItem::level |
( |
| ) |
const |
|
inline |
Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0.
Definition at line 83 of file qgslegendsymbolitem.h.
◆ operator=()
◆ parentRuleKey()
QString QgsLegendSymbolItem::parentRuleKey |
( |
| ) |
const |
|
inline |
Key of the parent legend node.
For legends with tree hierarchy
- Note
- Parameter parentRuleKey added in QGIS 2.8
Definition at line 89 of file qgslegendsymbolitem.h.
◆ ruleKey()
QString QgsLegendSymbolItem::ruleKey |
( |
| ) |
const |
|
inline |
Returns unique identifier of the rule for identification of the item within renderer.
Definition at line 60 of file qgslegendsymbolitem.h.
◆ scaleMaxDenom()
int QgsLegendSymbolItem::scaleMaxDenom |
( |
| ) |
const |
|
inline |
Max scale denominator of the scale range.
For range 1:1000 to 1:2000 this will return 2000. Value <= 0 means the range is unbounded on this side
Definition at line 80 of file qgslegendsymbolitem.h.
◆ scaleMinDenom()
int QgsLegendSymbolItem::scaleMinDenom |
( |
| ) |
const |
|
inline |
Min scale denominator of the scale range.
For range 1:1000 to 1:2000 this will return 1000. Value <= 0 means the range is unbounded on this side
Definition at line 74 of file qgslegendsymbolitem.h.
◆ setDataDefinedSizeLegendSettings()
◆ setSymbol()
void QgsLegendSymbolItem::setSymbol |
( |
QgsSymbol * |
s | ) |
|
Sets the symbol of the item.
Does not take ownership of symbol – an internal clone is made of the symbol.
- See also
- symbol()
Definition at line 79 of file qgslegendsymbolitem.cpp.
◆ symbol()
QgsSymbol * QgsLegendSymbolItem::symbol |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: