Skip to content
Permalink
Browse files

[symbology] Add method for retrieving symbol layers as list

  • Loading branch information
nyalldawson committed Nov 24, 2014
1 parent a0c1380 commit fa1e8032e72e15c8dc9c47f1924f8e22702831e6
Showing with 43 additions and 1 deletion.
  1. +22 −1 python/core/symbology-ng/qgssymbolv2.sip
  2. +21 −0 src/core/symbology-ng/qgssymbolv2.h
@@ -54,9 +54,30 @@ class QgsSymbolV2
SymbolType type() const;

// symbol layers handling


/**Returns list of symbol layers contained in the symbol.
* @returns symbol layers list
* @note added in QGIS 2.7
* @see symbolLayer
* @see symbolLayerCount
*/
QgsSymbolLayerV2List symbolLayers();

/**Returns a specific symbol layers contained in the symbol.
* @param layer layer number
* @returns corresponding symbol layer
* @note added in QGIS 2.7
* @see symbolLayers
* @see symbolLayerCount
*/
QgsSymbolLayerV2* symbolLayer( int layer );

/**Returns total number of symbol layers contained in the symbol.
* @returns count of symbol layers
* @note added in QGIS 2.7
* @see symbolLayers
* @see symbolLayer
*/
int symbolLayerCount();

//! insert symbol layer to specified index
@@ -80,8 +80,29 @@ class CORE_EXPORT QgsSymbolV2

// symbol layers handling

/**Returns list of symbol layers contained in the symbol.
* @returns symbol layers list
* @note added in QGIS 2.7
* @see symbolLayer
* @see symbolLayerCount
*/
QgsSymbolLayerV2List symbolLayers() { return mLayers; }

/**Returns a specific symbol layers contained in the symbol.
* @param layer layer number
* @returns corresponding symbol layer
* @note added in QGIS 2.7
* @see symbolLayers
* @see symbolLayerCount
*/
QgsSymbolLayerV2* symbolLayer( int layer );

/**Returns total number of symbol layers contained in the symbol.
* @returns count of symbol layers
* @note added in QGIS 2.7
* @see symbolLayers
* @see symbolLayer
*/
int symbolLayerCount() { return mLayers.count(); }

//! insert symbol layer to specified index

0 comments on commit fa1e803

Please sign in to comment.
You can’t perform that action at this time.