Skip to content
Permalink
Browse files

Add missing since annotation

  • Loading branch information
nyalldawson committed Jan 9, 2019
1 parent 5c2b394 commit 32126ca2b88728b6270536cb8723f54a2d11e31e
@@ -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.

0 comments on commit 32126ca

Please sign in to comment.
You can’t perform that action at this time.