16#ifndef QGSLEGENDRENDERER_H
17#define QGSLEGENDRENDERER_H
89 Q_DECL_DEPRECATED
void drawLegend( QPainter *painter )
SIP_DEPRECATED;
130 class LegendComponent
134 LegendComponent() =
default;
136 QObject *item =
nullptr;
159 double labelXOffset = 0.0;
165 double maxSiblingSymbolWidth = 0.0;
182 class LegendComponentGroup
187 QList<LegendComponent> components;
190 QSizeF size = QSizeF( 0, 0 );
198 bool placeColumnBreakBeforeGroup =
false;
231 int setColumns( QList<LegendComponentGroup> &groupList );
236 double spaceAboveGroup(
const LegendComponentGroup &group );
260 QSizeF drawTitle(
QgsRenderContext &context,
double top, Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 );
270 QSizeF drawGroup(
const LegendComponentGroup &group,
QgsRenderContext &context, ColumnContext columnContext,
double top = 0 );
306 void widthAndOffsetForTitleText(
const Qt::AlignmentFlag halignment,
double legendWidth,
double &width,
double &offset )
const;
Layer tree group node serves as a container for layers and further groups.
Layer tree node points to a map layer.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
The QgsLayerTreeModel class is model implementation for Qt item views framework.
This class is a base class for nodes in a layer tree.
The QgsLegendRenderer class handles automatic layout and rendering of legend.
void setLegendSize(QSizeF s)
Sets the preferred resulting legend size.
QSizeF legendSize() const
Returns the preferred legend size set by the client.
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
Style
Component of legends which can be styled.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
QgsLayerTreeModel * legendModel(const QgsWmsRenderContext &context, QgsLayerTree &tree)