27 , mCheckable( checkable )
28 , mOriginalSymbolPointer(
symbol )
50 mSymbol.reset( other.mSymbol ? other.mSymbol->clone() :
nullptr );
51 mLabel = other.mLabel;
53 mCheckable = other.mCheckable;
54 mDataDefinedSizeLegendSettings.reset( other.mDataDefinedSizeLegendSettings ?
new QgsDataDefinedSizeLegend( *other.mDataDefinedSizeLegendSettings ) :
nullptr );
55 mOriginalSymbolPointer = other.mOriginalSymbolPointer;
56 mScaleMinDenom = other.mScaleMinDenom;
57 mScaleMaxDenom = other.mScaleMaxDenom;
58 mLevel = other.mLevel;
59 mParentKey = other.mParentKey;
60 mUserData = other.mUserData;
69 if ( mScaleMinDenom <= 0 && mScaleMaxDenom <= 0 )
71 if ( mScaleMinDenom > 0 && mScaleMinDenom > scale )
73 if ( mScaleMaxDenom > 0 && mScaleMaxDenom < scale )
80 mSymbol.reset( s ? s->
clone() :
nullptr );
81 mOriginalSymbolPointer = s;
86 mDataDefinedSizeLegendSettings.reset( settings );
91 return mDataDefinedSizeLegendSettings.get();
96 mUserData.insert( key, value );
101 return mUserData.value( key, QVariant() );
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
QgsDataDefinedSizeLegend * dataDefinedSizeLegendSettings() const
Returns extra information for data-defined size legend rendering.
QVariant userData(int key) const
Retrieves the item's user data with the specified key.
QString parentRuleKey() const
Key of the parent legend node.
int level() const
Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0.
void setUserData(int key, QVariant &value)
Adds a key - value pair to the item's user data.
int scaleMaxDenom() const
Max scale denominator of the scale range.
void setDataDefinedSizeLegendSettings(QgsDataDefinedSizeLegend *settings)
Sets extra information about data-defined size.
void setSymbol(QgsSymbol *s)
Sets the symbol of the item.
int scaleMinDenom() const
Min scale denominator of the scale range.
QgsLegendSymbolItem & operator=(const QgsLegendSymbolItem &other)
bool isScaleOK(double scale) const
Determine whether given scale is within the scale range. Returns true if scale or scale range is inva...
QgsSymbol * symbol() const
Returns associated symbol. May be nullptr.
QString ruleKey() const
Returns unique identifier of the rule for identification of the item within renderer.
QString label() const
Returns text label.
Abstract base class for all rendered symbols.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.