16 #ifndef QGSLAYERTREEGROUP_H 17 #define QGSLAYERTREEGROUP_H 64 void removeChildren(
int from,
int count );
66 void removeChildrenGroupWithoutLayers();
68 void removeAllChildren();
93 Qt::CheckState
isVisible()
const {
return mChecked; }
95 void setVisible( Qt::CheckState state );
99 bool isMutuallyExclusive()
const;
104 void setIsMutuallyExclusive(
bool enabled,
int initialChildIndex = -1 );
107 void layerDestroyed();
112 void updateVisibilityFromChildren();
114 void updateChildVisibility();
116 void updateChildVisibilityMutuallyExclusive();
132 #endif // QGSLAYERTREEGROUP_H Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
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
void setName(const QString &n)
Set group's name.
This class is a base class for nodes in a layer tree.
static QgsLayerTreeNode * readXML(QDomElement &element)
Read layer tree from XML. Returns new instance.
int mMutuallyExclusiveChildIndex
Keeps track which child has been most recently selected (so if the whole group is unchecked and check...
QString name() const
Get group's name.
Qt::CheckState isVisible() const
Return the check state of the group node.
bool mMutuallyExclusive
Whether the group is mutually exclusive (i.e. only one child can be checked at a time) ...
Layer tree node points to a map layer.