Skip to content

Commit

Permalink
More code layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed May 7, 2021
1 parent fc2a0d6 commit af607f7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
Expand Up @@ -681,37 +681,45 @@ Produces legend node for a labeling text symbol
QgsVectorLabelLegendNode( QgsLayerTreeLayer *nodeLayer, const QgsPalLayerSettings &labelSettings, QObject *parent = 0 );
%Docstring
QgsVectorLabelLegendNode
@param nodeLayer the parent node
@param labelSettings setting of the label class
@param parent the parent object

:param nodeLayer: the parent node
:param labelSettings: setting of the label class
:param parent: the parent object
%End
~QgsVectorLabelLegendNode();

virtual QVariant data( int role ) const;

%Docstring

data Returns data associated with the item
@param role the data role
@return variant containing the data for the role

:param role: the data role

:return: variant containing the data for the role
%End

virtual QSizeF drawSymbol( const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight ) const;

%Docstring
drawSymbol
@param settings the legend settings
@param ctx context for the item
@param itemHeight the height of the item
@return size of the item

:param settings: the legend settings
:param ctx: context for the item
:param itemHeight: the height of the item

:return: size of the item
%End

virtual QJsonObject exportSymbolToJson( const QgsLegendSettings &settings, const QgsRenderContext &context ) const;

%Docstring
exportSymbolToJson
@param settings the legend settings
@param context the item context
@return the json object

:param settings: the legend settings
:param context: the item context

:return: the json object
%End

};
Expand Down
33 changes: 17 additions & 16 deletions src/core/layertree/qgslayertreemodellegendnode.h
Expand Up @@ -733,35 +733,36 @@ class CORE_EXPORT QgsVectorLabelLegendNode : public QgsLayerTreeModelLegendNode
public:

/**
* @brief QgsVectorLabelLegendNode
* @param nodeLayer the parent node
* @param labelSettings setting of the label class
* @param parent the parent object
* \brief QgsVectorLabelLegendNode
* \param nodeLayer the parent node
* \param labelSettings setting of the label class
* \param parent the parent object
*/
QgsVectorLabelLegendNode( QgsLayerTreeLayer *nodeLayer, const QgsPalLayerSettings &labelSettings, QObject *parent = 0 );
~QgsVectorLabelLegendNode() override;

/**
* @brief data Returns data associated with the item
* @param role the data role
* @return variant containing the data for the role
*
* \brief data Returns data associated with the item
* \param role the data role
* \return variant containing the data for the role
*/
QVariant data( int role ) const override;

/**
* @brief drawSymbol
* @param settings the legend settings
* @param ctx context for the item
* @param itemHeight the height of the item
* @return size of the item
* \brief drawSymbol
* \param settings the legend settings
* \param ctx context for the item
* \param itemHeight the height of the item
* \return size of the item
*/
QSizeF drawSymbol( const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight ) const override;

/**
* @brief exportSymbolToJson
* @param settings the legend settings
* @param context the item context
* @return the json object
* \brief exportSymbolToJson
* \param settings the legend settings
* \param context the item context
* \return the json object
*/
QJsonObject exportSymbolToJson( const QgsLegendSettings &settings, const QgsRenderContext &context ) const override;

Expand Down

0 comments on commit af607f7

Please sign in to comment.