Skip to content

Commit

Permalink
Update doc and sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Apr 9, 2019
1 parent 70cd928 commit c09e10c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
11 changes: 11 additions & 0 deletions python/core/auto_generated/layertree/qgslayertreelayer.sip.in
Expand Up @@ -79,8 +79,19 @@ Sets the layer's name.
%End

void setUseLayerName( bool use = true );
%Docstring
Uses the layer's name if ``use`` is true, or the name manually set if
false.

.. versionadded:: 3.8
%End

bool useLayerName() const;
%Docstring
Returns whether the layer's name is used, or the name manually set.

.. versionadded:: 3.8
%End

static QgsLayerTreeLayer *readXml( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Expand Down
9 changes: 9 additions & 0 deletions src/core/layertree/qgslayertreelayer.h
Expand Up @@ -90,8 +90,17 @@ class CORE_EXPORT QgsLayerTreeLayer : public QgsLayerTreeNode
*/
void setName( const QString &n ) override;

/**
* Uses the layer's name if \a use is true, or the name manually set if
* false.
* \since QGIS 3.8
*/
void setUseLayerName( bool use = true );

/**
* Returns whether the layer's name is used, or the name manually set.
* \since QGIS 3.8
*/
bool useLayerName() const;

/**
Expand Down
19 changes: 17 additions & 2 deletions src/server/services/wms/qgswmsrenderer.h
Expand Up @@ -77,15 +77,30 @@ namespace QgsWms
~QgsRenderer();

/**
* Returns the map legend as an image (or NULLPTR in case of error). The caller takes ownership
of the image object*/
* Returns the map legend as an image (or NULLPTR in case of error). The
* caller takes ownership of the image object.
* \param model The layer tree model to use for building the legend
* \returns the legend as an image
* \since QGIS 3.8
*/
QImage *getLegendGraphics( QgsLayerTreeModel &model );

/**
* Returns the map legend as an image (or NULLPTR in case of error). The
* caller takes ownership of the image object.
* \param nodeModel The node model to use for building the legend
* \returns the legend as an image
* \since QGIS 3.8
*/
QImage *getLegendGraphics( QgsLayerTreeModelLegendNode &nodeModel );

typedef QSet<QString> SymbolSet;
typedef QHash<QgsVectorLayer *, SymbolSet> HitTest;

/**
* Returns the hit test according to the current context.
* \since QGIS 3.8
*/
HitTest symbols();

/**
Expand Down

0 comments on commit c09e10c

Please sign in to comment.