Sandro Santilli-2 wrote > I think Martin ideas is sensible and I do see the code is going > in that direction. But even if the classes are decoupled from > the QT tree widget we'll need a way to identify groups, as much > as we do with layers (which do have an ID). I've no problem with > all elements (be them layers or groups or whatever) share the > same "id space" but each one should have an identifier which > remains valid for the whole lifetime of that object.
Please keep in mind that it is also necessary to be able to: - move/put a layer into a sub group (not only a top level item as it was in 1.8) - remove a sub group (not only a top level item as it was in 1.8) - move a layer before or after another layer inside the same group - walk thought the legend hierarchy even when there are sub groups and multiple group with the same name (the groupLayerRelationship is unusable in some circumstances) See also previous threads: - index-in-self-legend-groupLayerRelationship-different-behavior <http://osgeo-org.1560.n6.nabble.com/index-in-self-legend-groupLayerRelationship-different-behavior-between-QGIS-1-8-and-master-td5004337.html#a5006614> - QgsLegendInterface-implementation-works-only-on-top-level-items <http://osgeo-org.1560.n6.nabble.com/QgsLegendInterface-implementation-works-only-on-top-level-items-td4999348.html> Massimo. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Legend-group-API-tp5022115p5022262.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
