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 <qgslegendsymbolitemv2.h>
Protected Member Functions |
void | setSymbol (QgsSymbolV2 *s) |
| Set symbol of the item. Takes ownership of symbol.
|
Detailed Description
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
- QgsSymbolV2LegendNode
- Note
- added in 2.6
Constructor & Destructor Documentation
QgsLegendSymbolItemV2::QgsLegendSymbolItemV2 |
( |
| ) |
|
QgsLegendSymbolItemV2::QgsLegendSymbolItemV2 |
( |
QgsSymbolV2 * |
symbol, |
|
|
const QString & |
label, |
|
|
const QString & |
ruleKey, |
|
|
bool |
checkable = false , |
|
|
int |
scaleMinDenom = -1 , |
|
|
int |
scaleMaxDenom = -1 , |
|
|
int |
level = 0 |
|
) |
| |
Construct item. Does not take ownership of symbol (makes internal clone)
QgsLegendSymbolItemV2::~QgsLegendSymbolItemV2 |
( |
| ) |
|
Member Function Documentation
bool QgsLegendSymbolItemV2::isCheckable |
( |
| ) |
const |
|
inline |
Return whether the item is user-checkable - whether renderer supports enabling/disabling it.
bool QgsLegendSymbolItemV2::isScaleOK |
( |
double |
scale | ) |
const |
Determine whether given scale is within the scale range. Returns true if scale or scale range is invalid (value <= 0)
QString QgsLegendSymbolItemV2::label |
( |
| ) |
const |
|
inline |
QgsSymbolV2* QgsLegendSymbolItemV2::legacyRuleKey |
( |
| ) |
const |
|
inline |
Used for older code that identifies legend entries from symbol pointer within renderer.
int QgsLegendSymbolItemV2::level |
( |
| ) |
const |
|
inline |
Identation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0.
QString QgsLegendSymbolItemV2::ruleKey |
( |
| ) |
const |
|
inline |
Return unique identifier of the rule for identification of the item within renderer.
int QgsLegendSymbolItemV2::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
int QgsLegendSymbolItemV2::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
void QgsLegendSymbolItemV2::setSymbol |
( |
QgsSymbolV2 * |
s | ) |
|
|
protected |
Set symbol of the item. Takes ownership of symbol.
Return associated symbol. May be null.
The documentation for this class was generated from the following files: