Skip to content

Commit fa1e803

Browse files
committedNov 24, 2014
[symbology] Add method for retrieving symbol layers as list
1 parent a0c1380 commit fa1e803

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed
 

‎python/core/symbology-ng/qgssymbolv2.sip

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,30 @@ class QgsSymbolV2
5454
SymbolType type() const;
5555

5656
// symbol layers handling
57-
57+
58+
/**Returns list of symbol layers contained in the symbol.
59+
* @returns symbol layers list
60+
* @note added in QGIS 2.7
61+
* @see symbolLayer
62+
* @see symbolLayerCount
63+
*/
64+
QgsSymbolLayerV2List symbolLayers();
65+
66+
/**Returns a specific symbol layers contained in the symbol.
67+
* @param layer layer number
68+
* @returns corresponding symbol layer
69+
* @note added in QGIS 2.7
70+
* @see symbolLayers
71+
* @see symbolLayerCount
72+
*/
5873
QgsSymbolLayerV2* symbolLayer( int layer );
5974

75+
/**Returns total number of symbol layers contained in the symbol.
76+
* @returns count of symbol layers
77+
* @note added in QGIS 2.7
78+
* @see symbolLayers
79+
* @see symbolLayer
80+
*/
6081
int symbolLayerCount();
6182

6283
//! insert symbol layer to specified index

‎src/core/symbology-ng/qgssymbolv2.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,29 @@ class CORE_EXPORT QgsSymbolV2
8080

8181
// symbol layers handling
8282

83+
/**Returns list of symbol layers contained in the symbol.
84+
* @returns symbol layers list
85+
* @note added in QGIS 2.7
86+
* @see symbolLayer
87+
* @see symbolLayerCount
88+
*/
89+
QgsSymbolLayerV2List symbolLayers() { return mLayers; }
90+
91+
/**Returns a specific symbol layers contained in the symbol.
92+
* @param layer layer number
93+
* @returns corresponding symbol layer
94+
* @note added in QGIS 2.7
95+
* @see symbolLayers
96+
* @see symbolLayerCount
97+
*/
8398
QgsSymbolLayerV2* symbolLayer( int layer );
8499

100+
/**Returns total number of symbol layers contained in the symbol.
101+
* @returns count of symbol layers
102+
* @note added in QGIS 2.7
103+
* @see symbolLayers
104+
* @see symbolLayer
105+
*/
85106
int symbolLayerCount() { return mLayers.count(); }
86107

87108
//! insert symbol layer to specified index

0 commit comments

Comments
 (0)