Skip to content

Commit ac6ed1a

Browse files
m-kuhnnyalldawson
authored andcommittedMay 1, 2019
Doxygen for QgsSymbolLayer::setRenderingPass
1 parent 4ee4099 commit ac6ed1a

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed
 

‎python/core/auto_generated/symbology/qgssymbollayer.sip.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,20 @@ layer may use it to specify the units for the line width.
288288
virtual QgsMapUnitScale mapUnitScale() const;
289289

290290
void setRenderingPass( int renderingPass );
291+
%Docstring
292+
Specifies the rendering pass in which this symbol layer should be rendered.
293+
The lower the number, the lower the symbol will be rendered.
294+
0: first pass, 1: second pass, ...
295+
Defaults to 0
296+
%End
297+
291298
int renderingPass() const;
299+
%Docstring
300+
Specifies the rendering pass in which this symbol layer should be rendered.
301+
The lower the number, the lower the symbol will be rendered.
302+
0: first pass, 1: second pass, ...
303+
Defaults to 0
304+
%End
292305

293306
virtual QSet<QString> usedAttributes( const QgsRenderContext &context ) const;
294307
%Docstring

‎src/core/symbology/qgssymbollayer.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ QgsSymbolLayer::QgsSymbolLayer( QgsSymbol::SymbolType type, bool locked )
176176
: mType( type )
177177
, mEnabled( true )
178178
, mLocked( locked )
179-
, mRenderingPass( 0 )
180179

181180
{
182181
mPaintEffect = QgsPaintEffectRegistry::defaultStack();
@@ -218,6 +217,16 @@ bool QgsSymbolLayer::isCompatibleWithSymbol( QgsSymbol *symbol ) const
218217
return symbol->type() == mType;
219218
}
220219

220+
void QgsSymbolLayer::setRenderingPass( int renderingPass )
221+
{
222+
mRenderingPass = renderingPass;
223+
}
224+
225+
int QgsSymbolLayer::renderingPass() const
226+
{
227+
return mRenderingPass;
228+
}
229+
221230
QSet<QString> QgsSymbolLayer::usedAttributes( const QgsRenderContext &context ) const
222231
{
223232
QSet<QString> columns = mDataDefinedProperties.referencedFields( context.expressionContext() );

‎src/core/symbology/qgssymbollayer.h

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,21 @@ class CORE_EXPORT QgsSymbolLayer
308308
virtual void setMapUnitScale( const QgsMapUnitScale &scale ) { Q_UNUSED( scale ); }
309309
virtual QgsMapUnitScale mapUnitScale() const { return QgsMapUnitScale(); }
310310

311-
// used only with rending with symbol levels is turned on (0 = first pass, 1 = second, ...)
312-
void setRenderingPass( int renderingPass ) { mRenderingPass = renderingPass; }
313-
int renderingPass() const { return mRenderingPass; }
311+
/**
312+
* Specifies the rendering pass in which this symbol layer should be rendered.
313+
* The lower the number, the lower the symbol will be rendered.
314+
* 0: first pass, 1: second pass, ...
315+
* Defaults to 0
316+
*/
317+
void setRenderingPass( int renderingPass );
318+
319+
/**
320+
* Specifies the rendering pass in which this symbol layer should be rendered.
321+
* The lower the number, the lower the symbol will be rendered.
322+
* 0: first pass, 1: second pass, ...
323+
* Defaults to 0
324+
*/
325+
int renderingPass() const;
314326

315327
/**
316328
* Returns the set of attributes referenced by the layer. This includes attributes
@@ -419,7 +431,7 @@ class CORE_EXPORT QgsSymbolLayer
419431

420432
bool mLocked;
421433
QColor mColor;
422-
int mRenderingPass;
434+
int mRenderingPass = 0;
423435

424436
QgsPropertyCollection mDataDefinedProperties;
425437

0 commit comments

Comments
 (0)
Please sign in to comment.