Hi,

I'm developing a plug-in in which I would like to edit the symbol levels for controlling rendering order of the vector layer symbology.

With this code I can switch the symbol levels feature on and off, and the GUI confirms it:
>>> renderer = qgis.utils.iface.activeLayer().rendererV2()
>>> renderer.setUsingSymbolLevels(True)
>>> renderer.usingSymbolLevels()
True
>>> renderer.setUsingSymbolLevels(False)
>>> renderer.usingSymbolLevels()
False

However, I haven't figured out how to set the value of the individual levels... The QgsFeatureRendererV2 class doesn't seem to have appropriate methods.

There's also this class:
QgsSymbolV2LevelItem (QgsSymbolV2 *symbol, int layer)
But I'm not sure if it relates to the above levels or to symbol layers (something different).

Any help greatly appreciated.

Thanks,
Jorge

________________________________________

Jorge Gil

Research Associate

Bartlett School of Graduate Studies


The Bartlett School of Graduate Studies

UCL Faculty of the Built Environment


jorge....@ucl.ac.uk

+4420 3108 9031 (Internal x89031)


Central House,

14 Upper Woburn Place,

London WC1H 0NN

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to