mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Add missing since annotation
This commit is contained in:
parent
5c2b39438b
commit
32126ca2b8
@ -71,9 +71,11 @@ Draws the legend with given ``painter``. The legend will occupy the area reporte
|
||||
The ``painter`` should be scaled beforehand so that units correspond to millimeters.
|
||||
%End
|
||||
|
||||
void drawLegend( QgsRenderContext *rendercontext );
|
||||
void drawLegend( QgsRenderContext &context );
|
||||
%Docstring
|
||||
Draws the legend using a given :py:class:`QgsRenderContext`. The legend will occupy the area reported in legendSize().
|
||||
Draws the legend using a given render ``context``. The legend will occupy the area reported in legendSize().
|
||||
|
||||
.. versionadded:: 3.6
|
||||
%End
|
||||
|
||||
static void setNodeLegendStyle( QgsLayerTreeNode *node, QgsLegendStyle::Style style );
|
||||
|
@ -831,12 +831,12 @@ QSizeF QgsLegendRenderer::drawGroupTitle( QgsLayerTreeGroup *nodeGroup, QgsRende
|
||||
}
|
||||
|
||||
|
||||
void QgsLegendRenderer::drawLegend( QgsRenderContext *rendercontext )
|
||||
void QgsLegendRenderer::drawLegend( QgsRenderContext &context )
|
||||
{
|
||||
paintAndDetermineSize( rendercontext );
|
||||
paintAndDetermineSize( &context );
|
||||
}
|
||||
|
||||
QSizeF QgsLegendRenderer::paintAndDetermineSize( QgsRenderContext *rendercontext )
|
||||
QSizeF QgsLegendRenderer::paintAndDetermineSize( QgsRenderContext *context )
|
||||
{
|
||||
QSizeF size( 0, 0 );
|
||||
QgsLayerTreeGroup *rootGroup = mLegendModel->rootGroup();
|
||||
@ -889,7 +889,7 @@ QSizeF QgsLegendRenderer::paintAndDetermineSize( QgsRenderContext *rendercontext
|
||||
point.ry() += spaceAboveAtom( atom );
|
||||
}
|
||||
|
||||
QSizeF atomSize = drawAtom( atom, rendercontext, point );
|
||||
QSizeF atomSize = drawAtom( atom, context, point );
|
||||
columnWidth = std::max( atomSize.width(), columnWidth );
|
||||
|
||||
point.ry() += atom.size.height();
|
||||
@ -930,7 +930,7 @@ QSizeF QgsLegendRenderer::paintAndDetermineSize( QgsRenderContext *rendercontext
|
||||
point.rx() = size.width() - mSettings.boxSpace();
|
||||
}
|
||||
point.ry() = mSettings.boxSpace();
|
||||
drawTitle( rendercontext, point, mSettings.titleAlignment(), size.width() );
|
||||
drawTitle( context, point, mSettings.titleAlignment(), size.width() );
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@ -86,9 +86,11 @@ class CORE_EXPORT QgsLegendRenderer
|
||||
void drawLegend( QPainter *painter );
|
||||
|
||||
/**
|
||||
* Draws the legend using a given QgsRenderContext. The legend will occupy the area reported in legendSize().
|
||||
* Draws the legend using a given render \a context. The legend will occupy the area reported in legendSize().
|
||||
*
|
||||
* \since QGIS 3.6
|
||||
*/
|
||||
void drawLegend( QgsRenderContext *rendercontext );
|
||||
void drawLegend( QgsRenderContext &context );
|
||||
|
||||
/**
|
||||
* Sets the \a style of a \a node.
|
||||
|
Loading…
x
Reference in New Issue
Block a user