Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update doc
  • Loading branch information
pblottiere committed Mar 20, 2019
1 parent 89a1b1a commit 0cdd80d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Expand Up @@ -98,8 +98,11 @@ If ctx is ``None``, this is just first stage when preparing layout - without act

void exportToJson( const QgsLegendSettings &settings, QJsonObject &json );
%Docstring
Entry point called from QgsLegendRenderer to do the rendering in a \a
json object.
Entry point called from QgsLegendRenderer to do the rendering in a
JSON object.

:param settings: Legend layout configuration
:param json: The json object to update

.. versionadded:: 3.8
%End
Expand All @@ -117,8 +120,7 @@ Draws symbol on the left side of the item

virtual void exportSymbolToJson( const QgsLegendSettings &settings, QJsonObject &json ) const;
%Docstring
Adds a symbol in base64 string within the ``json`` object with the key
"icon".
Adds a symbol in base64 string within a JSON object with the key "icon".

:param settings: Legend layout configuration
:param json: The json object to update
Expand All @@ -139,7 +141,7 @@ Draws label on the right side of the item

void exportSymbolTextToJson( const QgsLegendSettings &settings, QJsonObject &json ) const;
%Docstring
Adds a label in the ``json`` object with the key "title".
Adds a label in a JSON object with the key "title".

:param settings: Legend layout configuration
:param json: The json object to update
Expand Down
14 changes: 6 additions & 8 deletions src/core/layertree/qgslayertreemodellegendnode.h
Expand Up @@ -111,9 +111,10 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject
virtual ItemMetrics draw( const QgsLegendSettings &settings, ItemContext *ctx );

/**
* Entry point called from QgsLegendRenderer to do the rendering in a \a
* json object.
*
* Entry point called from QgsLegendRenderer to do the rendering in a
* JSON object.
* \param settings Legend layout configuration
* \param json The json object to update
* \since QGIS 3.8
*/
void exportToJson( const QgsLegendSettings &settings, QJsonObject &json );
Expand All @@ -128,11 +129,9 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject
virtual QSizeF drawSymbol( const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight ) const;

/**
* Adds a symbol in base64 string within the \a json object with the key
* "icon".
* Adds a symbol in base64 string within a JSON object with the key "icon".
* \param settings Legend layout configuration
* \param json The json object to update
*
* \since QGIS 3.8
*/
virtual void exportSymbolToJson( const QgsLegendSettings &settings, QJsonObject &json ) const;
Expand All @@ -147,10 +146,9 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject
virtual QSizeF drawSymbolText( const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize ) const;

/**
* Adds a label in the \a json object with the key "title".
* Adds a label in a JSON object with the key "title".
* \param settings Legend layout configuration
* \param json The json object to update
*
* \since QGIS 3.8
*/
void exportSymbolTextToJson( const QgsLegendSettings &settings, QJsonObject &json ) const;
Expand Down

0 comments on commit 0cdd80d

Please sign in to comment.