QGIS/python/core/auto_generated/qgslegendrenderer.sip.in

69 lines
2.3 KiB
Plaintext
Raw Normal View History

2017-05-14 09:48:41 +02:00
/************************************************************************
* 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
{
2017-05-14 09:48:41 +02:00
%Docstring
The QgsLegendRenderer class handles automatic layout and rendering of legend.
2017-12-15 10:36:55 -04:00
The content is given by QgsLayerTreeModel instance. Various layout properties can be configured
within QgsLegendRenderer.
2017-05-14 09:48:41 +02:00
2017-12-15 10:36:55 -04:00
All spacing and sizes are in millimeters.
2017-05-14 09:48:41 +02:00
.. versionadded:: 2.6
%End
2017-05-14 09:48:41 +02:00
%TypeHeaderCode
#include "qgslegendrenderer.h"
%End
public:
QgsLegendRenderer( QgsLayerTreeModel *legendModel, const QgsLegendSettings &settings );
2017-05-14 09:48:41 +02:00
%Docstring
Construct legend renderer. The ownership of legend model does not change
%End
QSizeF minimumSize();
2017-05-14 09:48:41 +02:00
%Docstring
Run the layout algorithm and determine the size required for legend
%End
void setLegendSize( QSizeF s );
2017-05-14 09:48:41 +02:00
%Docstring
Sets the preferred resulting legend size.
2017-05-14 09:48:41 +02:00
%End
QSizeF legendSize() const;
2017-05-14 09:48:41 +02:00
%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 );
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-05-14 09:48:41 +02:00
%End
static void setNodeLegendStyle( QgsLayerTreeNode *node, QgsLegendStyle::Style style );
static QgsLegendStyle::Style nodeLegendStyle( QgsLayerTreeNode *node, QgsLayerTreeModel *model );
};
2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgslegendrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/