16 #ifndef QGSLAYERTREEGROUP_H 17 #define QGSLAYERTREEGROUP_H 64 void removeChildren(
int from,
int count );
66 void removeChildrenGroupWithoutLayers();
68 void removeAllChildren();
94 void readChildrenFromXML(
QDomElement& element,
bool looseMatch =
false );
105 void setVisible( Qt::CheckState state );
109 bool isMutuallyExclusive()
const;
114 void setIsMutuallyExclusive(
bool enabled,
int initialChildIndex = -1 );
117 void layerDestroyed();
122 void updateVisibilityFromChildren();
124 void updateChildVisibility();
126 void updateChildVisibilityMutuallyExclusive();
142 #endif // QGSLAYERTREEGROUP_H Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
virtual QString name() const =0
Return name of the node.
virtual void setName(const QString &name)=0
Set name of the node.
virtual QgsLayerTreeNode * clone() const =0
Create a copy of the node. Returns new instance.
virtual QString dump() const =0
Return string with layer tree structure. For debug purposes only.
virtual void writeXML(QDomElement &parentElement)=0
Write layer tree to XML.
bool mChangingChildVisibility
This class is a base class for nodes in a layer tree.
int mMutuallyExclusiveChildIndex
Keeps track which child has been most recently selected (so if the whole group is unchecked and check...
static QgsLayerTreeNode * readXML(QDomElement &element, bool looseMatch=false)
Read layer tree from XML.
bool mMutuallyExclusive
Whether the group is mutually exclusive (i.e. only one child can be checked at a time) ...
Qt::CheckState isVisible() const
Return the check state of the group node.
Layer tree node points to a map layer.