qgis/Quantum-GIS — pull request #265 by endmax (2012-10-05 12:15:47+00:00)
Title: Added the groupLayerHierarchy function to QgslegendInterface

This function let to export a QDomDocument with the whole legend hierarchy exactly as shown in the legend widget. Elements in the document represents groups and layers. Each element has an index attribute (integer value) that can be used with the functions exposed by the QgsLegendInterface.

See also:
- http://osgeo-org.1560.n6.nabble.com/index-in-self-legend-groupLayerRelationship-different-behavior-between-QGIS-1-8-and-master-td5004337.html
- http://osgeo-org.1560.n6.nabble.com/QgsLegendInterface-implementation-works-only-on-top-level-items-td4999348.html