|qmake:||QT += 3dcore|
- parent : Qt3D::QNode *
- 1 property inherited from QObject
|QNode(QNode * parent = 0)|
|const QNodeId||id() const|
|QNode *||parentNode() const|
|virtual void||setParent(QNode * parent)|
- 31 public functions inherited from QObject
- 2 signals inherited from QObject
|virtual void||copy(const QNode * ref)|
|virtual void||sceneChangeEvent(const QSceneChangePtr & change)|
- 9 protected functions inherited from QObject
Static Protected Members
|QNode *||clone(QNode * node)|
Additional Inherited Members
Qt3D::QNode is the base class of all Qt3D node classes used to build a Qt3D scene.
The owernship of Qt3D::QNode is determined by the QObject parent/child relationship between nodes. By itself a Qt3D::QNode has no visual appearance and no particular meaning, it is there as a way of building a node based tree structure.
Each Qt3D::QNode instance has a unique id that allows it to be recognizable from other instances.
When properties are defined on a Qt3D::QNode subclass, their NOTIFY signal will automatically generate notifications that the Qt3D backend aspects will receive.
When subclassing Qt3D::QNode make sure to call QNode::cleanup() from your subclass's destructor to ensure proper notification to backend aspects. Faiure to do so will result in crashes when one of your Qt3D::QNode subclass instance is eventually destroyed.
Member Function Documentation
QNode::QNode(QNode * parent = 0)
Creates a new Qt3D::QNode instance with parent parent.
Note: The backend aspects will be notified that a Qt3D::QNode instance is part of the scene only if it has a parent; unless this is the root node of the Qt3D scene.
See also setParent(Qt3D::QNode *).
If block is true, property change notifications sent by this object to aspects are blocked. If block is false, no such blocking will occur.
The return value is the previous value of notificationsBlocked().
Note that the other notification types will be sent even if the notifications for this object have been blocked.
See also notificationsBlocked().
QNodeList QNode::childrenNodes() const
This methods can only be called once and takes care of notyfing the backend aspects that the current Qt3D::QNode instance is about to be destroyed.
Note: It must be called by the destructor of every class subclassing Qt3D::QNode that is clonable (using the QT3D_CLONEABLE macro).
Returns a clone of node. All the children of node are cloned as well.
Note: This is the only way to create two nodes with the same id.
[virtual protected] void QNode::copy(const QNode * ref)
Copies all the attributes from ref to the current Qt3D::QNode instance.
const QNodeId QNode::id() const
Returns the id that uniquely identifies the Qt3D::QNode instance.
true if aspect notifications are blocked; otherwise returns
false. Notifications are not blocked by default.
See also blockNotifications().
QNode * QNode::parentNode() const
Returns the immediate Qt3D::QNode parent, null if the node has no parent.
Note: Getter function for property parent.
[virtual protected] void QNode::sceneChangeEvent(const QSceneChangePtr & change)
Called when one or more backend aspects sends a notification change to the current Qt3D::QNode instance.
Note: This method should be reimplemented in your subclasses to properly handle the change.
[virtual] void QNode::setParent(QNode * parent)
Note: if parent happens to be null, this will actually notify that the current Qt3D::QNode instance was removed from the scene.
Note: Setter function for property parent.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.