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;
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;
309 #endif // QGSLEGENDRENDERER_H