16 #ifndef QGSLEGENDRENDERER_H
17 #define QGSLEGENDRENDERER_H
19 #include "qgis_core.h"
89 Q_DECL_DEPRECATED
void drawLegend( QPainter *painter )
SIP_DEPRECATED;
130 class LegendComponent
134 LegendComponent() =
default;
136 QObject *item =
nullptr;
153 double labelXOffset = 0.0;
159 double maxSiblingSymbolWidth = 0.0;
176 class LegendComponentGroup
181 QList<LegendComponent> components;
184 QSizeF size = QSizeF( 0, 0 );
192 bool placeColumnBreakBeforeGroup =
false;
225 int setColumns( QList<LegendComponentGroup> &groupList );
230 double spaceAboveGroup(
const LegendComponentGroup &group );
254 QSizeF drawTitle(
QgsRenderContext &context,
double top, Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 );
264 QSizeF drawGroup(
const LegendComponentGroup &group,
QgsRenderContext &context, ColumnContext columnContext,
double top = 0 );
300 void widthAndOffsetForTitleText(
const Qt::AlignmentFlag halignment,
double legendWidth,
double &width,
double &offset );
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)