/************************************************************************ * This file has been generated automatically from * * * * src/core/qgslegendrenderer.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsLegendRenderer { %Docstring The QgsLegendRenderer class handles automatic layout and rendering of legend. The content is given by QgsLayerTreeModel instance. Various layout properties can be configured within QgsLegendRenderer. All spacing and sizes are in millimeters. .. versionadded:: 2.6 %End %TypeHeaderCode #include "qgslegendrenderer.h" %End public: QgsLegendRenderer( QgsLayerTreeModel *legendModel, const QgsLegendSettings &settings ); %Docstring Construct legend renderer. The ownership of legend model does not change %End QSizeF minimumSize(); %Docstring Run the layout algorithm and determine the size required for legend %End void setLegendSize( QSizeF s ); %Docstring Sets the preferred resulting legend size. %End QSizeF legendSize() const; %Docstring Find out preferred legend size set by the client. If null, the legend will be drawn with the minimum size %End void drawLegend( QPainter *painter ); %Docstring Draw the legend with given painter. It will occupy the area reported in legendSize(). Painter should be scaled beforehand so that units correspond to millimeters. %End static void setNodeLegendStyle( QgsLayerTreeNode *node, QgsLegendStyle::Style style ); static QgsLegendStyle::Style nodeLegendStyle( QgsLayerTreeNode *node, QgsLayerTreeModel *model ); }; /************************************************************************ * This file has been generated automatically from * * * * src/core/qgslegendrenderer.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/