QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSLAYERTREEGROUP_H
17 #define QGSLAYERTREEGROUP_H
19 #include "qgis_core.h"
55 SIP_PYOBJECT __repr__();
57 QString
str = QStringLiteral(
"<QgsLayerTreeGroup: %1>" ).arg( sipCpp->name() );
58 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
65 QString
name()
const override;
70 void setName(
const QString &n )
override;
95 void insertChildNodes(
int index,
const QList<QgsLayerTreeNode *> &nodes
SIP_TRANSFER );
120 void removeChildren(
int from,
int count );
125 void removeChildrenGroupWithoutLayers();
130 void removeAllChildren();
146 QList<QgsLayerTreeLayer *> findLayers()
const;
156 QList<QgsMapLayer *> layerOrderRespectingGroupLayers()
const SIP_SKIP;
161 QStringList findLayerIds()
const;
171 QList<QgsLayerTreeGroup *> findGroups(
bool recursive =
false )
const;
200 QString
dump()
const override;
222 bool isMutuallyExclusive()
const;
230 void setIsMutuallyExclusive(
bool enabled,
int initialChildIndex = -1 );
280 void updateChildVisibilityMutuallyExclusive();
284 bool mChangingChildVisibility =
false;
287 bool mMutuallyExclusive =
false;
293 int mMutuallyExclusiveChildIndex = -1;
311 void updateGroupLayers();
312 void refreshParentGroupLayerMembers();
318 #endif // QGSLAYERTREEGROUP_H
This class is a base class for nodes in a layer tree.
The class is used as a container of context for various read/write operations on other objects.
virtual void resolveReferences(const QgsProject *project, bool looseMatching=false)=0
Turn textual references to layers into map layer object from project.
A map layer which consists of a set of child layers, where all component layers are rendered as a sin...
Setting options for loading group layers.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
virtual QString dump() const =0
Returns string with layer tree structure. For debug purposes only.
Layer tree node points to a map layer.
virtual void writeXml(QDomElement &parentElement, const QgsReadWriteContext &context)=0
Write layer tree to XML.
Layer tree group node serves as a container for layers and further groups.
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)
virtual void setName(const QString &name)=0
Set name of the node.
Base class for all map layer types. This is the base class for all map layer types (vector,...
virtual void makeOrphan()
Sets parent to nullptr and disconnects all external and forwarded signals.
virtual QgsLayerTreeNode * clone() const =0
Create a copy of the node. Returns new instance.
virtual QString name() const =0
Returns name of the node.