diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-08-21 16:23:27 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-10-27 10:48:56 +0000 |
commit | 31a4c1e3438bc47ac9d488f557f6144f0a7463ba (patch) | |
tree | f6a3ca82b7551c26003e42f4c94352b1510ccf5d /src/core/nodes/qnode_p.h | |
parent | 5017dd3572badfa9cd80eca3be220fd6f5635520 (diff) |
QNode: Introduce enabled property
Previously there was only and enable property for the QNode subclass
QComponent, but now all QNode subclasses should also have an enable
property. This means that it is now possible to disable a QEntity which
would also disable all of its children. This is a bit tricky though
because each Aspect needs to now check if the corresponding QEntities
are disabled or not before processing. This has been accounted for
with RenderEntity in the Renderer already, but will need to be respected
in each Aspect.
This behavior is similar to the Unity3D GameObject active property which
disabled the entity and disables all components.
Change-Id: I5233b2b43f04aa5dfa7910eac6a88a9da656a997
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/nodes/qnode_p.h')
-rw-r--r-- | src/core/nodes/qnode_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h index b51dff472..ef46b2e7a 100644 --- a/src/core/nodes/qnode_p.h +++ b/src/core/nodes/qnode_p.h @@ -86,6 +86,7 @@ public: mutable QNodeId m_id; bool m_blockNotifications; bool m_wasCleanedUp; + bool m_enabled; static QNodePrivate *get(QNode *q); static void nodePtrDeleter(QNode *q); |