16 #ifndef QGSDATADEFINEDSIZELEGEND_H    17 #define QGSDATADEFINEDSIZELEGEND_H    72       SizeClass( 
double size, 
const QString &label ): size( size ), label( label ) {}
    94     void setClasses( 
const QList< QgsDataDefinedSizeLegend::SizeClass > &classes ) { mSizeClasses = classes; }
    96     QList< QgsDataDefinedSizeLegend::SizeClass > 
classes()
 const { 
return mSizeClasses; }
    99     void setTitle( 
const QString &title ) { mTitleLabel = title; }
   101     QString 
title()
 const { 
return mTitleLabel; }
   109     void setFont( 
const QFont &font ) { mFont = font; }
   111     QFont 
font()
 const { 
return mFont; }
   139     QImage collapsedLegendImage( 
QgsRenderContext &context, 
const QColor &backgroundColor = Qt::transparent, 
double paddingMM = 1 ) 
const;
   150     QList< SizeClass > mSizeClasses;  
   151     std::unique_ptr<QgsMarkerSymbol> mSymbol;
   152     std::unique_ptr<QgsSizeScaleTransformer> mSizeScaleTransformer;  
   155     QColor mTextColor = Qt::black;
   156     Qt::AlignmentFlag mTextAlignment = Qt::AlignLeft;
   159 #endif // QGSDATADEFINEDSIZELEGEND_H The class is used as a container of context for various read/write operations on other objects...
 
Symbols are aligned to the center. 
 
Each class (size value) has a separate legend node. 
 
QString label
Label to be shown with the particular symbol size. 
 
QList< QgsLegendSymbolItem > QgsLegendSymbolList
 
void setTextAlignment(Qt::AlignmentFlag flag)
Sets horizontal text alignment for rendering of labels - only valid for collapsed legend...
 
QFont font() const
Returns font used for rendering of labels - only valid for collapsed legend. 
 
void setFont(const QFont &font)
Sets font used for rendering of labels - only valid for collapsed legend. 
 
Definition of one class for the legend. 
 
QColor textColor() const
Returns text color for rendering of labels - only valid for collapsed legend. 
 
void setTitle(const QString &title)
Sets title label for data-defined size legend. 
 
void setLegendType(LegendType type)
Sets how the legend should be rendered. 
 
A marker symbol type, for rendering Point and MultiPoint geometries. 
 
QList< QgsDataDefinedSizeLegend::SizeClass > classes() const
Returns list of classes: each class is a pair of symbol size (in units used by the symbol) and label...
 
double size
Marker size in units used by the symbol (usually millimeters). May be further scaled before rendering...
 
A store for object properties. 
 
SizeClass(double size, const QString &label)
 
void setVerticalAlignment(VerticalAlignment vAlign)
Sets vertical alignment of symbols - only valid for collapsed legend. 
 
Symbols are aligned to the bottom. 
 
LegendType
Determines how to display data-defined size legend. 
 
Contains information about the context of a rendering operation. 
 
VerticalAlignment
How to vertically align symbols when all classes go into one node. 
 
QString title() const
Returns title label for data-defined size legend. 
 
LegendType legendType() const
Returns how the legend should be rendered. 
 
VerticalAlignment verticalAlignment() const
Returns vertical alignment of symbols - only valid for collapsed legend. 
 
void setTextColor(const QColor &color)
Sets text color for rendering of labels - only valid for collapsed legend. 
 
Qt::AlignmentFlag textAlignment() const
Returns horizontal text alignment for rendering of labels - only valid for collapsed legend...
 
Object that keeps configuration of appearance of marker symbol's data-defined size in legend...
 
All classes are rendered within one legend node. 
 
void setClasses(const QList< QgsDataDefinedSizeLegend::SizeClass > &classes)
Sets list of classes: each class is a pair of symbol size (in units used by the symbol) and label...