summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3d/items
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick3d/quick3d/items')
-rw-r--r--src/quick3d/quick3d/items/items.pri6
-rw-r--r--src/quick3d/quick3d/items/quick3dentity.cpp7
-rw-r--r--src/quick3d/quick3d/items/quick3dentity_p.h5
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader.cpp97
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader_p.h17
-rw-r--r--src/quick3d/quick3d/items/quick3dentityloader_p_p.h7
-rw-r--r--src/quick3d/quick3d/items/quick3dnode.cpp3
-rw-r--r--src/quick3d/quick3d/items/quick3dnode_p.h3
-rw-r--r--src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp10
-rw-r--r--src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h3
-rw-r--r--src/quick3d/quick3d/items/quick3dnodev9.cpp203
-rw-r--r--src/quick3d/quick3d/items/quick3dnodev9_p.h109
12 files changed, 440 insertions, 30 deletions
diff --git a/src/quick3d/quick3d/items/items.pri b/src/quick3d/quick3d/items/items.pri
index 4c5e93fb2..4749c83cf 100644
--- a/src/quick3d/quick3d/items/items.pri
+++ b/src/quick3d/quick3d/items/items.pri
@@ -3,12 +3,14 @@ HEADERS += \
$$PWD/quick3dentity_p.h \
$$PWD/quick3dentityloader_p_p.h \
$$PWD/quick3dentityloader_p.h \
- $$PWD/quick3dnode_p.h
+ $$PWD/quick3dnode_p.h \
+ $$PWD/quick3dnodev9_p.h
SOURCES += \
$$PWD/quick3dnode.cpp \
$$PWD/quick3dentity.cpp \
$$PWD/quick3dentityloader.cpp \
- $$PWD/quick3dnodeinstantiator.cpp
+ $$PWD/quick3dnodeinstantiator.cpp \
+ $$PWD/quick3dnodev9.cpp
INCLUDEPATH += $$PWD
diff --git a/src/quick3d/quick3d/items/quick3dentity.cpp b/src/quick3d/quick3d/items/quick3dentity.cpp
index ebc92e843..c2814a79e 100644
--- a/src/quick3d/quick3d/items/quick3dentity.cpp
+++ b/src/quick3d/quick3d/items/quick3dentity.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "quick3dentity_p.h"
+
#include <Qt3DCore/qcomponent.h>
QT_BEGIN_NAMESPACE
@@ -92,6 +93,7 @@ void Quick3DEntity::qmlAppendComponent(QQmlListProperty<QComponent> *list, QComp
if (comp == nullptr)
return;
Quick3DEntity *self = static_cast<Quick3DEntity *>(list->object);
+ self->m_managedComponents.push_back(comp);
self->parentEntity()->addComponent(comp);
}
@@ -110,10 +112,9 @@ int Quick3DEntity::qmlComponentsCount(QQmlListProperty<QComponent> *list)
void Quick3DEntity::qmlClearComponents(QQmlListProperty<QComponent> *list)
{
Quick3DEntity *self = static_cast<Quick3DEntity *>(list->object);
- const QComponentVector components = self->parentEntity()->components();
- for (QComponent *comp : components) {
+ for (QComponent *comp : qAsConst(self->m_managedComponents))
self->parentEntity()->removeComponent(comp);
- }
+ self->m_managedComponents.clear();
}
} // namespace Quick
diff --git a/src/quick3d/quick3d/items/quick3dentity_p.h b/src/quick3d/quick3d/items/quick3dentity_p.h
index eb716a0c3..7ba5c62c2 100644
--- a/src/quick3d/quick3d/items/quick3dentity_p.h
+++ b/src/quick3d/quick3d/items/quick3dentity_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
-#include <QQmlListProperty>
#include <Qt3DCore/qentity.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuick/private/quick3dnode_p.h>
#include <Qt3DQuick/private/qt3dquick_global_p.h>
@@ -82,6 +83,8 @@ private:
static QComponent *qmlComponentAt(QQmlListProperty<Qt3DCore::QComponent> *list, int index);
static int qmlComponentsCount(QQmlListProperty<Qt3DCore::QComponent> *list);
static void qmlClearComponents(QQmlListProperty<Qt3DCore::QComponent> *list);
+
+ QVector<Qt3DCore::QComponent *> m_managedComponents;
};
} // namespace Quick
diff --git a/src/quick3d/quick3d/items/quick3dentityloader.cpp b/src/quick3d/quick3d/items/quick3dentityloader.cpp
index 9c82db7ad..8a9b19024 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader.cpp
+++ b/src/quick3d/quick3d/items/quick3dentityloader.cpp
@@ -39,9 +39,9 @@
#include "quick3dentityloader_p_p.h"
-#include <QQmlContext>
-#include <QQmlEngine>
-#include <QQmlIncubator>
+#include <QtQml/QQmlContext>
+#include <QtQml/QQmlEngine>
+#include <QtQml/QQmlIncubator>
#include <QtQml/private/qqmlengine_p.h>
@@ -50,6 +50,32 @@ QT_BEGIN_NAMESPACE
namespace Qt3DCore {
namespace Quick {
+namespace {
+struct Quick3DQmlOwner
+{
+ Quick3DQmlOwner(QQmlEngine *e, QObject *o)
+ : engine(e)
+ , object(o)
+ {}
+
+ QQmlEngine *engine;
+ QObject *object;
+
+ QQmlContext *context() const
+ {
+ return engine->contextForObject(object);
+ }
+};
+
+Quick3DQmlOwner _q_findQmlOwner(QObject *object)
+{
+ auto o = object;
+ while (!qmlEngine(o) && o->parent())
+ o = o->parent();
+ return Quick3DQmlOwner(qmlEngine(o), o);
+}
+}
+
class Quick3DEntityLoaderIncubator : public QQmlIncubator
{
public:
@@ -71,13 +97,20 @@ protected:
Q_ASSERT(priv->m_entity != nullptr);
priv->m_entity->setParent(m_loader);
emit m_loader->entityChanged();
+ priv->setStatus(Quick3DEntityLoader::Ready);
+ break;
+ }
+
+ case Loading: {
+ priv->setStatus(Quick3DEntityLoader::Loading);
break;
}
case Error: {
- QQmlEnginePrivate::warning(qmlEngine(m_loader), errors());
+ QQmlEnginePrivate::warning(_q_findQmlOwner(m_loader).engine, errors());
priv->clear();
emit m_loader->entityChanged();
+ priv->setStatus(Quick3DEntityLoader::Error);
break;
}
@@ -95,13 +128,21 @@ private:
\inqmlmodule Qt3D.Core
\inherits Entity
\since 5.5
- \brief Provides the facility to load entities from qml source
+ \brief Provides a way to dynamically load an Entity subtree
An EntityLoader provides the facitily to load predefined set of entities
from qml source file. EntityLoader itself is an entity and the loaded entity
tree is set as a child of the loader. The loaded entity tree root can be
accessed with EntityLoader::entity property.
+
+ \badcode
+ EntityLoader {
+ id: loader
+ source: "./SphereEntity.qml"
+ }
+ \endcode
*/
+
Quick3DEntityLoader::Quick3DEntityLoader(QNode *parent)
: QEntity(*new Quick3DEntityLoaderPrivate, parent)
{
@@ -117,6 +158,10 @@ Quick3DEntityLoader::~Quick3DEntityLoader()
\qmlproperty QtQml::QtObject EntityLoader::entity
Holds the loaded entity tree root.
\readonly
+
+ This property allows access to the content of the loader. It references
+ either a valid Entity object if the status property equals
+ EntityLoader.Ready, it is equal to null otherwise.
*/
QObject *Quick3DEntityLoader::entity() const
{
@@ -147,12 +192,30 @@ void Quick3DEntityLoader::setSource(const QUrl &url)
d->loadFromSource();
}
+/*!
+ \qmlproperty Status Qt3DCore::EntityLoader::status
+
+ Holds the status of the entity loader.
+ \list
+ \li EntityLoader.Null
+ \li EntityLoader.Loading
+ \li EntityLoader.Ready
+ \li EntityLoader.Error
+ \endlist
+ */
+Quick3DEntityLoader::Status Quick3DEntityLoader::status() const
+{
+ Q_D(const Quick3DEntityLoader);
+ return d->m_status;
+}
+
Quick3DEntityLoaderPrivate::Quick3DEntityLoaderPrivate()
: QEntityPrivate(),
m_incubator(nullptr),
m_context(nullptr),
m_component(nullptr),
- m_entity(nullptr)
+ m_entity(nullptr),
+ m_status(Quick3DEntityLoader::Null)
{
}
@@ -201,7 +264,8 @@ void Quick3DEntityLoaderPrivate::loadComponent(const QUrl &source)
Q_ASSERT(m_component == nullptr);
Q_ASSERT(m_context == nullptr);
- m_component = new QQmlComponent(qmlEngine(q), q);
+ auto owner = _q_findQmlOwner(q);
+ m_component = new QQmlComponent(owner.engine, owner.object);
QObject::connect(m_component, SIGNAL(statusChanged(QQmlComponent::Status)),
q, SLOT(_q_componentStatusChanged(QQmlComponent::Status)));
m_component->loadUrl(source, QQmlComponent::Asynchronous);
@@ -216,8 +280,10 @@ void Quick3DEntityLoaderPrivate::_q_componentStatusChanged(QQmlComponent::Status
Q_ASSERT(m_context == nullptr);
Q_ASSERT(m_incubator == nullptr);
+ auto owner = _q_findQmlOwner(q);
+
if (!m_component->errors().isEmpty()) {
- QQmlEnginePrivate::warning(qmlEngine(q), m_component->errors());
+ QQmlEnginePrivate::warning(owner.engine, m_component->errors());
clear();
emit q->entityChanged();
return;
@@ -227,13 +293,24 @@ void Quick3DEntityLoaderPrivate::_q_componentStatusChanged(QQmlComponent::Status
if (status != QQmlComponent::Ready)
return;
- m_context = new QQmlContext(qmlContext(q));
- m_context->setContextObject(q);
+ m_context = new QQmlContext(owner.context());
+ m_context->setContextObject(owner.object);
m_incubator = new Quick3DEntityLoaderIncubator(q);
m_component->create(*m_incubator, m_context);
}
+void Quick3DEntityLoaderPrivate::setStatus(Quick3DEntityLoader::Status status)
+{
+ Q_Q(Quick3DEntityLoader);
+ if (status != m_status) {
+ m_status = status;
+ const bool blocked = q->blockNotifications(true);
+ emit q->statusChanged(m_status);
+ q->blockNotifications(blocked);
+ }
+}
+
} // namespace Quick
} // namespace Qt3DCore
diff --git a/src/quick3d/quick3d/items/quick3dentityloader_p.h b/src/quick3d/quick3d/items/quick3dentityloader_p.h
index 5721af115..6a2fe5473 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader_p.h
+++ b/src/quick3d/quick3d/items/quick3dentityloader_p.h
@@ -51,10 +51,9 @@
// We mean it.
//
-#include <QObject>
-#include <QUrl>
-
#include <Qt3DCore/QEntity>
+#include <QtCore/QObject>
+#include <QtCore/QUrl>
#include <Qt3DQuick/private/qt3dquick_global_p.h>
@@ -74,7 +73,16 @@ class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DEntityLoader : public QEntity
Q_OBJECT
Q_PROPERTY(QObject *entity READ entity NOTIFY entityChanged)
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
+ Q_PROPERTY(Status status READ status NOTIFY statusChanged)
public:
+ enum Status {
+ Null = 0,
+ Loading,
+ Ready,
+ Error
+ };
+ Q_ENUM(Status)
+
explicit Quick3DEntityLoader(QNode *parent = 0);
~Quick3DEntityLoader();
@@ -83,9 +91,12 @@ public:
QUrl source() const;
void setSource(const QUrl &url);
+ Status status() const;
+
Q_SIGNALS:
void entityChanged();
void sourceChanged();
+ void statusChanged(Status status);
private:
Q_DECLARE_PRIVATE(Quick3DEntityLoader)
diff --git a/src/quick3d/quick3d/items/quick3dentityloader_p_p.h b/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
index 235870933..4d067f0e6 100644
--- a/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
+++ b/src/quick3d/quick3d/items/quick3dentityloader_p_p.h
@@ -51,11 +51,10 @@
// We mean it.
//
-#include "quick3dentityloader_p.h"
-
-#include <QQmlComponent>
+#include <QtQml/QQmlComponent>
#include <Qt3DCore/private/qentity_p.h>
+#include <Qt3DQuick/private/quick3dentityloader_p.h>
QT_BEGIN_NAMESPACE
@@ -82,6 +81,7 @@ public:
void loadComponent(const QUrl &source);
void _q_componentStatusChanged(QQmlComponent::Status status);
+ void setStatus(Quick3DEntityLoader::Status status);
static inline Quick3DEntityLoaderPrivate *get(Quick3DEntityLoader *q) { return q->d_func(); }
@@ -90,6 +90,7 @@ public:
QQmlContext *m_context;
QQmlComponent *m_component;
QEntity *m_entity;
+ Quick3DEntityLoader::Status m_status;
};
} // namespace Quick
diff --git a/src/quick3d/quick3d/items/quick3dnode.cpp b/src/quick3d/quick3d/items/quick3dnode.cpp
index 3761f8d64..fb91f4ae0 100644
--- a/src/quick3d/quick3d/items/quick3dnode.cpp
+++ b/src/quick3d/quick3d/items/quick3dnode.cpp
@@ -38,7 +38,8 @@
****************************************************************************/
#include "quick3dnode_p.h"
-#include <QDebug>
+
+#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnode_p.h b/src/quick3d/quick3d/items/quick3dnode_p.h
index 9798d0d4c..640a58149 100644
--- a/src/quick3d/quick3d/items/quick3dnode_p.h
+++ b/src/quick3d/quick3d/items/quick3dnode_p.h
@@ -51,8 +51,9 @@
// We mean it.
//
-#include <QQmlListProperty>
#include <Qt3DCore/qnode.h>
+#include <QtQml/QQmlListProperty>
+
#include <Qt3DQuick/private/qt3dquick_global_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
index eb6df2756..1626554ea 100644
--- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
+++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
@@ -42,13 +42,13 @@
#include <QtQml/QQmlContext>
#include <QtQml/QQmlComponent>
-#include <QtQml/QQmlInfo>
#include <QtQml/QQmlError>
-#include <QtQml/private/qqmlobjectmodel_p.h>
+#include <QtQml/QQmlInfo>
+
+#include <Qt3DCore/private/qnode_p.h>
+#include <QtQml/private/qqmlchangeset_p.h>
#include <QtQml/private/qqmldelegatemodel_p.h>
-#include <private/qnode_p.h>
-#include <private/qqmlchangeset_p.h>
-#include <private/qqmlobjectmodel_p.h>
+#include <QtQml/private/qqmlobjectmodel_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
index d861fc2fe..fd7a1d83d 100644
--- a/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
+++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator_p.h
@@ -52,11 +52,12 @@
// We mean it.
//
-#include <Qt3DQuick/private/qt3dquick_global_p.h>
#include <Qt3DCore/qnode.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlparserstatus.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
+
QT_BEGIN_NAMESPACE
namespace Qt3DCore {
diff --git a/src/quick3d/quick3d/items/quick3dnodev9.cpp b/src/quick3d/quick3d/items/quick3dnodev9.cpp
new file mode 100644
index 000000000..d1a9011b5
--- /dev/null
+++ b/src/quick3d/quick3d/items/quick3dnodev9.cpp
@@ -0,0 +1,203 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "quick3dnodev9_p.h"
+#include <QtQml/QJSValueIterator>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DCore {
+namespace Quick {
+
+Quick3DNodeV9::Quick3DNodeV9(QObject *parent)
+ : QObject(parent)
+{
+}
+
+/*!
+ \qmlproperty QJSValue Qt3DCore::Node::propertyTrackingOverrides
+ \default {}
+
+ Assuming a Qt3DCore::Node needs to override the PropertyTrackingMode on two
+ properties (enabled and displacement), the value should be set as shown
+ below.
+
+ \badcode
+ propertyTrackingOverrides: {
+ "enabled": Entity.DontTrackValues,
+ "displacement": Entity.TrackFinalValues
+ }
+ \endcode
+
+ \since 2.9
+*/
+
+QJSValue Quick3DNodeV9::propertyTrackingOverrides() const
+{
+ return m_propertyTrackingOverrides;
+}
+
+void Quick3DNodeV9::setPropertyTrackingOverrides(const QJSValue &value)
+{
+ m_propertyTrackingOverrides = value;
+
+ QNode *parentNode = this->parentNode();
+ parentNode->clearPropertyTrackings();
+
+ if (value.isObject()) {
+ QJSValueIterator it(value);
+ while (it.hasNext()) {
+ it.next();
+ parentNode->setPropertyTracking(it.name(), static_cast<QNode::PropertyTrackingMode>(it.value().toInt()));
+ }
+ }
+ emit propertyTrackingOverridesChanged(value);
+}
+
+/*!
+ \qmlproperty list<QtQml::QtObject> Qt3DCore::Node::data
+ \default
+*/
+
+QQmlListProperty<QObject> Quick3DNodeV9::data()
+{
+ return QQmlListProperty<QObject>(this, 0,
+ Quick3DNodeV9::appendData,
+ Quick3DNodeV9::dataCount,
+ Quick3DNodeV9::dataAt,
+ Quick3DNodeV9::clearData);
+}
+
+/*!
+ \qmlproperty list<Node> Qt3DCore::Node::childNodes
+ \readonly
+*/
+
+QQmlListProperty<QNode> Quick3DNodeV9::childNodes()
+{
+ return QQmlListProperty<QNode>(this, 0,
+ Quick3DNodeV9::appendChild,
+ Quick3DNodeV9::childCount,
+ Quick3DNodeV9::childAt,
+ Quick3DNodeV9::clearChildren);
+}
+
+void Quick3DNodeV9::appendData(QQmlListProperty<QObject> *list, QObject *obj)
+{
+ if (!obj)
+ return;
+
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ self->childAppended(0, obj);
+}
+
+QObject *Quick3DNodeV9::dataAt(QQmlListProperty<QObject> *list, int index)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ return self->parentNode()->children().at(index);
+}
+
+int Quick3DNodeV9::dataCount(QQmlListProperty<QObject> *list)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ return self->parentNode()->children().count();
+}
+
+void Quick3DNodeV9::clearData(QQmlListProperty<QObject> *list)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ for (QObject *const child : self->parentNode()->children())
+ self->childRemoved(0, child);
+}
+
+void Quick3DNodeV9::appendChild(QQmlListProperty<Qt3DCore::QNode> *list, Qt3DCore::QNode *obj)
+{
+ if (!obj)
+ return;
+
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ Q_ASSERT(!self->parentNode()->children().contains(obj));
+
+ self->childAppended(0, obj);
+}
+
+Qt3DCore::QNode *Quick3DNodeV9::childAt(QQmlListProperty<Qt3DCore::QNode> *list, int index)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ return qobject_cast<QNode *>(self->parentNode()->children().at(index));
+}
+
+int Quick3DNodeV9::childCount(QQmlListProperty<Qt3DCore::QNode> *list)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ return self->parentNode()->children().count();
+}
+
+void Quick3DNodeV9::clearChildren(QQmlListProperty<Qt3DCore::QNode> *list)
+{
+ Quick3DNodeV9 *self = static_cast<Quick3DNodeV9 *>(list->object);
+ for (QObject *const child : self->parentNode()->children())
+ self->childRemoved(0, child);
+}
+
+void Quick3DNodeV9::childAppended(int, QObject *obj)
+{
+ QNode *parentNode = this->parentNode();
+ if (obj->parent() == parentNode)
+ obj->setParent(0);
+ // Set after otherwise addChild might not work
+ if (QNode *n = qobject_cast<QNode *>(obj))
+ n->setParent(parentNode);
+ else
+ obj->setParent(parentNode);
+}
+
+void Quick3DNodeV9::childRemoved(int, QObject *obj)
+{
+ if (QNode *n = qobject_cast<QNode *>(obj))
+ n->setParent(Q_NODE_NULLPTR);
+ else
+ obj->setParent(nullptr);
+}
+
+
+} // namespace Quick
+} // namespace Qt3DCore
+
+QT_END_NAMESPACE
diff --git a/src/quick3d/quick3d/items/quick3dnodev9_p.h b/src/quick3d/quick3d/items/quick3dnodev9_p.h
new file mode 100644
index 000000000..d969c4b64
--- /dev/null
+++ b/src/quick3d/quick3d/items/quick3dnodev9_p.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3D_QUICK_QUICK3DNODEV9_P_H
+#define QT3D_QUICK_QUICK3DNODEV9_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQml/QJSValue>
+#include <QQmlListProperty>
+#include <Qt3DCore/qnode.h>
+#include <Qt3DQuick/private/qt3dquick_global_p.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace Qt3DCore {
+namespace Quick {
+
+class QT3DQUICKSHARED_PRIVATE_EXPORT Quick3DNodeV9 : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QJSValue propertyTrackingOverrides READ propertyTrackingOverrides WRITE setPropertyTrackingOverrides NOTIFY propertyTrackingOverridesChanged)
+ Q_PROPERTY(QQmlListProperty<QObject> data READ data)
+ Q_PROPERTY(QQmlListProperty<Qt3DCore::QNode> childNodes READ childNodes)
+ Q_CLASSINFO("DefaultProperty", "data")
+
+public:
+ explicit Quick3DNodeV9(QObject *parent = nullptr);
+
+ QJSValue propertyTrackingOverrides() const;
+ QQmlListProperty<QObject> data();
+ QQmlListProperty<Qt3DCore::QNode> childNodes();
+
+ inline QNode *parentNode() const { return qobject_cast<QNode*>(parent()); }
+
+Q_SIGNALS:
+ void propertyTrackingOverridesChanged(const QJSValue &value);
+
+private Q_SLOTS:
+ void setPropertyTrackingOverrides(const QJSValue &value);
+ void childAppended(int idx, QObject *child);
+ void childRemoved(int idx, QObject *child);
+
+private:
+ static void appendData(QQmlListProperty<QObject> *list, QObject *obj);
+ static QObject *dataAt(QQmlListProperty<QObject> *list, int index);
+ static int dataCount(QQmlListProperty<QObject> *list);
+ static void clearData(QQmlListProperty<QObject> *list);
+
+ static void appendChild(QQmlListProperty<Qt3DCore::QNode> *list, Qt3DCore::QNode *obj);
+ static QNode *childAt(QQmlListProperty<Qt3DCore::QNode> *list, int index);
+ static int childCount(QQmlListProperty<Qt3DCore::QNode> *list);
+ static void clearChildren(QQmlListProperty<Qt3DCore::QNode> *list);
+
+ QJSValue m_propertyTrackingOverrides;
+};
+
+} // namespace Quick
+} // namespace Qt3DCore
+
+QT_END_NAMESPACE
+
+
+#endif // QT3D_QUICK_QUICK3DNODEV9_P_H