16 #ifndef QGSLAYERTREENODE_H 17 #define QGSLAYERTREENODE_H 101 virtual void writeXML(
QDomElement &parentElement ) = 0;
104 virtual QString dump()
const = 0;
110 bool isExpanded()
const;
112 void setExpanded(
bool expanded );
119 void removeCustomProperty(
const QString &key );
132 void willRemoveChildren(
QgsLayerTreeNode *node,
int indexFrom,
int indexTo );
158 void removeChildrenPrivate(
int from,
int count,
bool destroy =
true );
176 #endif // QGSLAYERTREENODE_H
bool mExpanded
whether the node should be shown in GUI as expanded
NodeType nodeType()
Find out about type of the node. It is usually shorter to use convenience functions from QgsLayerTree...
NodeType
Enumeration of possible tree node types.
const char * name() const
NodeType mNodeType
type of the node - determines which subclass is used
QgsLayerTreeNode * parent()
Get pointer to the parent. If parent is a null pointer, the node is a root node.
QgsLayerTreeNode * mParent
pointer to the parent node - null in case of root node
This class is a base class for nodes in a layer tree.
QList< QgsLayerTreeNode * > mChildren
list of children - node is responsible for their deletion
QList< QgsLayerTreeNode * > children()
Get list of children of the node. Children are owned by the parent.
void setName(const char *name)
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
container of other groups and layers
QgsObjectCustomProperties mProperties
custom properties attached to the node