16 #ifndef QGSLEGENDRENDERER_H 17 #define QGSLEGENDRENDERER_H 19 #include "qgis_core.h" 87 void drawLegend( QPainter *painter );
134 QObject *item =
nullptr;
151 double labelXOffset = 0.0;
173 QList<Nucleon> nucleons;
176 QSizeF size = QSizeF( 0, 0 );
188 QSizeF paintAndDetermineSize( QPainter *painter =
nullptr );
199 void setColumns( QList<Atom> &atomList );
208 QSizeF drawTitle( QPainter *painter =
nullptr, QPointF point = QPointF(), Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 );
213 double spaceAboveAtom(
const Atom &atom );
221 QSizeF drawAtom(
const Atom &atom, QPainter *painter =
nullptr, QPointF point = QPointF() );
226 Nucleon drawSymbolItem(
QgsLayerTreeModelLegendNode *symbolItem, QPainter *painter =
nullptr, QPointF point = QPointF(),
double labelXOffset = 0 );
235 QSizeF drawLayerTitle(
QgsLayerTreeLayer *nodeLayer, QPainter *painter =
nullptr, QPointF point = QPointF() );
241 QSizeF drawGroupTitle(
QgsLayerTreeGroup *nodeGroup, QPainter *painter =
nullptr, QPointF point = QPointF() );
265 QSizeF drawTitle(
QgsRenderContext *context, QPointF point = QPointF(), Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 );
275 QSizeF drawAtom(
const Atom &atom,
QgsRenderContext *rendercontext, QPointF point = QPointF() );
311 QSizeF drawTitleInternal(
QgsRenderContext *context, QPainter *painter, QPointF point, Qt::AlignmentFlag halignment,
double legendWidth );
312 QSizeF drawAtomInternal(
const Atom &atom,
QgsRenderContext *context, QPainter *painter, QPointF point );
316 QSizeF paintAndDetermineSizeInternal(
QgsRenderContext *context, QPainter *painter );
319 #endif // QGSLEGENDRENDERER_H Layer tree group node serves as a container for layers and further groups.
void setLegendSize(QSizeF s)
Sets the preferred resulting legend size.
Abstract base class for all rendered symbols.
The QgsLayerTreeModel class is model implementation for Qt item views framework.
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...
This class is a base class for nodes in a layer tree.
Contains information about the context of a rendering operation.
QgsLayerTreeModel * legendModel(const QgsWmsRenderContext &context, QgsLayerTree &tree)
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
Layer tree node points to a map layer.
The QgsLegendRenderer class handles automatic layout and rendering of legend.