Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
variablenode.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include "variablenode.h"
5
7
8/*!
9 Clone this node on the heap and make the clone a child of
10 \a parent.
11
12 Returns a pointer to the clone.
13 */
15{
16 auto *vn = new VariableNode(*this); // shallow copy
17 vn->setParent(nullptr);
18 parent->addChild(vn);
19
20 return vn;
21}
22
23QT_END_NAMESPACE
void addChild(Node *child)
Adds the child to this node's child list and sets the child's parent pointer to this Aggregate.
void setParent(Aggregate *n)
Sets the node's parent pointer to n.
Definition node.h:213
LinkType
An unsigned char value that probably should be moved out of the Node base class.
Definition node.h:112
Node * clone(Aggregate *parent) override
Clone this node on the heap and make the clone a child of parent.
Combined button and popup list for selecting options.