16 #ifndef QGSLAYERTREEGROUP_H 17 #define QGSLAYERTREEGROUP_H 19 #include "qgis_core.h" 51 QString
name()
const override;
56 void setName(
const QString &n )
override;
81 void insertChildNodes(
int index,
const QList<QgsLayerTreeNode *> &nodes
SIP_TRANSFER );
106 void removeChildren(
int from,
int count );
111 void removeChildrenGroupWithoutLayers();
116 void removeAllChildren();
132 QList<QgsLayerTreeLayer *> findLayers()
const;
137 QStringList findLayerIds()
const;
171 QString
dump()
const override;
193 bool isMutuallyExclusive()
const;
201 void setIsMutuallyExclusive(
bool enabled,
int initialChildIndex = -1 );
211 void updateChildVisibilityMutuallyExclusive();
215 bool mChangingChildVisibility =
false;
218 bool mMutuallyExclusive =
false;
224 int mMutuallyExclusiveChildIndex = -1;
239 #endif // QGSLAYERTREEGROUP_H Layer tree group node serves as a container for layers and further groups.
The class is used as a container of context for various read/write operations on other objects...
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 void writeXml(QDomElement &parentElement, const QgsReadWriteContext &context)=0
Write layer tree to XML.
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.
static QgsLayerTreeNode * readXml(QDomElement &element, const QgsReadWriteContext &context)
Read layer tree from XML.
virtual void setItemVisibilityCheckedRecursive(bool checked)
Check or uncheck a node and all its children (taking into account exclusion rules) ...
This class is a base class for nodes in a layer tree.
Reads and writes project states.
virtual void resolveReferences(const QgsProject *project, bool looseMatching=false)=0
Turn textual references to layers into map layer object from project.
Layer tree node points to a map layer.