QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Attributes | List of all members
QgsLayerTreeModel::LayerLegendTree Struct Reference

Structure that stores tree representation of map layer's legend. More...

#include <qgslayertreemodel.h>

Public Attributes

QMap< QgsLayerTreeModelLegendNode *, QList< QgsLayerTreeModelLegendNode * > > children
 List of children for each active node. Top-level nodes are under null pointer key. Pointers are not owned. More...
 
QMap< QgsLayerTreeModelLegendNode *, QgsLayerTreeModelLegendNode * > parents
 Pointer to parent for each active node. Top-level nodes have null parent. Pointers are not owned. More...
 

Detailed Description

Structure that stores tree representation of map layer's legend.

This structure is used only when the following requirements are met:

  1. tree legend representation is enabled in model (ShowLegendAsTree flag)
  2. some legend nodes have non-null parent rule key (accessible via data(ParentRuleKeyRole) method) The tree structure (parents and children of each node) is extracted by analyzing nodes' parent rules.
    Note
    not available in Python bindings

Definition at line 374 of file qgslayertreemodel.h.

Member Data Documentation

QMap<QgsLayerTreeModelLegendNode *, QList<QgsLayerTreeModelLegendNode *> > QgsLayerTreeModel::LayerLegendTree::children

List of children for each active node. Top-level nodes are under null pointer key. Pointers are not owned.

Definition at line 379 of file qgslayertreemodel.h.

QMap<QgsLayerTreeModelLegendNode *, QgsLayerTreeModelLegendNode *> QgsLayerTreeModel::LayerLegendTree::parents

Pointer to parent for each active node. Top-level nodes have null parent. Pointers are not owned.

Definition at line 377 of file qgslayertreemodel.h.


The documentation for this struct was generated from the following file: