118 Q_DECL_DEPRECATED
void drawLegend( QPainter *painter )
SIP_DEPRECATED;
158 class LegendComponent
161 LegendComponent() =
default;
163 QObject *item =
nullptr;
186 double labelXOffset = 0.0;
192 double maxSiblingSymbolWidth = 0.0;
209 class LegendComponentGroup
213 QList<LegendComponent> components;
216 QSizeF size = QSizeF( 0, 0 );
224 bool placeColumnBreakBeforeGroup =
false;
245 QList<LegendComponentGroup> createComponentGroupList( QgsLayerTreeGroup *parentGroup, QgsRenderContext &context,
double indent = 0 );
252 int setColumns( QList<LegendComponentGroup> &groupList );
257 double spaceAboveGroup(
const LegendComponentGroup &group );
264 QJsonObject exportLegendToJson(
const QgsRenderContext &context, QgsLayerTreeGroup *nodeGroup );
272 QSizeF paintAndDetermineSize( QgsRenderContext &context );
281 QSizeF drawTitle( QgsRenderContext &context,
double top, Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 )
const;
291 QSizeF drawGroup(
const LegendComponentGroup &group, QgsRenderContext &context, ColumnContext columnContext,
double top = 0 );
296 LegendComponent drawSymbolItem( QgsLayerTreeModelLegendNode *symbolItem, QgsRenderContext &context, ColumnContext columnContext,
double top,
double maxSiblingSymbolWidth = 0 );
305 QSizeF drawLayerTitle( QgsLayerTreeLayer *nodeLayer, QgsRenderContext &context, ColumnContext columnContext = ColumnContext(),
double top = 0 );
312 QSizeF drawGroupTitle( QgsLayerTreeGroup *nodeGroup, QgsRenderContext &context, ColumnContext columnContext = ColumnContext(),
double top = 0 );
319 QgsLayerTreeModel *mLegendModel =
nullptr;
320 std::unique_ptr< QgsLayerTreeFilterProxyModel > mProxyModel;
322 QgsLegendSettings mSettings;
329 QgsLegendRenderer(
const QgsLegendRenderer &other );
332 void widthAndOffsetForTitleText(
const Qt::AlignmentFlag halignment,
double legendWidth,
double &width,
double &offset )
const;
Contains information about the context of a rendering operation.