22 : mSymbol( symbol ? symbol->clone() : nullptr )
25 , mCheckable( checkable )
26 , mOriginalSymbolPointer( symbol )
27 , mScaleMinDenom( scaleMinDenom )
28 , mScaleMaxDenom( scaleMaxDenom )
30 , mParentKey( parentRuleKey )
42 delete mDataDefinedSizeLegendSettings;
51 mSymbol = other.mSymbol ? other.mSymbol->
clone() :
nullptr;
52 mLabel = other.mLabel;
54 mCheckable = other.mCheckable;
55 delete mDataDefinedSizeLegendSettings;
56 mDataDefinedSizeLegendSettings = other.mDataDefinedSizeLegendSettings ?
new QgsDataDefinedSizeLegend( *other.mDataDefinedSizeLegendSettings ) :
nullptr;
57 mOriginalSymbolPointer = other.mOriginalSymbolPointer;
58 mScaleMinDenom = other.mScaleMinDenom;
59 mScaleMaxDenom = other.mScaleMaxDenom;
60 mLevel = other.mLevel;
61 mParentKey = other.mParentKey;
62 mUserData = other.mUserData;
71 if ( mScaleMinDenom <= 0 && mScaleMaxDenom <= 0 )
73 if ( mScaleMinDenom > 0 && mScaleMinDenom > scale )
75 if ( mScaleMaxDenom > 0 && mScaleMaxDenom < scale )
83 mSymbol = s ? s->
clone() :
nullptr;
84 mOriginalSymbolPointer = s;
89 delete mDataDefinedSizeLegendSettings;
90 mDataDefinedSizeLegendSettings = settings;
95 return mDataDefinedSizeLegendSettings;
100 mUserData.insert( key, value );
105 return mUserData.value( key, QVariant() );
Object that keeps configuration of appearance of marker symbol's data-defined size in legend.
The class stores information about one class/rule of a vector layer renderer in a unified way that ca...
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.
void setUserData(int key, QVariant &value)
Adds a key - value pair to the item's user data.
void setDataDefinedSizeLegendSettings(QgsDataDefinedSizeLegend *settings)
Sets extra information about data-defined size.
void setSymbol(QgsSymbol *s)
Sets the symbol of the item.
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...
QgsLegendSymbolItem()=default
Abstract base class for all rendered symbols.
virtual QgsSymbol * clone() const =0
Returns a deep copy of this symbol.