| 
    QGIS API Documentation
    3.26.3-Buenos Aires (65e4edfdad)
    
   | 
 
 
 
 
Go to the documentation of this file.
   16 #ifndef QGSCOLORRAMPLEGENDNODE_H 
   17 #define QGSCOLORRAMPLEGENDNODE_H 
   19 #include "qgis_core.h" 
   50                             const QString &minimumLabel, 
const QString &maximumLabel, QObject *parent 
SIP_TRANSFERTHIS = 
nullptr );
 
   66     QVariant 
data( 
int role ) 
const override;
 
  106     QString labelForMinimum() 
const;
 
  107     QString labelForMaximum() 
const;
 
  109     std::unique_ptr< QgsColorRamp > mRamp;
 
  111     mutable QPixmap mPixmap; 
 
  115     double mMinimumValue = 0;
 
  116     double mMaximumValue = 0;
 
  122 #endif // QGSCOLORRAMPLEGENDNODE_H 
  
Abstract base class for color ramps.
 
virtual QVariant data(int role) const =0
Returns data associated with the item. Must be implemented in derived class.
 
virtual QSizeF drawSymbolText(const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize) const
Draws label on the right side of the item.
 
A legend node which renders a color ramp.
 
Layer tree node points to a map layer.
 
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
 
void setIconSize(QSize size)
Set the icon size, which controls how large the ramp will render in a layer tree widget.
 
virtual QSizeF drawSymbol(const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const
Draws symbol on the left side of the item.
 
Settings for a color ramp legend node.
 
QSize iconSize() const
Returns the icon size, which is how large the ramp will render in a layer tree widget.
 
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...