Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dox
  • Loading branch information
nyalldawson committed May 18, 2021
1 parent b61dc7c commit 7291bbb
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/core/auto_generated/symbology/qgssymbol.sip.in
Expand Up @@ -611,6 +611,7 @@ Internally, this notifies all symbol layers which were used via a call to
%End

protected:

QgsSymbol( Qgis::SymbolType type, const QgsSymbolLayerList &layers /Transfer/ ); // can't be instantiated

static QPointF _getPoint( QgsRenderContext &context, const QgsPoint &point );
Expand Down
19 changes: 19 additions & 0 deletions python/core/auto_generated/symbology/qgssymbollayer.sip.in
Expand Up @@ -353,7 +353,20 @@ The default implementation returns ``False``.
%End

void setLocked( bool locked );
%Docstring
Sets whether the layer's colors are locked.

If ``locked`` is ``True`` then the symbol layer colors are locked and the layer will ignore any symbol-level color changes.

.. seealso:: :py:func:`isLocked`
%End

bool isLocked() const;
%Docstring
Returns ``True`` if the symbol layer colors are locked and the layer will ignore any symbol-level color changes.

.. seealso:: :py:func:`setLocked`
%End

virtual double estimateMaxBleed( const QgsRenderContext &context ) const;
%Docstring
Expand Down Expand Up @@ -550,6 +563,12 @@ This is a list of symbol layers of other layers that should be occluded.
protected:

QgsSymbolLayer( Qgis::SymbolType type, bool locked = false );
%Docstring
Constructor for QgsSymbolLayer.

:param type: specifies the associated symbol type
:param locked: if ``True``, then symbol layer colors will be locked and will ignore any symbol-level color changes.
%End



Expand Down
Expand Up @@ -25,7 +25,15 @@ Stores metadata about one symbol layer class.
#include "qgssymbollayerregistry.h"
%End
public:

QgsSymbolLayerAbstractMetadata( const QString &name, const QString &visibleName, Qgis::SymbolType type );
%Docstring
Constructor for QgsSymbolLayerAbstractMetadata.

:param name: internal symbol layer name (unique identifier)
:param visibleName: user visible, translated name for symbol layer
:param type: associated symbol type
%End

virtual ~QgsSymbolLayerAbstractMetadata();

Expand Down
6 changes: 6 additions & 0 deletions src/core/symbology/qgssymbol.h
Expand Up @@ -598,6 +598,12 @@ class CORE_EXPORT QgsSymbol
void stopFeatureRender( const QgsFeature &feature, QgsRenderContext &context, int layer = -1 );

protected:

/**
* Constructor for a QgsSymbol of the specified \a type.
*
* Ownership of \a layers will be transferred to the symbol.
*/
QgsSymbol( Qgis::SymbolType type, const QgsSymbolLayerList &layers SIP_TRANSFER ); // can't be instantiated

/**
Expand Down
18 changes: 18 additions & 0 deletions src/core/symbology/qgssymbollayer.h
Expand Up @@ -376,7 +376,20 @@ class CORE_EXPORT QgsSymbolLayer
*/
virtual bool canCauseArtifactsBetweenAdjacentTiles() const;

/**
* Sets whether the layer's colors are locked.
*
* If \a locked is TRUE then the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
*
* \see isLocked()
*/
void setLocked( bool locked ) { mLocked = locked; }

/**
* Returns TRUE if the symbol layer colors are locked and the layer will ignore any symbol-level color changes.
*
* \see setLocked()
*/
bool isLocked() const { return mLocked; }

/**
Expand Down Expand Up @@ -539,6 +552,11 @@ class CORE_EXPORT QgsSymbolLayer

protected:

/**
* Constructor for QgsSymbolLayer.
* \param type specifies the associated symbol type
* \param locked if TRUE, then symbol layer colors will be locked and will ignore any symbol-level color changes.
*/
QgsSymbolLayer( Qgis::SymbolType type, bool locked = false );

Qgis::SymbolType mType;
Expand Down
7 changes: 7 additions & 0 deletions src/core/symbology/qgssymbollayerregistry.h
Expand Up @@ -35,6 +35,13 @@ class QDomElement;
class CORE_EXPORT QgsSymbolLayerAbstractMetadata
{
public:

/**
* Constructor for QgsSymbolLayerAbstractMetadata.
* \param name internal symbol layer name (unique identifier)
* \param visibleName user visible, translated name for symbol layer
* \param type associated symbol type
*/
QgsSymbolLayerAbstractMetadata( const QString &name, const QString &visibleName, Qgis::SymbolType type )
: mName( name )
, mVisibleName( visibleName )
Expand Down

0 comments on commit 7291bbb

Please sign in to comment.