16 #ifndef QGSLEGENDRENDERER_H 17 #define QGSLEGENDRENDERER_H 19 #include "qgis_core.h" 63 void drawLegend( QPainter *painter );
84 QObject *item =
nullptr;
92 double labelXOffset = 0.0;
108 Atom(): size( QSizeF( 0, 0 ) ) {}
109 QList<Nucleon> nucleons;
115 QSizeF paintAndDetermineSize( QPainter *painter );
121 void setColumns( QList<Atom> &atomList );
127 QSizeF drawTitle( QPainter *painter =
nullptr, QPointF point = QPointF(), Qt::AlignmentFlag halignment = Qt::AlignLeft,
double legendWidth = 0 );
129 double spaceAboveAtom(
const Atom &atom );
135 QSizeF drawAtom(
const Atom &atom, QPainter *painter =
nullptr, QPointF point = QPointF() );
137 Nucleon drawSymbolItem(
QgsLayerTreeModelLegendNode *symbolItem, QPainter *painter =
nullptr, QPointF point = QPointF(),
double labelXOffset = 0 );
140 QSizeF drawLayerTitle(
QgsLayerTreeLayer *nodeLayer, QPainter *painter =
nullptr, QPointF point = QPointF() );
146 QSizeF drawGroupTitle(
QgsLayerTreeGroup *nodeGroup, QPainter *painter =
nullptr, QPointF point = QPointF() );
160 #endif // QGSLEGENDRENDERER_H Layer tree group node serves as a container for layers and further groups.
void setLegendSize(QSizeF s)
Set the preferred resulting legend size.
The QgsLayerTreeModel class is model implementation for Qt item views framework.
QSizeF legendSize() const
Find out preferred legend size set by the client. If null, the legend will be drawn with the minimum ...
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.
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.