Skip to content

Commit

Permalink
Doxygen for QgsSymbolLayer::setRenderingPass
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed May 1, 2019
1 parent 4ee4099 commit ac6ed1a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
13 changes: 13 additions & 0 deletions python/core/auto_generated/symbology/qgssymbollayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,20 @@ layer may use it to specify the units for the line width.
virtual QgsMapUnitScale mapUnitScale() const;

void setRenderingPass( int renderingPass );
%Docstring
Specifies the rendering pass in which this symbol layer should be rendered.
The lower the number, the lower the symbol will be rendered.
0: first pass, 1: second pass, ...
Defaults to 0
%End

int renderingPass() const;
%Docstring
Specifies the rendering pass in which this symbol layer should be rendered.
The lower the number, the lower the symbol will be rendered.
0: first pass, 1: second pass, ...
Defaults to 0
%End

virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
%Docstring
Expand Down
11 changes: 10 additions & 1 deletion src/core/symbology/qgssymbollayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ QgsSymbolLayer::QgsSymbolLayer( QgsSymbol::SymbolType type, bool locked )
: mType( type )
, mEnabled( true )
, mLocked( locked )
, mRenderingPass( 0 )

{
mPaintEffect = QgsPaintEffectRegistry::defaultStack();
Expand Down Expand Up @@ -218,6 +217,16 @@ bool QgsSymbolLayer::isCompatibleWithSymbol( QgsSymbol *symbol ) const
return symbol->type() == mType;
}

void QgsSymbolLayer::setRenderingPass( int renderingPass )
{
mRenderingPass = renderingPass;
}

int QgsSymbolLayer::renderingPass() const
{
return mRenderingPass;
}

QSet<QString> QgsSymbolLayer::usedAttributes( const QgsRenderContext &context ) const
{
QSet<QString> columns = mDataDefinedProperties.referencedFields( context.expressionContext() );
Expand Down
20 changes: 16 additions & 4 deletions src/core/symbology/qgssymbollayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,21 @@ class CORE_EXPORT QgsSymbolLayer
virtual void setMapUnitScale( const QgsMapUnitScale &scale ) { Q_UNUSED( scale ); }
virtual QgsMapUnitScale mapUnitScale() const { return QgsMapUnitScale(); }

// used only with rending with symbol levels is turned on (0 = first pass, 1 = second, ...)
void setRenderingPass( int renderingPass ) { mRenderingPass = renderingPass; }
int renderingPass() const { return mRenderingPass; }
/**
* Specifies the rendering pass in which this symbol layer should be rendered.
* The lower the number, the lower the symbol will be rendered.
* 0: first pass, 1: second pass, ...
* Defaults to 0
*/
void setRenderingPass( int renderingPass );

/**
* Specifies the rendering pass in which this symbol layer should be rendered.
* The lower the number, the lower the symbol will be rendered.
* 0: first pass, 1: second pass, ...
* Defaults to 0
*/
int renderingPass() const;

/**
* Returns the set of attributes referenced by the layer. This includes attributes
Expand Down Expand Up @@ -419,7 +431,7 @@ class CORE_EXPORT QgsSymbolLayer

bool mLocked;
QColor mColor;
int mRenderingPass;
int mRenderingPass = 0;

QgsPropertyCollection mDataDefinedProperties;

Expand Down

0 comments on commit ac6ed1a

Please sign in to comment.