[Qgis-developer] Python access to Symbology-ng

Dane Springmeyer blake at hailmail.net
Tue Dec 1 16:09:38 EST 2009


Martin,

Using the new symbology/rendererV2 from python how do you get access  
to the classification value and its upperValue/LowerValue?

layer.renderverV2() returns a 'QgsFeatureRendererV2', whose type()  
returns the string name of a specific renderer, like  
'categorizedSymbol' (is that the same as the old 'Graduated Symbol'?

But, how do you get that specific renderer object?

Also, I can't figure out how to get upper/lower value from either  
rendererV2.symbols() or their symbolLayer(s).

And I can't see the the classification info in the renderer like I  
used to do be able to get with the normal renderer:

idx = layer.renderer().classificationAttributes()[0]
class_field = layer.dataProvider().fields()[idx]

Pointers __greatly__ appreciated.

Lastly, it appears like the docs are not working for symbology-ng:

http://doc.qgis.org/head/search.php?query=symbology-ng

Dane


More information about the Qgis-developer mailing list