Expose QgsLayerTree in the API
boardend opened this issue · comments
Michael Schmuki commented
The current MapLayer
implementation cannot deal with hierarchical layers (e.g. layer groups).
Instead of doing our own abstraction, we should expose the QGIS internals: QgsLayerTree
, QgsLayerTreeModel
, QgsLayerTreeNode
, QgsLayerTreeGroup
, QgsLayerTreeLayer
.
Based on this API, one should be able to build a hierarchical layer tree widget.
Martin Dobias commented
+1 ... exposing layer tree will be useful.
One note: QgsLayerTreeModel
is most likely not needed here - it is mainly used for Qt model/view stuff.
Martin Dobias commented
(And it would be very useful to also have a GUI widget which could be used to control the layer tree!)