22 : mSymbol( symbol ? symbol->clone() : nullptr )
25 , mCheckable( checkable )
26 , mOriginalSymbolPointer( symbol )
27 , mScaleMinDenom( scaleMinDenom )
28 , mScaleMaxDenom( scaleMaxDenom )
30 , mParentKey( parentRuleKey )
43 delete mDataDefinedSizeLegendSettings;
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;
70 if ( mScaleMinDenom <= 0 && mScaleMaxDenom <= 0 )
72 if ( mScaleMinDenom > 0 && mScaleMinDenom > scale )
74 if ( mScaleMaxDenom > 0 && mScaleMaxDenom < scale )
82 mSymbol = s ? s->
clone() :
nullptr;
83 mOriginalSymbolPointer = s;
88 delete mDataDefinedSizeLegendSettings;
89 mDataDefinedSizeLegendSettings = settings;
94 return mDataDefinedSizeLegendSettings;
QgsLegendSymbolItem()=default
Constructor for QgsLegendSymbolItem.
QgsLegendSymbolItem & operator=(const QgsLegendSymbolItem &other)
void setSymbol(QgsSymbol *s)
Sets symbol of the item. Takes ownership of symbol.
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.
virtual QgsSymbol * clone() const =0
Gets a deep copy of this symbol.
bool isScaleOK(double scale) const
Determine whether given scale is within the scale range. Returns true if scale or scale range is inva...
Object that keeps configuration of appearance of marker symbol's data-defined size in legend...
void setDataDefinedSizeLegendSettings(QgsDataDefinedSizeLegend *settings)
Sets extra information about data-defined size.