18#ifndef QGSLAYERTREECUSTOMNODE_H
19#define QGSLAYERTREECUSTOMNODE_H
55 SIP_PYOBJECT __repr__();
57 QString str = QStringLiteral(
"<QgsLayerTreeCustomNode: %1>" ).arg( sipCpp->name() );
58 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
65 QString
nodeId()
const {
return mId; };
70 QString
name()
const override;
75 void setName(
const QString &name )
override;
87 QString
dump()
const override;
91 void resolveReferences( const
QgsProject *project,
bool looseMatching = false ) override;
Layer tree custom node serves as a node for objects that are not layers nor groups.
QString nodeId() const
Returns the node's unique identifier.
QgsLayerTreeCustomNode(const QString &nodeId, const QString &nodeName=QString(), bool checked=true)
Constructor to create custom nodes that represent application objects other than layers and groups.
virtual void setName(const QString &name)=0
Set name of the node.
virtual QString dump() const =0
Returns string with layer tree structure. For debug purposes only.
virtual void writeXml(QDomElement &parentElement, const QgsReadWriteContext &context)=0
Write layer tree to XML.
static QgsLayerTreeNode * readXml(QDomElement &element, const QgsReadWriteContext &context)
Read layer tree from XML.
virtual QString name() const =0
Returns name of the node.
QgsLayerTreeNode(NodeType t, bool checked=true)
Constructor.
virtual QgsLayerTreeNode * clone() const =0
Create a copy of the node. Returns new instance.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
A container for the context for various read/write operations on objects.