119 Q_DECL_DEPRECATED
void drawLegend( QPainter *painter )
SIP_DEPRECATED;
160 class LegendComponent
164 LegendComponent() =
default;
166 QObject *item =
nullptr;
189 double labelXOffset = 0.0;
195 double maxSiblingSymbolWidth = 0.0;
212 class LegendComponentGroup
217 QList<LegendComponent> components;
220 QSizeF size = QSizeF( 0, 0 );
228 bool placeColumnBreakBeforeGroup =
false;
251 QList<LegendComponentGroup> createComponentGroupList( QgsLayerTreeGroup *parentGroup, QgsRenderContext &context,
double indent = 0 );
258 int setColumns( QList<LegendComponentGroup> &groupList );
263 double spaceAboveGroup(
const LegendComponentGroup &group );
270 QJsonObject exportLegendToJson(
const QgsRenderContext &context, QgsLayerTreeGroup *nodeGroup );
278 QSizeF paintAndDetermineSize( QgsRenderContext &context );
287 QSizeF drawTitle( QgsRenderContext &context,
double top, Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 )
const;
297 QSizeF drawGroup(
const LegendComponentGroup &group, QgsRenderContext &context, ColumnContext columnContext,
double top = 0 );
302 LegendComponent drawSymbolItem( QgsLayerTreeModelLegendNode *symbolItem, QgsRenderContext &context, ColumnContext columnContext,
double top,
double maxSiblingSymbolWidth = 0 );
311 QSizeF drawLayerTitle( QgsLayerTreeLayer *nodeLayer, QgsRenderContext &context, ColumnContext columnContext = ColumnContext(),
double top = 0 );
318 QSizeF drawGroupTitle( QgsLayerTreeGroup *nodeGroup, QgsRenderContext &context, ColumnContext columnContext = ColumnContext(),
double top = 0 );
325 QgsLayerTreeModel *mLegendModel =
nullptr;
326 std::unique_ptr< QgsLayerTreeFilterProxyModel >mProxyModel;
328 QgsLegendSettings mSettings;
335 QgsLegendRenderer(
const QgsLegendRenderer &other );
338 void widthAndOffsetForTitleText(
const Qt::AlignmentFlag halignment,
double legendWidth,
double &width,
double &offset )
const;
Contains information about the context of a rendering operation.