16#ifndef QGSCOLORRAMPLEGENDNODE_H
17#define QGSCOLORRAMPLEGENDNODE_H
48 const QString &minimumLabel,
const QString &maximumLabel, QObject *parent
SIP_TRANSFERTHIS =
nullptr );
64 QVariant
data(
int role )
const override;
105 QString labelForMinimum()
const;
106 QString labelForMaximum()
const;
108 std::unique_ptr< QgsColorRamp > mRamp;
110 mutable QPixmap mPixmap;
114 double mMinimumValue = 0;
115 double mMaximumValue = 0;
Settings for a color ramp legend node.
A legend node which renders a color ramp.
QSize iconSize() const
Returns the icon size, which is how large the ramp will render in a layer tree widget.
void setIconSize(QSize size)
Set the icon size, which controls how large the ramp will render in a layer tree widget.
Abstract base class for color ramps.
Layer tree node points to a map layer.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
virtual QVariant data(int role) const =0
Returns data associated with the item. Must be implemented in derived class.
virtual QJsonObject exportSymbolToJson(const QgsLegendSettings &settings, const QgsRenderContext &context) const
Adds a symbol in base64 string within a JSON object with the key "icon".
virtual QSizeF drawSymbol(const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const
Draws symbol on the left side of the item.
virtual QSizeF drawSymbolText(const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize) const
Draws label on the right side of the item.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
Contains information about the context of a rendering operation.