1/************************************************************************ 2 * This file has been generated automatically from * 3 * * 4 * src/core/symbology/qgslegendsymbolitem.h * 5 * * 6 * Do not edit manually ! Edit header and run scripts/sipify.pl again * 7 ************************************************************************/ 8 9 10 11 12 13class QgsLegendSymbolItem 14{ 15%Docstring 16The class stores information about one class/rule of a vector layer renderer in a unified way 17that can be used by legend model for rendering of legend. 18 19.. seealso:: :py:class:`QgsSymbolLegendNode` 20 21.. versionadded:: 2.6 22%End 23 24%TypeHeaderCode 25#include "qgslegendsymbolitem.h" 26%End 27 public: 28 29 QgsLegendSymbolItem(); 30%Docstring 31Constructor for QgsLegendSymbolItem. 32%End 33 34 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() ); 35%Docstring 36Construct item. Does not take ownership of symbol (makes internal clone) 37 38.. versionadded:: 2.8 39%End 40 ~QgsLegendSymbolItem(); 41 42 QgsLegendSymbolItem( const QgsLegendSymbolItem &other ); 43 44 QgsSymbol *symbol() const; 45%Docstring 46Returns associated symbol. May be ``None``. 47%End 48 QString label() const; 49%Docstring 50Returns text label 51%End 52 QString ruleKey() const; 53%Docstring 54Returns unique identifier of the rule for identification of the item within renderer 55%End 56 bool isCheckable() const; 57%Docstring 58Returns whether the item is user-checkable - whether renderer supports enabling/disabling it 59%End 60 61 QgsSymbol *legacyRuleKey() const; 62%Docstring 63Used for older code that identifies legend entries from symbol pointer within renderer 64%End 65 66 bool isScaleOK( double scale ) const; 67%Docstring 68Determine whether given scale is within the scale range. Returns ``True`` if scale or scale range is invalid (value <= 0) 69%End 70 71 int scaleMinDenom() const; 72%Docstring 73Min scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 1000. 74Value <= 0 means the range is unbounded on this side 75%End 76 77 int scaleMaxDenom() const; 78%Docstring 79Max scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 2000. 80Value <= 0 means the range is unbounded on this side 81%End 82 83 int level() const; 84%Docstring 85Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0 86%End 87 88 QString parentRuleKey() const; 89%Docstring 90Key of the parent legend node. For legends with tree hierarchy 91 92.. note:: 93 94 Parameter parentRuleKey added in QGIS 2.8 95%End 96 97 void setSymbol( QgsSymbol *s ); 98%Docstring 99Sets the symbol of the item. 100 101Does not take ownership of symbol -- an internal clone is made of the symbol. 102 103.. seealso:: :py:func:`symbol` 104%End 105 106 void setDataDefinedSizeLegendSettings( QgsDataDefinedSizeLegend *settings /Transfer/ ); 107%Docstring 108Sets extra information about data-defined size. If set, this item should be converted to :py:class:`QgsDataDefinedSizeLegendNode` 109rather than QgsSymbolLegendNode instance as usual. Passing ``None`` removes any data-defined size legend settings. 110 111Takes ownership of the settings object. 112 113.. versionadded:: 3.0 114%End 115 116 QgsDataDefinedSizeLegend *dataDefinedSizeLegendSettings() const; 117%Docstring 118Returns extra information for data-defined size legend rendering. Normally it returns ``None``. 119 120.. versionadded:: 3.0 121%End 122 123}; 124 125typedef QList< QgsLegendSymbolItem > QgsLegendSymbolList; 126 127/************************************************************************ 128 * This file has been generated automatically from * 129 * * 130 * src/core/symbology/qgslegendsymbolitem.h * 131 * * 132 * Do not edit manually ! Edit header and run scripts/sipify.pl again * 133 ************************************************************************/ 134