summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/config/qt-cpp-ignore.qdocconf4
-rw-r--r--doc/src/declarative_scenegraphs.qdoc2
-rw-r--r--features/qt3dquick.prf2
-rw-r--r--src/imports/threed/billboarditem3d.cpp2
-rw-r--r--src/imports/threed/billboarditem3d.h4
-rw-r--r--src/imports/threed/library.xml30
-rwxr-xr-xsrc/imports/threed/plugins.qmltypes34
-rw-r--r--src/imports/threed/qgraphicslookattransform.cpp28
-rw-r--r--src/imports/threed/qgraphicslookattransform.h12
-rw-r--r--src/imports/threed/scale3d.cpp2
-rw-r--r--src/imports/threed/scale3d.h2
-rw-r--r--src/imports/threed/shaderprogram.cpp10
-rw-r--r--src/imports/threed/shaderprogram.h4
-rw-r--r--src/imports/threed/shaderprogram_p.h2
-rw-r--r--src/imports/threed/threed.cpp22
-rw-r--r--src/imports/threed/viewport.cpp10
-rw-r--r--src/imports/threed/viewport.h8
-rw-r--r--src/quick3d/capsule.cpp2
-rw-r--r--src/quick3d/capsule.h4
-rw-r--r--src/quick3d/capsulemesh.cpp4
-rw-r--r--src/quick3d/capsulemesh.h4
-rw-r--r--src/quick3d/cylinder.cpp2
-rw-r--r--src/quick3d/cylinder.h4
-rw-r--r--src/quick3d/cylindermesh.cpp4
-rw-r--r--src/quick3d/cylindermesh.h4
-rw-r--r--src/quick3d/library.xml10
-rw-r--r--src/quick3d/line.cpp2
-rw-r--r--src/quick3d/line.h4
-rwxr-xr-xsrc/quick3d/plugins.qmltypes24
-rw-r--r--src/quick3d/point.cpp2
-rw-r--r--src/quick3d/point.h4
-rw-r--r--src/quick3d/qquickanimation3d.cpp (renamed from src/quick3d/qdeclarativeanimation3d.cpp)22
-rw-r--r--src/quick3d/qquickanimation3d.h (renamed from src/quick3d/qdeclarativeanimation3d.h)20
-rw-r--r--src/quick3d/qquickeffect.cpp (renamed from src/quick3d/qdeclarativeeffect.cpp)58
-rw-r--r--src/quick3d/qquickeffect.h (renamed from src/quick3d/qdeclarativeeffect.h)16
-rw-r--r--src/quick3d/qquickitem3d.cpp (renamed from src/quick3d/qdeclarativeitem3d.cpp)308
-rw-r--r--src/quick3d/qquickitem3d.h (renamed from src/quick3d/qdeclarativeitem3d.h)56
-rw-r--r--src/quick3d/qquickmesh.cpp (renamed from src/quick3d/qdeclarativemesh.cpp)88
-rw-r--r--src/quick3d/qquickmesh.h (renamed from src/quick3d/qdeclarativemesh.h)16
-rw-r--r--src/quick3d/qquickviewport.h (renamed from src/quick3d/qdeclarativeviewport.h)10
-rw-r--r--src/quick3d/quick3d.pri18
-rw-r--r--src/quick3d/sphere.cpp2
-rw-r--r--src/quick3d/spheremesh.cpp4
-rw-r--r--src/quick3d/spheremesh.h4
-rw-r--r--src/quick3d/teapot.h6
-rw-r--r--src/threed/graphicsview/qgraphicsbillboardtransform.cpp4
-rw-r--r--src/threed/graphicsview/qgraphicsbillboardtransform.h4
-rw-r--r--src/threed/graphicsview/qgraphicsrotation3d.cpp4
-rw-r--r--src/threed/graphicsview/qgraphicsrotation3d.h4
-rw-r--r--src/threed/graphicsview/qgraphicsscale3d.cpp4
-rw-r--r--src/threed/graphicsview/qgraphicsscale3d.h4
-rw-r--r--src/threed/graphicsview/qgraphicstransform3d.cpp22
-rw-r--r--src/threed/graphicsview/qgraphicstransform3d.h8
-rw-r--r--src/threed/graphicsview/qgraphicstranslation3d.cpp4
-rw-r--r--src/threed/graphicsview/qgraphicstranslation3d.h4
-rw-r--r--src/threed/scene/qglscenenode.cpp12
-rw-r--r--src/threed/scene/qglscenenode.h8
-rw-r--r--src/threed/scene/qglscenenode_p.h2
-rw-r--r--sync.profile2
-rw-r--r--tests/auto/threed/qglscenenode/tst_qglscenenode.cpp10
60 files changed, 489 insertions, 487 deletions
diff --git a/doc/config/qt-cpp-ignore.qdocconf b/doc/config/qt-cpp-ignore.qdocconf
index a21324c1a..218c7f868 100644
--- a/doc/config/qt-cpp-ignore.qdocconf
+++ b/doc/config/qt-cpp-ignore.qdocconf
@@ -73,7 +73,9 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_DECLARATIVE_EXPORT \
Q_GADGET \
QWEBKIT_EXPORT \
- Q_INVOKABLE
+ Q_INVOKABLE \
+ Q_QUICK_EXPORT \
+ Q_QML_EXPORT
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_DECLARE_INTERFACE \
Q_DECLARE_METATYPE \
diff --git a/doc/src/declarative_scenegraphs.qdoc b/doc/src/declarative_scenegraphs.qdoc
index 4b7b249d8..68984f730 100644
--- a/doc/src/declarative_scenegraphs.qdoc
+++ b/doc/src/declarative_scenegraphs.qdoc
@@ -136,7 +136,7 @@
hierarchy of scene-graph branches which are then optimised and drawn in a single call for
the viewport.
- Components of a mesh can now be accessed with specific QDeclarativeMesh functions which are
+ Components of a mesh can now be accessed with specific QQuickMesh functions which are
exposed to QML.
The sections below describe the various scenarios in which a user may wish to use sub-components
diff --git a/features/qt3dquick.prf b/features/qt3dquick.prf
index 9e42c5e4d..f92c4d759 100644
--- a/features/qt3dquick.prf
+++ b/features/qt3dquick.prf
@@ -23,4 +23,4 @@ CONFIG += qt3d
LIBS += -lQt3DQuick
}
-QT += opengl network declarative
+QT += opengl network qml quick
diff --git a/src/imports/threed/billboarditem3d.cpp b/src/imports/threed/billboarditem3d.cpp
index 010f7b653..61fb4b9fe 100644
--- a/src/imports/threed/billboarditem3d.cpp
+++ b/src/imports/threed/billboarditem3d.cpp
@@ -77,7 +77,7 @@
For a practical illustration of its use see the forest example.
*/
BillboardItem3D::BillboardItem3D(QObject *parent)
- : QDeclarativeItem3D(parent)
+ : QQuickItem3D(parent)
{
m_preserveUpVector = false;
}
diff --git a/src/imports/threed/billboarditem3d.h b/src/imports/threed/billboarditem3d.h
index d228acc3f..c83b29521 100644
--- a/src/imports/threed/billboarditem3d.h
+++ b/src/imports/threed/billboarditem3d.h
@@ -42,13 +42,13 @@
#ifndef BILLBOARDITEM3D_H
#define BILLBOARDITEM3D_H
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class BillboardItem3D : public QDeclarativeItem3D
+class BillboardItem3D : public QQuickItem3D
{
Q_OBJECT
Q_PROPERTY(bool preserveUpVector READ preserveUpVector WRITE setPreserveUpVector)
diff --git a/src/imports/threed/library.xml b/src/imports/threed/library.xml
index 4beed647e..1803d9009 100644
--- a/src/imports/threed/library.xml
+++ b/src/imports/threed/library.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module>
- <type name="QDeclarativeEffect" extends="QObject">
+ <type name="QQuickEffect" extends="QObject">
<exports>
<export module="Qt3D" version="1.0" type="Effect" />
</exports>
@@ -17,7 +17,7 @@
<param name="progress" type="qreal" />
</signal>
</type>
- <type name="QDeclarativeItem3D" defaultProperty="data" extends="QQuickItem">
+ <type name="QQuickItem3D" defaultProperty="data" extends="QQuickItem">
<exports>
<export module="Qt3D" version="1.0" type="Item3D" />
</exports>
@@ -44,20 +44,20 @@
<property name="y" type="qreal" />
<property name="z" type="qreal" />
<property name="scale" type="qreal" />
- <property name="transform" type="QGraphicsTransform3D" isList="true" />
- <property name="pretransform" type="QGraphicsTransform3D" isList="true" />
- <property name="mesh" type="QDeclarativeMesh" />
- <property name="effect" type="QDeclarativeEffect" />
+ <property name="transform" type="QQuickQGraphicsTransform3D" isList="true" />
+ <property name="pretransform" type="QQuickQGraphicsTransform3D" isList="true" />
+ <property name="mesh" type="QQuickMesh" />
+ <property name="effect" type="QQuickEffect" />
<property name="light" type="QGLLightParameters" />
<property name="resources" type="QObject" isList="true" />
<property name="data" type="QObject" isList="true" />
- <property name="children" type="QDeclarativeItem3D" isList="true" />
+ <property name="children" type="QQuickItem3D" isList="true" />
<property name="cullFaces" type="CullFaces" />
<property name="sortChildren" type="SortMode" />
<property name="meshNode" type="string" />
<property name="inheritEvents" type="bool" />
<property name="enabled" type="bool" />
- <property name="parent" type="QDeclarativeItem3D" />
+ <property name="parent" type="QQuickItem3D" />
<signal name="positionChanged" />
<signal name="scaleChanged" />
<signal name="rotationChanged" />
@@ -89,7 +89,7 @@
</method>
<method name="worldToLocal" type="QVector3D" />
</type>
- <type name="QDeclarativeMesh" extends="QObject">
+ <type name="QQuickMesh" extends="QObject">
<exports>
<export module="Qt3D" version="1.0" type="Mesh" />
</exports>
@@ -301,23 +301,23 @@
<param name="names" type="QStringList" />
</method>
</type>
- <type name="QGraphicsBillboardTransform" extends="QGraphicsTransform3D">
+ <type name="QGraphicsBillboardTransform" extends="QQuickQGraphicsTransform3D">
<exports>
<export module="Qt3D" version="1.0" type="BillboardTransform" />
</exports>
<property name="preserveUpVector" type="bool" />
<signal name="preserveUpVectorChanged" />
</type>
- <type name="QGraphicsLookAtTransform" extends="QGraphicsTransform3D">
+ <type name="QGraphicsLookAtTransform" extends="QQuickQGraphicsTransform3D">
<exports>
<export module="Qt3D" version="1.0" type="LookAt" />
</exports>
<property name="preserveUpVector" type="bool" />
- <property name="subject" type="QDeclarativeItem3D" />
+ <property name="subject" type="QQuickItem3D" />
<signal name="preserveUpVectorChanged" />
<signal name="subjectChanged" />
</type>
- <type name="QGraphicsRotation3D" extends="QGraphicsTransform3D">
+ <type name="QGraphicsRotation3D" extends="QQuickQGraphicsTransform3D">
<exports>
<export module="Qt3D" version="1.0" type="Rotation3D" />
</exports>
@@ -328,7 +328,7 @@
<signal name="angleChanged" />
<signal name="axisChanged" />
</type>
- <type name="QGraphicsTranslation3D" extends="QGraphicsTransform3D">
+ <type name="QGraphicsTranslation3D" extends="QQuickQGraphicsTransform3D">
<exports>
<export module="Qt3D" version="1.0" type="Translation3D" />
</exports>
@@ -344,7 +344,7 @@
<property name="scale" type="QVariant" />
<signal name="variantScaleChanged" />
</type>
- <type name="ShaderProgram" extends="QDeclarativeEffect">
+ <type name="ShaderProgram" extends="QQuickEffect">
<exports>
<export module="Qt3D" version="1.0" type="ShaderProgram" />
</exports>
diff --git a/src/imports/threed/plugins.qmltypes b/src/imports/threed/plugins.qmltypes
index 4e67ab237..6d58d2d07 100755
--- a/src/imports/threed/plugins.qmltypes
+++ b/src/imports/threed/plugins.qmltypes
@@ -5,7 +5,7 @@ import QtQuick.tooling 1.0
Module {
Component {
- name: "QDeclarativeEffect"
+ name: "QQuickEffect"
prototype: "QObject"
exports: [
"Effect 1.0"
@@ -25,7 +25,7 @@ Module {
}
}
Component {
- name: "QDeclarativeItem3D"
+ name: "QQuickItem3D"
defaultProperty: "data"
prototype: "QQuickItem"
exports: [
@@ -63,20 +63,20 @@ Module {
Property { name: "y"; type: "qreal" }
Property { name: "z"; type: "qreal" }
Property { name: "scale"; type: "qreal" }
- Property { name: "transform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "pretransform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "mesh"; type: "QDeclarativeMesh"; isPointer: true }
- Property { name: "effect"; type: "QDeclarativeEffect"; isPointer: true }
+ Property { name: "transform"; type: "QQuickQGraphicsTransform3D"; isList: true; isReadonly: true }
+ Property { name: "pretransform"; type: "QQuickQGraphicsTransform3D"; isList: true; isReadonly: true }
+ Property { name: "mesh"; type: "QQuickMesh"; isPointer: true }
+ Property { name: "effect"; type: "QQuickEffect"; isPointer: true }
Property { name: "light"; type: "QGLLightParameters"; isPointer: true }
Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "children"; type: "QDeclarativeItem3D"; isList: true; isReadonly: true }
+ Property { name: "children"; type: "QQuickItem3D"; isList: true; isReadonly: true }
Property { name: "cullFaces"; type: "CullFaces" }
Property { name: "sortChildren"; type: "SortMode" }
Property { name: "meshNode"; type: "string" }
Property { name: "inheritEvents"; type: "bool" }
Property { name: "enabled"; type: "bool" }
- Property { name: "parent"; type: "QDeclarativeItem3D"; isPointer: true }
+ Property { name: "parent"; type: "QQuickItem3D"; isPointer: true }
Signal { name: "positionChanged" }
Signal { name: "scaleChanged" }
Signal { name: "rotationChanged" }
@@ -114,7 +114,7 @@ Module {
Method { name: "worldToLocal"; type: "QVector3D" }
}
Component {
- name: "QDeclarativeMesh"
+ name: "QQuickMesh"
prototype: "QObject"
exports: [
"Mesh 1.0"
@@ -393,7 +393,7 @@ Module {
}
Component {
name: "QGraphicsBillboardTransform"
- prototype: "QGraphicsTransform3D"
+ prototype: "QQuickQGraphicsTransform3D"
exports: [
"BillboardTransform 1.0"
]
@@ -402,18 +402,18 @@ Module {
}
Component {
name: "QGraphicsLookAtTransform"
- prototype: "QGraphicsTransform3D"
+ prototype: "QQuickQGraphicsTransform3D"
exports: [
"LookAt 1.0"
]
Property { name: "preserveUpVector"; type: "bool" }
- Property { name: "subject"; type: "QDeclarativeItem3D"; isPointer: true }
+ Property { name: "subject"; type: "QQuickItem3D"; isPointer: true }
Signal { name: "preserveUpVectorChanged" }
Signal { name: "subjectChanged" }
}
Component {
name: "QGraphicsRotation3D"
- prototype: "QGraphicsTransform3D"
+ prototype: "QQuickQGraphicsTransform3D"
exports: [
"Rotation3D 1.0"
]
@@ -426,20 +426,20 @@ Module {
}
Component {
name: "QGraphicsScale3D"
- prototype: "QGraphicsTransform3D"
+ prototype: "QQuickQGraphicsTransform3D"
Property { name: "origin"; type: "QVector3D" }
Property { name: "scale"; type: "QVector3D" }
Signal { name: "originChanged" }
Signal { name: "scaleChanged" }
}
Component {
- name: "QGraphicsTransform3D"
+ name: "QQuickQGraphicsTransform3D"
prototype: "QObject"
Signal { name: "transformChanged" }
}
Component {
name: "QGraphicsTranslation3D"
- prototype: "QGraphicsTransform3D"
+ prototype: "QQuickQGraphicsTransform3D"
exports: [
"Translation3D 1.0"
]
@@ -459,7 +459,7 @@ Module {
}
Component {
name: "ShaderProgram"
- prototype: "QDeclarativeEffect"
+ prototype: "QQuickEffect"
exports: [
"ShaderProgram 1.0"
]
diff --git a/src/imports/threed/qgraphicslookattransform.cpp b/src/imports/threed/qgraphicslookattransform.cpp
index 5e23fad42..ca634eb1b 100644
--- a/src/imports/threed/qgraphicslookattransform.cpp
+++ b/src/imports/threed/qgraphicslookattransform.cpp
@@ -198,11 +198,11 @@ public:
QGraphicsLookAtTransform* lookAt;
void determineOriginItem();
void calculateRotationValues() const;
- QVector3D relativePosition(QDeclarativeItem3D* originItem, QDeclarativeItem3D* subject) const;
+ QVector3D relativePosition(QQuickItem3D* originItem, QQuickItem3D* subject) const;
bool preserveUpVector;
- QDeclarativeItem3D* originItem;
- QDeclarativeItem3D* subject;
+ QQuickItem3D* originItem;
+ QQuickItem3D* subject;
mutable LookAtRotationCache rotationCache;
mutable bool rotationCacheDirty;
@@ -216,18 +216,18 @@ QGraphicsLookAtTransformPrivate::QGraphicsLookAtTransformPrivate(QGraphicsLookAt
void QGraphicsLookAtTransformPrivate::determineOriginItem()
{
QObject* workingObject = lookAt->parent();
- while (qobject_cast<QDeclarativeItem3D*>(workingObject) == 0 &&
+ while (qobject_cast<QQuickItem3D*>(workingObject) == 0 &&
workingObject != 0)
{
workingObject = workingObject->parent();
}
- originItem = qobject_cast<QDeclarativeItem3D*>(workingObject);
+ originItem = qobject_cast<QQuickItem3D*>(workingObject);
if (!originItem)
qWarning() << "LookAt transform requires an Item3D ancestor";
}
-QVector3D QGraphicsLookAtTransformPrivate::relativePosition(QDeclarativeItem3D* originItem, QDeclarativeItem3D* subject) const
+QVector3D QGraphicsLookAtTransformPrivate::relativePosition(QQuickItem3D* originItem, QQuickItem3D* subject) const
{
QVector3D result = originItem->worldToLocal(subject->localToWorld());
return result;
@@ -312,7 +312,7 @@ void QGraphicsLookAtTransformPrivate::calculateRotationValues() const
Construct a lookAt transform and attach it to \a parent.
*/
QGraphicsLookAtTransform::QGraphicsLookAtTransform(QObject *parent)
- : QGraphicsTransform3D(parent), d_ptr(new QGraphicsLookAtTransformPrivate(this))
+ : QQuickQGraphicsTransform3D(parent), d_ptr(new QGraphicsLookAtTransformPrivate(this))
{
}
@@ -409,13 +409,13 @@ void QGraphicsLookAtTransform::setPreserveUpVector(bool value)
*/
-QDeclarativeItem3D* QGraphicsLookAtTransform::subject() const
+QQuickItem3D* QGraphicsLookAtTransform::subject() const
{
Q_D(const QGraphicsLookAtTransform);
return d->subject;
}
-void QGraphicsLookAtTransform::setSubject(QDeclarativeItem3D* value)
+void QGraphicsLookAtTransform::setSubject(QQuickItem3D* value)
{
Q_D(QGraphicsLookAtTransform);
if (d->subject != value)
@@ -424,7 +424,7 @@ void QGraphicsLookAtTransform::setSubject(QDeclarativeItem3D* value)
// lookAt transform needs to be recalculated
disconnect(this, SLOT(subjectPositionChanged()));
d->subject = value;
- QDeclarativeItem3D* ancestorItem = d->subject;
+ QQuickItem3D* ancestorItem = d->subject;
while (ancestorItem != 0)
{
// listen for changes directly on the item, changes on it's
@@ -433,17 +433,17 @@ void QGraphicsLookAtTransform::setSubject(QDeclarativeItem3D* value)
connect(ancestorItem, SIGNAL(rotationChanged()), this, SLOT(subjectPositionChanged()));
connect(ancestorItem, SIGNAL(scaleChanged()), this, SLOT(subjectPositionChanged()));
connect(ancestorItem, SIGNAL(parentChanged(QQuickItem*)), this, SLOT(ancestryChanged()));
- QQmlListProperty<QGraphicsTransform3D> transforms =
+ QQmlListProperty<QQuickQGraphicsTransform3D> transforms =
ancestorItem->transform();
for (int i=0; i < transforms.count(&transforms) ; i++)
{
- QGraphicsTransform3D* transform = transforms.at(&transforms, i);
+ QQuickQGraphicsTransform3D* transform = transforms.at(&transforms, i);
connect(transform, SIGNAL(transformChanged()),
this, SLOT(subjectPositionChanged()));
}
- ancestorItem = qobject_cast<QDeclarativeItem3D*> (ancestorItem->parent());
+ ancestorItem = qobject_cast<QQuickItem3D*> (ancestorItem->parent());
};
d->rotationCacheDirty = true;
@@ -499,7 +499,7 @@ void QGraphicsLookAtTransform::applyTo(QMatrix4x4 *matrix) const
/*!
\internal
*/
-QGraphicsTransform3D *QGraphicsLookAtTransform::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *QGraphicsLookAtTransform::clone(QObject *parent) const
{
Q_D(const QGraphicsLookAtTransform);
QGraphicsLookAtTransform *copy = new QGraphicsLookAtTransform(parent);
diff --git a/src/imports/threed/qgraphicslookattransform.h b/src/imports/threed/qgraphicslookattransform.h
index 09e66095f..ad5e58497 100644
--- a/src/imports/threed/qgraphicslookattransform.h
+++ b/src/imports/threed/qgraphicslookattransform.h
@@ -43,7 +43,7 @@
#define QGRAPHICSLOOKATTRANSFORM_H
#include "qgraphicstransform3d.h"
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
#include <QtCore/qscopedpointer.h>
#include <QtCore/qpointer.h>
@@ -54,11 +54,11 @@ QT_BEGIN_NAMESPACE
class QGraphicsLookAtTransformPrivate;
-class QGraphicsLookAtTransform : public QGraphicsTransform3D
+class QGraphicsLookAtTransform : public QQuickQGraphicsTransform3D
{
Q_OBJECT
Q_PROPERTY(bool preserveUpVector READ preserveUpVector WRITE setPreserveUpVector NOTIFY preserveUpVectorChanged)
- Q_PROPERTY(QDeclarativeItem3D* subject READ subject WRITE setSubject NOTIFY subjectChanged )
+ Q_PROPERTY(QQuickItem3D* subject READ subject WRITE setSubject NOTIFY subjectChanged )
public:
QGraphicsLookAtTransform(QObject *parent = 0);
~QGraphicsLookAtTransform();
@@ -66,11 +66,11 @@ public:
bool preserveUpVector() const;
void setPreserveUpVector(bool value);
- QDeclarativeItem3D* subject() const;
- void setSubject(QDeclarativeItem3D* value);
+ QQuickItem3D* subject() const;
+ void setSubject(QQuickItem3D* value);
void applyTo(QMatrix4x4 *matrix) const;
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
private Q_SLOTS:
void subjectPositionChanged();
diff --git a/src/imports/threed/scale3d.cpp b/src/imports/threed/scale3d.cpp
index efdd0ba9d..5b2755749 100644
--- a/src/imports/threed/scale3d.cpp
+++ b/src/imports/threed/scale3d.cpp
@@ -63,7 +63,7 @@ void Scale3D::setScale(const QVariant &value)
}
}
-QGraphicsTransform3D *Scale3D::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *Scale3D::clone(QObject *parent) const
{
Scale3D *copy = new Scale3D(parent);
copy->setOrigin(origin());
diff --git a/src/imports/threed/scale3d.h b/src/imports/threed/scale3d.h
index 486452f69..453652e72 100644
--- a/src/imports/threed/scale3d.h
+++ b/src/imports/threed/scale3d.h
@@ -62,7 +62,7 @@ public:
QVariant scale() const { return QGraphicsScale3D::scale(); }
void setScale(const QVariant &value);
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
Q_SIGNALS:
void variantScaleChanged();
diff --git a/src/imports/threed/shaderprogram.cpp b/src/imports/threed/shaderprogram.cpp
index fba1284fb..619af00ef 100644
--- a/src/imports/threed/shaderprogram.cpp
+++ b/src/imports/threed/shaderprogram.cpp
@@ -618,7 +618,7 @@ void ShaderProgramEffect::processTextureUrl(int uniformLocation, QString urlStri
// Try to make path absolute:
if (url.isRelative())
{
- // Get the baseUrl from the declarative engine
+ // Get the baseUrl from the qml engine
QQmlContext *context =
QQmlEngine::contextForObject(parent.data());
@@ -679,7 +679,7 @@ void ShaderProgramEffect::processTextureUrl(int uniformLocation, QString urlStri
Construction of the shader program and assignment of its \a parent object.
*/
ShaderProgram::ShaderProgram(QObject *parent)
- : QDeclarativeEffect(parent)
+ : QQuickEffect(parent)
{
d = new ShaderProgramPrivate();
}
@@ -746,7 +746,7 @@ void ShaderProgram::enableEffect(QGLPainter *painter)
{
if (!d->shadersSupported && !d->regenerate) {
// Use a simple fallback effect.
- QDeclarativeEffect::enableEffect(painter);
+ QQuickEffect::enableEffect(painter);
return;
}
if (!d->effect) {
@@ -756,7 +756,7 @@ void ShaderProgram::enableEffect(QGLPainter *painter)
if (!d->effect->create(d->vertexShader, d->fragmentShader)) {
delete d->effect;
d->effect = 0;
- QDeclarativeEffect::enableEffect(painter);
+ QQuickEffect::enableEffect(painter);
d->regenerate = false;
d->shadersSupported = false;
return;
@@ -766,7 +766,7 @@ void ShaderProgram::enableEffect(QGLPainter *painter)
if (!d->effect->create(d->vertexShader, d->fragmentShader)) {
delete d->effect;
d->effect = 0;
- QDeclarativeEffect::enableEffect(painter);
+ QQuickEffect::enableEffect(painter);
d->regenerate = false;
d->shadersSupported = false;
return;
diff --git a/src/imports/threed/shaderprogram.h b/src/imports/threed/shaderprogram.h
index 1c4936b39..029db0338 100644
--- a/src/imports/threed/shaderprogram.h
+++ b/src/imports/threed/shaderprogram.h
@@ -42,7 +42,7 @@
#ifndef SHADERPROGRAM_H
#define SHADERPROGRAM_H
-#include "qdeclarativeeffect.h"
+#include "qquickeffect.h"
QT_BEGIN_HEADER
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
class ShaderProgramPrivate;
class QGLSceneNode;
-class ShaderProgram : public QDeclarativeEffect
+class ShaderProgram : public QQuickEffect
{
Q_OBJECT
Q_PROPERTY(QString vertexShader READ vertexShader WRITE setVertexShader NOTIFY shaderChanged)
diff --git a/src/imports/threed/shaderprogram_p.h b/src/imports/threed/shaderprogram_p.h
index bee663e3e..7a9169036 100644
--- a/src/imports/threed/shaderprogram_p.h
+++ b/src/imports/threed/shaderprogram_p.h
@@ -45,7 +45,7 @@
#include <QtCore/qsharedpointer.h>
#include <QOpenGLShaderProgram>
-#include "qdeclarativeeffect.h"
+#include "qquickeffect.h"
#include "qglshaderprogrameffect.h"
QT_BEGIN_NAMESPACE
diff --git a/src/imports/threed/threed.cpp b/src/imports/threed/threed.cpp
index a3422503e..5d851728d 100644
--- a/src/imports/threed/threed.cpp
+++ b/src/imports/threed/threed.cpp
@@ -44,11 +44,11 @@
#include <QtQml/qqmlcontext.h>
#include <QtQml/qqml.h>
-#include "qdeclarativeitem3d.h"
-#include "qdeclarativemesh.h"
-#include "qdeclarativeanimation3d.h"
+#include "qquickitem3d.h"
+#include "qquickmesh.h"
+#include "qquickanimation3d.h"
#include "viewport.h"
-#include "qdeclarativeeffect.h"
+#include "qquickeffect.h"
#include "scale3d.h"
#include "skybox.h"
@@ -70,7 +70,7 @@
#include "billboarditem3d.h"
-QML_DECLARE_TYPE(QGraphicsTransform3D)
+QML_DECLARE_TYPE(QQuickQGraphicsTransform3D)
QML_DECLARE_TYPE(QGraphicsRotation3D)
QML_DECLARE_TYPE(QGraphicsTranslation3D)
QML_DECLARE_TYPE(QGraphicsScale3D)
@@ -92,10 +92,10 @@ public:
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt3D"));
qmlRegisterType<QGLSceneNode>(uri,1,0,"SceneNode");
- qmlRegisterType<QDeclarativeEffect>(uri,1,0,"Effect");
- qmlRegisterType<QDeclarativeMesh>(uri,1,0,"Mesh");
- qmlRegisterType<QDeclarativeItem3D>(uri,1,0,"Item3D");
- qmlRegisterType<QDeclarativeAnimation3D>(uri,1,0,"Animation3D");
+ qmlRegisterType<QQuickEffect>(uri,1,0,"Effect");
+ qmlRegisterType<QQuickMesh>(uri,1,0,"Mesh");
+ qmlRegisterType<QQuickItem3D>(uri,1,0,"Item3D");
+ qmlRegisterType<QQuickAnimation3D>(uri,1,0,"Animation3D");
qmlRegisterType<QGLLightModel>(uri,1,0,"LightModel");
qmlRegisterType<QGLLightParameters>(uri,1,0,"Light");
qmlRegisterType<QGLCamera>(uri,1,0,"Camera");
@@ -118,8 +118,8 @@ public:
qmlRegisterType<Viewport>(uri,1,0,"Viewport");
- // Needed to make QQmlListProperty<QGraphicsTransform3D> work.
- qmlRegisterType<QGraphicsTransform3D>();
+ // Needed to make QQmlListProperty<QQuickQGraphicsTransform3D> work.
+ qmlRegisterType<QQuickQGraphicsTransform3D>();
qmlRegisterType<QGraphicsScale3D>();
}
void initializeEngine(QQmlEngine *engine, const char *uri)
diff --git a/src/imports/threed/viewport.cpp b/src/imports/threed/viewport.cpp
index f6ff01314..f4f314c8b 100644
--- a/src/imports/threed/viewport.cpp
+++ b/src/imports/threed/viewport.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "viewport.h"
-#include "qdeclarativeeffect.h"
+#include "qquickeffect.h"
#include "qgllightmodel.h"
#include "qgllightparameters.h"
@@ -978,7 +978,7 @@ void Viewport::draw(QGLPainter *painter)
painter->setMainLight(d->light, QMatrix4x4());
painter->setLightModel(d->lightModel);
foreach (QObject *child, list) {
- QDeclarativeItem3D *item = qobject_cast<QDeclarativeItem3D *>(child);
+ QQuickItem3D *item = qobject_cast<QQuickItem3D *>(child);
if (item)
{
if (d->showSceneGraph && (d->dumpCount == 0))
@@ -1000,7 +1000,7 @@ void Viewport::initializeGL(QGLPainter *painter)
// Initialize the Item3D objects attached to this scene.
QObjectList list = QObject::children();
foreach (QObject *child, list) {
- QDeclarativeItem3D *item = qobject_cast<QDeclarativeItem3D *>(child);
+ QQuickItem3D *item = qobject_cast<QQuickItem3D *>(child);
if (item) {
setItemViewport(item);
item->initialize(painter);
@@ -1816,8 +1816,8 @@ void Viewport::itemChange(QQuickItem::ItemChange change, const ItemChangeData &v
if (change == QQuickItem::ItemChildAddedChange)
{
QQuickItem *newItem = value.item;
- if (QDeclarativeItem3D* item3d =
- qobject_cast<QDeclarativeItem3D*>(newItem))
+ if (QQuickItem3D* item3d =
+ qobject_cast<QQuickItem3D*>(newItem))
{
setItemViewport(item3d);
}
diff --git a/src/imports/threed/viewport.h b/src/imports/threed/viewport.h
index 41ddd6f9b..528e579d9 100644
--- a/src/imports/threed/viewport.h
+++ b/src/imports/threed/viewport.h
@@ -44,8 +44,8 @@
#include <QtQuick/qquickpainteditem.h>
-#include "qdeclarativeitem3d.h"
-#include "qdeclarativeviewport.h"
+#include "qquickitem3d.h"
+#include "qquickviewport.h"
QT_BEGIN_HEADER
@@ -55,10 +55,10 @@ class ViewportPrivate;
class QGLCamera;
class QGLLightModel;
class QGLLightParameters;
-class QDeclarativeEffect;
+class QQuickEffect;
class PickEvent;
-class Viewport : public QQuickPaintedItem, public QDeclarativeViewport
+class Viewport : public QQuickPaintedItem, public QQuickViewport
{
Q_OBJECT
Q_ENUMS(RenderMode)
diff --git a/src/quick3d/capsule.cpp b/src/quick3d/capsule.cpp
index 6be9e133b..42d9d7f60 100644
--- a/src/quick3d/capsule.cpp
+++ b/src/quick3d/capsule.cpp
@@ -88,7 +88,7 @@
\internal
*/
Capsule::Capsule(QObject *parent) :
- QDeclarativeItem3D(parent)
+ QQuickItem3D(parent)
, m_radius(1.0)
, m_length(4.0)
, m_lod(1)
diff --git a/src/quick3d/capsule.h b/src/quick3d/capsule.h
index c4dc6e28b..ece53089a 100644
--- a/src/quick3d/capsule.h
+++ b/src/quick3d/capsule.h
@@ -42,7 +42,7 @@
#ifndef CAPSULE_H
#define CAPSULE_H
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
#include "qglscenenode.h"
#include <QtCore/qmap.h>
@@ -50,7 +50,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Capsule : public QDeclarativeItem3D
+class Capsule : public QQuickItem3D
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
diff --git a/src/quick3d/capsulemesh.cpp b/src/quick3d/capsulemesh.cpp
index 3b03daa34..f2dd8d69e 100644
--- a/src/quick3d/capsulemesh.cpp
+++ b/src/quick3d/capsulemesh.cpp
@@ -186,7 +186,7 @@ private:
\internal
*/
CapsuleMesh::CapsuleMesh(QObject *parent)
- : QDeclarativeMesh(parent)
+ : QQuickMesh(parent)
, d(new CapsuleMeshPrivate)
{
}
@@ -284,7 +284,7 @@ void CapsuleMesh::draw(QGLPainter *painter, int branchId)
{
if (!d->currentCapsule)
createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
+ QQuickMesh::draw(painter, branchId);
}
/*!
diff --git a/src/quick3d/capsulemesh.h b/src/quick3d/capsulemesh.h
index f7691354d..ca78e2e52 100644
--- a/src/quick3d/capsulemesh.h
+++ b/src/quick3d/capsulemesh.h
@@ -42,7 +42,7 @@
#ifndef CAPSULE_H
#define CAPSULE_H
-#include "qdeclarativemesh.h"
+#include "qquickmesh.h"
QT_BEGIN_HEADER
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class CapsuleMeshPrivate;
-class Q_QT3D_QUICK_EXPORT CapsuleMesh : public QDeclarativeMesh
+class Q_QT3D_QUICK_EXPORT CapsuleMesh : public QQuickMesh
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
diff --git a/src/quick3d/cylinder.cpp b/src/quick3d/cylinder.cpp
index a3d822c54..94ffdfdbb 100644
--- a/src/quick3d/cylinder.cpp
+++ b/src/quick3d/cylinder.cpp
@@ -84,7 +84,7 @@
\internal
*/
Cylinder::Cylinder(QObject *parent) :
- QDeclarativeItem3D(parent)
+ QQuickItem3D(parent)
, m_radius(1.0)
, m_length(1.0)
, m_lod(1)
diff --git a/src/quick3d/cylinder.h b/src/quick3d/cylinder.h
index a1fb48862..cf786d04b 100644
--- a/src/quick3d/cylinder.h
+++ b/src/quick3d/cylinder.h
@@ -42,7 +42,7 @@
#ifndef CYLINDER_H
#define CYLINDER_H
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
#include "qglscenenode.h"
#include <QtCore/qmap.h>
@@ -50,7 +50,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Cylinder : public QDeclarativeItem3D
+class Cylinder : public QQuickItem3D
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
diff --git a/src/quick3d/cylindermesh.cpp b/src/quick3d/cylindermesh.cpp
index 5ed4707c6..9cfd2924f 100644
--- a/src/quick3d/cylindermesh.cpp
+++ b/src/quick3d/cylindermesh.cpp
@@ -180,7 +180,7 @@ private:
\internal
*/
CylinderMesh::CylinderMesh(QObject *parent)
- : QDeclarativeMesh(parent)
+ : QQuickMesh(parent)
, d(new CylinderMeshPrivate)
{
}
@@ -292,7 +292,7 @@ void CylinderMesh::draw(QGLPainter *painter, int branchId)
{
if (!d->currentCylinder)
createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
+ QQuickMesh::draw(painter, branchId);
}
/*!
diff --git a/src/quick3d/cylindermesh.h b/src/quick3d/cylindermesh.h
index c9fb6f628..bebf07782 100644
--- a/src/quick3d/cylindermesh.h
+++ b/src/quick3d/cylindermesh.h
@@ -42,7 +42,7 @@
#ifndef CYLINDER_H
#define CYLINDER_H
-#include "qdeclarativemesh.h"
+#include "qquickmesh.h"
QT_BEGIN_HEADER
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class CylinderMeshPrivate;
-class Q_QT3D_QUICK_EXPORT CylinderMesh : public QDeclarativeMesh
+class Q_QT3D_QUICK_EXPORT CylinderMesh : public QQuickMesh
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
diff --git a/src/quick3d/library.xml b/src/quick3d/library.xml
index d03e3f64c..f28c310c5 100644
--- a/src/quick3d/library.xml
+++ b/src/quick3d/library.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module>
- <type name="Capsule" defaultProperty="data" extends="QDeclarativeItem3D">
+ <type name="Capsule" defaultProperty="data" extends="QQuickItem3D">
<exports>
<export module="Qt3D.Shapes" version="1.0" type="Capsule" />
</exports>
@@ -11,7 +11,7 @@
<signal name="lengthChanged" />
<signal name="levelOfDetailChanged" />
</type>
- <type name="Cylinder" defaultProperty="data" extends="QDeclarativeItem3D">
+ <type name="Cylinder" defaultProperty="data" extends="QQuickItem3D">
<exports>
<export module="Qt3D.Shapes" version="1.0" type="Cylinder" />
</exports>
@@ -22,7 +22,7 @@
<signal name="lengthChanged" />
<signal name="levelOfDetailChanged" />
</type>
- <type name="Line" defaultProperty="data" extends="QDeclarativeItem3D">
+ <type name="Line" defaultProperty="data" extends="QQuickItem3D">
<exports>
<export module="Qt3D.Shapes" version="1.0" type="Line" />
</exports>
@@ -31,7 +31,7 @@
<signal name="verticesChanged" />
<signal name="widthChanged" />
</type>
- <type name="Point" defaultProperty="data" extends="QDeclarativeItem3D">
+ <type name="Point" defaultProperty="data" extends="QQuickItem3D">
<exports>
<export module="Qt3D.Shapes" version="1.0" type="Point" />
</exports>
@@ -40,7 +40,7 @@
<signal name="verticesChanged" />
<signal name="pointSizeChanged" />
</type>
- <type name="Sphere" defaultProperty="data" extends="QDeclarativeItem3D">
+ <type name="Sphere" defaultProperty="data" extends="QQuickItem3D">
<exports>
<export module="Qt3D.Shapes" version="1.0" type="Sphere" />
</exports>
diff --git a/src/quick3d/line.cpp b/src/quick3d/line.cpp
index eeefb05dd..44176a4f6 100644
--- a/src/quick3d/line.cpp
+++ b/src/quick3d/line.cpp
@@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
\internal
*/
Line::Line(QObject *parent) :
- QDeclarativeItem3D(parent)
+ QQuickItem3D(parent)
,m_width(3.0)
,m_geometry(0)
,m_changeFlag(false)
diff --git a/src/quick3d/line.h b/src/quick3d/line.h
index e397198bc..e5c5dcc1c 100644
--- a/src/quick3d/line.h
+++ b/src/quick3d/line.h
@@ -42,14 +42,14 @@
#ifndef LINE_H
#define LINE_H
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
#include "qglscenenode.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Q_QT3D_QUICK_EXPORT Line : public QDeclarativeItem3D
+class Q_QT3D_QUICK_EXPORT Line : public QQuickItem3D
{
Q_OBJECT
Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged)
diff --git a/src/quick3d/plugins.qmltypes b/src/quick3d/plugins.qmltypes
index f35fdf267..ee9e9d352 100755
--- a/src/quick3d/plugins.qmltypes
+++ b/src/quick3d/plugins.qmltypes
@@ -7,7 +7,7 @@ Module {
Component {
name: "Capsule"
defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
+ prototype: "QQuickItem3D"
exports: [
"Capsule 1.0"
]
@@ -21,7 +21,7 @@ Module {
Component {
name: "Cylinder"
defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
+ prototype: "QQuickItem3D"
exports: [
"Cylinder 1.0"
]
@@ -35,7 +35,7 @@ Module {
Component {
name: "Line"
defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
+ prototype: "QQuickItem3D"
exports: [
"Line 1.0"
]
@@ -47,7 +47,7 @@ Module {
Component {
name: "Point"
defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
+ prototype: "QQuickItem3D"
exports: [
"Point 1.0"
]
@@ -57,7 +57,7 @@ Module {
Signal { name: "pointSizeChanged" }
}
Component {
- name: "QDeclarativeItem3D"
+ name: "QQuickItem3D"
defaultProperty: "data"
prototype: "QQuickItem"
Enum {
@@ -92,20 +92,20 @@ Module {
Property { name: "y"; type: "qreal" }
Property { name: "z"; type: "qreal" }
Property { name: "scale"; type: "qreal" }
- Property { name: "transform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "pretransform"; type: "QGraphicsTransform3D"; isList: true; isReadonly: true }
- Property { name: "mesh"; type: "QDeclarativeMesh"; isPointer: true }
- Property { name: "effect"; type: "QDeclarativeEffect"; isPointer: true }
+ Property { name: "transform"; type: "QQuickQGraphicsTransform3D"; isList: true; isReadonly: true }
+ Property { name: "pretransform"; type: "QQuickQGraphicsTransform3D"; isList: true; isReadonly: true }
+ Property { name: "mesh"; type: "QQuickMesh"; isPointer: true }
+ Property { name: "effect"; type: "QQuickEffect"; isPointer: true }
Property { name: "light"; type: "QGLLightParameters"; isPointer: true }
Property { name: "resources"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "children"; type: "QDeclarativeItem3D"; isList: true; isReadonly: true }
+ Property { name: "children"; type: "QQuickItem3D"; isList: true; isReadonly: true }
Property { name: "cullFaces"; type: "CullFaces" }
Property { name: "sortChildren"; type: "SortMode" }
Property { name: "meshNode"; type: "string" }
Property { name: "inheritEvents"; type: "bool" }
Property { name: "enabled"; type: "bool" }
- Property { name: "parent"; type: "QDeclarativeItem3D"; isPointer: true }
+ Property { name: "parent"; type: "QQuickItem3D"; isPointer: true }
Signal { name: "positionChanged" }
Signal { name: "scaleChanged" }
Signal { name: "rotationChanged" }
@@ -145,7 +145,7 @@ Module {
Component {
name: "Sphere"
defaultProperty: "data"
- prototype: "QDeclarativeItem3D"
+ prototype: "QQuickItem3D"
exports: [
"Sphere 1.0"
]
diff --git a/src/quick3d/point.cpp b/src/quick3d/point.cpp
index 9dcccf5c2..9c9838a3f 100644
--- a/src/quick3d/point.cpp
+++ b/src/quick3d/point.cpp
@@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE
\internal
*/
Point::Point(QObject *parent) :
- QDeclarativeItem3D(parent)
+ QQuickItem3D(parent)
, m_pointSize(1.0f)
, m_geometry(0)
, m_changeFlag(false)
diff --git a/src/quick3d/point.h b/src/quick3d/point.h
index 22d1952f9..f5d568b58 100644
--- a/src/quick3d/point.h
+++ b/src/quick3d/point.h
@@ -42,14 +42,14 @@
#ifndef POINT_H
#define POINT_H
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
#include "qglscenenode.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Q_QT3D_QUICK_EXPORT Point : public QDeclarativeItem3D
+class Q_QT3D_QUICK_EXPORT Point : public QQuickItem3D
{
Q_OBJECT
Q_PROPERTY(qreal pointSize READ pointSize WRITE setPointSize NOTIFY pointSizeChanged)
diff --git a/src/quick3d/qdeclarativeanimation3d.cpp b/src/quick3d/qquickanimation3d.cpp
index c262e4a84..e84d2753a 100644
--- a/src/quick3d/qdeclarativeanimation3d.cpp
+++ b/src/quick3d/qquickanimation3d.cpp
@@ -39,52 +39,52 @@
**
****************************************************************************/
-#include "qdeclarativeanimation3d.h"
+#include "qquickanimation3d.h"
#include "qglsceneanimation.h"
QT_BEGIN_NAMESPACE
// -------------------------------------------------------------------------------------------------------------
-class QDeclarativeAnimation3DPrivate
+class QQuickAnimation3DPrivate
{
public:
- QDeclarativeAnimation3DPrivate(QDeclarativeAnimation3D *pParent, QGLSceneAnimation* pAnim) :
+ QQuickAnimation3DPrivate(QQuickAnimation3D *pParent, QGLSceneAnimation* pAnim) :
m_pParent(pParent)
,m_pAnim(pAnim)
{
Q_ASSERT(m_pParent);
}
- ~QDeclarativeAnimation3DPrivate()
+ ~QQuickAnimation3DPrivate()
{
}
- QDeclarativeAnimation3D* m_pParent;
+ QQuickAnimation3D* m_pParent;
QGLSceneAnimation* m_pAnim;
};
// -------------------------------------------------------------------------------------------------------------
-QDeclarativeAnimation3D::QDeclarativeAnimation3D(QObject *parent) :
+QQuickAnimation3D::QQuickAnimation3D(QObject *parent) :
QObject(parent)
- ,d(new QDeclarativeAnimation3DPrivate(this,0))
+ ,d(new QQuickAnimation3DPrivate(this,0))
{
}
-QDeclarativeAnimation3D::QDeclarativeAnimation3D(QGLSceneAnimation* pAnim, QObject *parent) :
+QQuickAnimation3D::QQuickAnimation3D(QGLSceneAnimation* pAnim, QObject *parent) :
QObject(parent)
- ,d(new QDeclarativeAnimation3DPrivate(this,pAnim))
+ ,d(new QQuickAnimation3DPrivate(this,pAnim))
{
Q_ASSERT(pAnim);
emit nameChanged();
}
-QDeclarativeAnimation3D::~QDeclarativeAnimation3D()
+QQuickAnimation3D::~QQuickAnimation3D()
{
delete d;
d = 0;
}
-QString QDeclarativeAnimation3D::name() const
+QString QQuickAnimation3D::name() const
{
Q_ASSERT(d);
if (d->m_pAnim) {
diff --git a/src/quick3d/qdeclarativeanimation3d.h b/src/quick3d/qquickanimation3d.h
index 3035c28b0..f8080a1bd 100644
--- a/src/quick3d/qdeclarativeanimation3d.h
+++ b/src/quick3d/qquickanimation3d.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEANIMATION3D_H
-#define QDECLARATIVEANIMATION3D_H
+#ifndef QQUICKANIMATION3D_H
+#define QQUICKANIMATION3D_H
#include "qt3dquickglobal.h"
@@ -53,17 +53,17 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtQuick3D)
-class QDeclarativeAnimation3DPrivate;
+class QQuickAnimation3DPrivate;
class QGLSceneAnimation;
-class Q_QT3D_QUICK_EXPORT QDeclarativeAnimation3D : public QObject
+class Q_QT3D_QUICK_EXPORT QQuickAnimation3D : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY nameChanged DESIGNABLE false )
public:
- explicit QDeclarativeAnimation3D(QObject *parent = 0);
- explicit QDeclarativeAnimation3D(QGLSceneAnimation* pAnim, QObject *parent = 0);
- ~QDeclarativeAnimation3D();
+ explicit QQuickAnimation3D(QObject *parent = 0);
+ explicit QQuickAnimation3D(QGLSceneAnimation* pAnim, QObject *parent = 0);
+ ~QQuickAnimation3D();
QString name() const;
@@ -73,13 +73,13 @@ Q_SIGNALS:
void nameChanged();
private:
- QDeclarativeAnimation3DPrivate *d;
+ QQuickAnimation3DPrivate *d;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeAnimation3D)
+QML_DECLARE_TYPE(QQuickAnimation3D)
QT_END_HEADER
-#endif // QDECLARATIVEANIMATION3D_H
+#endif // QQUICKANIMATION3D_H
diff --git a/src/quick3d/qdeclarativeeffect.cpp b/src/quick3d/qquickeffect.cpp
index 3261ff777..a2fa61cd3 100644
--- a/src/quick3d/qdeclarativeeffect.cpp
+++ b/src/quick3d/qquickeffect.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qdeclarativeeffect.h"
+#include "qquickeffect.h"
#include "qglpainter.h"
#include "qglmaterial.h"
@@ -53,7 +53,7 @@
#include "qglscenenode.h"
/*!
- \qmlclass Effect QDeclarativeEffect
+ \qmlclass Effect QQuickEffect
\brief The Effect item defines simple effects within the QML/3D environment. Examples
of such effects include textures, simple material and lighting effects, and so on.
\since 4.8
@@ -81,10 +81,10 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeEffectPrivate
+class QQuickEffectPrivate
{
public:
- QDeclarativeEffectPrivate()
+ QQuickEffectPrivate()
: color(255, 255, 255, 255),
useLighting(true),
decal(false),
@@ -95,7 +95,7 @@ public:
{
}
- ~QDeclarativeEffectPrivate()
+ ~QQuickEffectPrivate()
{
palette.clear();
}
@@ -123,7 +123,7 @@ public:
void cleanupResources();
};
-void QDeclarativeEffectPrivate::cleanupResources()
+void QQuickEffectPrivate::cleanupResources()
{
if (!palette)
return;
@@ -145,17 +145,17 @@ void QDeclarativeEffectPrivate::cleanupResources()
\internal
Constructs the Effect object with \a parent as its parent.
*/
-QDeclarativeEffect::QDeclarativeEffect(QObject *parent)
+QQuickEffect::QQuickEffect(QObject *parent)
: QObject(parent)
{
- d = new QDeclarativeEffectPrivate;
+ d = new QQuickEffectPrivate;
}
/*!
\internal
Destroy the \l Effect object and delete any unneeded data.
*/
-QDeclarativeEffect::~QDeclarativeEffect()
+QQuickEffect::~QQuickEffect()
{
delete d;
}
@@ -167,12 +167,12 @@ QDeclarativeEffect::~QDeclarativeEffect()
The default value for this property is white.
*/
-QColor QDeclarativeEffect::color() const
+QColor QQuickEffect::color() const
{
return d->color;
}
-void QDeclarativeEffect::setColor(const QColor& value)
+void QQuickEffect::setColor(const QColor& value)
{
d->color = value;
d->ensureMaterial();
@@ -189,12 +189,12 @@ void QDeclarativeEffect::setColor(const QColor& value)
The default value for this property is true.
*/
-bool QDeclarativeEffect::useLighting() const
+bool QQuickEffect::useLighting() const
{
return d->useLighting;
}
-void QDeclarativeEffect::setUseLighting(bool value)
+void QQuickEffect::setUseLighting(bool value)
{
d->useLighting = value;
emit effectChanged();
@@ -210,12 +210,12 @@ void QDeclarativeEffect::setUseLighting(bool value)
The default value for this property is false.
*/
-bool QDeclarativeEffect::decal() const
+bool QQuickEffect::decal() const
{
return d->decal;
}
-void QDeclarativeEffect::setDecal(bool value)
+void QQuickEffect::setDecal(bool value)
{
if (d->decal != value) {
d->decal = value;
@@ -233,12 +233,12 @@ void QDeclarativeEffect::setDecal(bool value)
This property overrides the viewport-specific blending setting
that is specified by Viewport::blending.
*/
-bool QDeclarativeEffect::blending() const
+bool QQuickEffect::blending() const
{
return d->blending;
}
-void QDeclarativeEffect::setBlending(bool value)
+void QQuickEffect::setBlending(bool value)
{
if (d->blending != value) {
d->blending = value;
@@ -260,14 +260,14 @@ void QDeclarativeEffect::setBlending(bool value)
\sa textureImage
*/
-QUrl QDeclarativeEffect::texture() const
+QUrl QQuickEffect::texture() const
{
if (!material())
return QUrl();
return material()->textureUrl();
}
-void QDeclarativeEffect::setTexture(const QUrl& value)
+void QQuickEffect::setTexture(const QUrl& value)
{
if (material() && material()->textureUrl() == value)
return;
@@ -304,7 +304,7 @@ void QDeclarativeEffect::setTexture(const QUrl& value)
\sa texture
*/
-QImage QDeclarativeEffect::textureImage() const
+QImage QQuickEffect::textureImage() const
{
return (material() && material()->texture()) ?
material()->texture()->image() : QImage();
@@ -316,7 +316,7 @@ QImage QDeclarativeEffect::textureImage() const
OpenGL defaults have been overridden to clamp the texture both horizontally and vertically as per QGL::Clamp.
*/
-void QDeclarativeEffect::setTextureImage(const QImage& value)
+void QQuickEffect::setTextureImage(const QImage& value)
{
QGLTexture2D * tex;
d->ensureMaterial();
@@ -346,7 +346,7 @@ void QDeclarativeEffect::setTextureImage(const QImage& value)
Defines the material to apply to items that use this effect.
*/
-QGLMaterial *QDeclarativeEffect::material() const
+QGLMaterial *QQuickEffect::material() const
{
if (!d->palette)
return 0;
@@ -358,7 +358,7 @@ QGLMaterial *QDeclarativeEffect::material() const
Sets the material for use with this effect. Creates a QGLMaterialCollection
to contain it if necessary.
*/
-void QDeclarativeEffect::setMaterial(QGLMaterial *value)
+void QQuickEffect::setMaterial(QGLMaterial *value)
{
d->ensureMaterial();
int newIndex = -1;
@@ -391,7 +391,7 @@ void QDeclarativeEffect::setMaterial(QGLMaterial *value)
\internal
Enable the effect on for a given \a painter.
*/
-void QDeclarativeEffect::enableEffect(QGLPainter *painter)
+void QQuickEffect::enableEffect(QGLPainter *painter)
{
painter->setColor(d->color);
if (d->materialIndex != -1 && d->palette->material(d->materialIndex))
@@ -432,7 +432,7 @@ void QDeclarativeEffect::enableEffect(QGLPainter *painter)
\internal
Disable the effect for a given \a painter.
*/
-void QDeclarativeEffect::disableEffect(QGLPainter *painter)
+void QQuickEffect::disableEffect(QGLPainter *painter)
{
painter->setStandardEffect(QGL::FlatColor);
painter->setColor(Qt::white);
@@ -450,7 +450,7 @@ void QDeclarativeEffect::disableEffect(QGLPainter *painter)
Subclasses can reimplement this function to set desired effects (e.g. user
effects);
*/
-void QDeclarativeEffect::applyTo(QGLSceneNode *node)
+void QQuickEffect::applyTo(QGLSceneNode *node)
{
d->ensureMaterial();
@@ -485,7 +485,7 @@ void QDeclarativeEffect::applyTo(QGLSceneNode *node)
}
}
-QGLTexture2D *QDeclarativeEffect::texture2D()
+QGLTexture2D *QQuickEffect::texture2D()
{
if (!material())
return 0;
@@ -495,12 +495,12 @@ QGLTexture2D *QDeclarativeEffect::texture2D()
/*!
Returns the progress of remote resource loading.
*/
-qreal QDeclarativeEffect::progress()
+qreal QQuickEffect::progress()
{
return d->progress;
}
-void QDeclarativeEffect::openglContextIsAboutToBeDestroyed()
+void QQuickEffect::openglContextIsAboutToBeDestroyed()
{
d->cleanupResources();
}
diff --git a/src/quick3d/qdeclarativeeffect.h b/src/quick3d/qquickeffect.h
index 60acd1c00..99153a5a3 100644
--- a/src/quick3d/qdeclarativeeffect.h
+++ b/src/quick3d/qquickeffect.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEEFFECT_P_H
-#define QDECLARATIVEEFFECT_P_H
+#ifndef QQUICKEFFECT_P_H
+#define QQUICKEFFECT_P_H
#include "qt3dquickglobal.h"
@@ -58,12 +58,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtQuick3D)
-class QDeclarativeEffectPrivate;
+class QQuickEffectPrivate;
class QGLPainter;
class QGLMaterial;
class QGLSceneNode;
-class Q_QT3D_QUICK_EXPORT QDeclarativeEffect : public QObject
+class Q_QT3D_QUICK_EXPORT QQuickEffect : public QObject
{
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY effectChanged)
@@ -75,8 +75,8 @@ class Q_QT3D_QUICK_EXPORT QDeclarativeEffect : public QObject
Q_PROPERTY(QGLMaterial *material READ material WRITE setMaterial NOTIFY effectChanged)
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
public:
- QDeclarativeEffect(QObject *parent = 0);
- virtual ~QDeclarativeEffect();
+ QQuickEffect(QObject *parent = 0);
+ virtual ~QQuickEffect();
virtual QColor color() const;
virtual void setColor(const QColor& value);
@@ -115,12 +115,12 @@ protected:
QGLTexture2D *texture2D();
private:
- QDeclarativeEffectPrivate *d;
+ QQuickEffectPrivate *d;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeEffect)
+QML_DECLARE_TYPE(QQuickEffect)
QT_END_HEADER
diff --git a/src/quick3d/qdeclarativeitem3d.cpp b/src/quick3d/qquickitem3d.cpp
index 590d1f2e4..5637beb3e 100644
--- a/src/quick3d/qdeclarativeitem3d.cpp
+++ b/src/quick3d/qquickitem3d.cpp
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#include "qdeclarativeitem3d.h"
-#include "qdeclarativeviewport.h"
-#include "qdeclarativemesh.h"
-#include "qdeclarativeeffect.h"
+#include "qquickitem3d.h"
+#include "qquickviewport.h"
+#include "qquickmesh.h"
+#include "qquickeffect.h"
#include "qgllightparameters.h"
#include "qglabstractscene.h"
@@ -55,7 +55,7 @@
#include <qquickcanvas.h>
/*!
- \qmlclass Item3D QDeclarativeItem3D
+ \qmlclass Item3D QQuickItem3D
\brief The Item3D item encapsulates 3D objects and contains all of the properties and methods needed for simple 3D operations.
part of a QML/3d script.
\since 4.8
@@ -223,11 +223,11 @@
\section1 Using QML Data Models With Item3D
- QDeclarativeItem3D supports standard \l
+ QQuickItem3D supports standard \l
{http://doc.qt.nokia.com/4.7/qdeclarativemodels.html#qml-data-models}
{QML Data Models} with a few caveats.
- QDeclarativeItem3D derives from QtDeclarativeItem, and interacts with
+ QQuickItem3D derives from QQuickItem, and interacts with
the \l{http://doc.qt.nokia.com/4.7/qml-component.html}{Component} element
normally. However, there is a delay between between removing an item from
a model and the cleaning up the corresponding Item3D, so it is recommended
@@ -257,10 +257,10 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeItem3DPrivate
+class QQuickItem3DPrivate
{
public:
- QDeclarativeItem3DPrivate(QDeclarativeItem3D *_item)
+ QQuickItem3DPrivate(QQuickItem3D *_item)
: item(_item)
, viewport(0)
, position(0.0f, 0.0f, 0.0f)
@@ -272,8 +272,8 @@ public:
, requireBlockingEffectsCheck(false)
, light(0)
, objectPickId(-1)
- , cullFaces(QDeclarativeItem3D::CullDisabled)
- , sortChildren(QDeclarativeItem3D::DefaultSorting)
+ , cullFaces(QQuickItem3D::CullDisabled)
+ , sortChildren(QQuickItem3D::DefaultSorting)
, inheritEvents(false)
, isEnabled(true)
, isInitialized(false)
@@ -282,21 +282,21 @@ public:
, bConnectedToOpenGLContextSignal(false)
{
}
- ~QDeclarativeItem3DPrivate();
+ ~QQuickItem3DPrivate();
- QDeclarativeItem3D *item;
- QDeclarativeViewport *viewport;
+ QQuickItem3D *item;
+ QQuickViewport *viewport;
QVector3D position;
QVector3D pivot;
bool usePivot;
qreal scale;
- QDeclarativeMesh *mesh;
- QDeclarativeEffect *effect;
+ QQuickMesh *mesh;
+ QQuickEffect *effect;
bool requireBlockingEffectsCheck;
QGLLightParameters *light;
int objectPickId;
- QDeclarativeItem3D::CullFaces cullFaces;
- QDeclarativeItem3D::SortMode sortChildren;
+ QQuickItem3D::CullFaces cullFaces;
+ QQuickItem3D::SortMode sortChildren;
bool inheritEvents;
bool isEnabled;
@@ -313,26 +313,26 @@ public:
static int resources_count(QQmlListProperty<QObject> *);
// transform property
- static int transform_count(QQmlListProperty<QGraphicsTransform3D> *list);
- static void transform_append(QQmlListProperty<QGraphicsTransform3D> *list, QGraphicsTransform3D *);
- static QGraphicsTransform3D *transform_at(QQmlListProperty<QGraphicsTransform3D> *list, int);
- static void transform_clear(QQmlListProperty<QGraphicsTransform3D> *list);
- QList<QGraphicsTransform3D *> transforms;
+ static int transform_count(QQmlListProperty<QQuickQGraphicsTransform3D> *list);
+ static void transform_append(QQmlListProperty<QQuickQGraphicsTransform3D> *list, QQuickQGraphicsTransform3D *);
+ static QQuickQGraphicsTransform3D *transform_at(QQmlListProperty<QQuickQGraphicsTransform3D> *list, int);
+ static void transform_clear(QQmlListProperty<QQuickQGraphicsTransform3D> *list);
+ QList<QQuickQGraphicsTransform3D *> transforms;
// pretransform property
- static int pretransform_count(QQmlListProperty<QGraphicsTransform3D> *list);
- static void pretransform_append(QQmlListProperty<QGraphicsTransform3D> *list, QGraphicsTransform3D *);
- static QGraphicsTransform3D *pretransform_at(QQmlListProperty<QGraphicsTransform3D> *list, int);
- static void pretransform_clear(QQmlListProperty<QGraphicsTransform3D> *list);
- QList<QGraphicsTransform3D *> pretransforms;
+ static int pretransform_count(QQmlListProperty<QQuickQGraphicsTransform3D> *list);
+ static void pretransform_append(QQmlListProperty<QQuickQGraphicsTransform3D> *list, QQuickQGraphicsTransform3D *);
+ static QQuickQGraphicsTransform3D *pretransform_at(QQmlListProperty<QQuickQGraphicsTransform3D> *list, int);
+ static void pretransform_clear(QQmlListProperty<QQuickQGraphicsTransform3D> *list);
+ QList<QQuickQGraphicsTransform3D *> pretransforms;
// animations property
- static int animations_count(QQmlListProperty<QDeclarativeAnimation3D> *list);
- static void animations_append(QQmlListProperty<QDeclarativeAnimation3D> *list, QDeclarativeAnimation3D *);
- static QDeclarativeAnimation3D *animations_at(QQmlListProperty<QDeclarativeAnimation3D> *list, int);
- static void animations_clear(QQmlListProperty<QDeclarativeAnimation3D> *list);
- QList<QDeclarativeAnimation3D *> animations;
+ static int animations_count(QQmlListProperty<QQuickAnimation3D> *list);
+ static void animations_append(QQmlListProperty<QQuickAnimation3D> *list, QQuickAnimation3D *);
+ static QQuickAnimation3D *animations_at(QQmlListProperty<QQuickAnimation3D> *list, int);
+ static void animations_clear(QQmlListProperty<QQuickAnimation3D> *list);
+ QList<QQuickAnimation3D *> animations;
// transform convenience functions
QMatrix4x4 localTransforms() const;
@@ -343,13 +343,13 @@ public:
bool bConnectedToOpenGLContextSignal;
};
-QDeclarativeItem3DPrivate::~QDeclarativeItem3DPrivate()
+QQuickItem3DPrivate::~QQuickItem3DPrivate()
{
}
-int QDeclarativeItem3DPrivate::transform_count(QQmlListProperty<QGraphicsTransform3D> *list)
+int QQuickItem3DPrivate::transform_count(QQmlListProperty<QQuickQGraphicsTransform3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->transforms.count();
} else {
@@ -358,10 +358,10 @@ int QDeclarativeItem3DPrivate::transform_count(QQmlListProperty<QGraphicsTransfo
}
}
-void QDeclarativeItem3DPrivate::transform_append(QQmlListProperty<QGraphicsTransform3D> *list, QGraphicsTransform3D *item)
+void QQuickItem3DPrivate::transform_append(QQmlListProperty<QQuickQGraphicsTransform3D> *list, QQuickQGraphicsTransform3D *item)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
- QList<QGraphicsTransform3D *> *ptrans;
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
+ QList<QQuickQGraphicsTransform3D *> *ptrans;
if (object)
{
ptrans = &object->d->transforms;
@@ -377,9 +377,9 @@ void QDeclarativeItem3DPrivate::transform_append(QQmlListProperty<QGraphicsTrans
qWarning()<<"Warning: could not find Item3D to add transformation to.";
}
-QGraphicsTransform3D *QDeclarativeItem3DPrivate::transform_at(QQmlListProperty<QGraphicsTransform3D> *list, int idx)
+QQuickQGraphicsTransform3D *QQuickItem3DPrivate::transform_at(QQmlListProperty<QQuickQGraphicsTransform3D> *list, int idx)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->transforms.at(idx);
} else {
@@ -389,10 +389,10 @@ QGraphicsTransform3D *QDeclarativeItem3DPrivate::transform_at(QQmlListProperty<Q
return 0;
}
-void QDeclarativeItem3DPrivate::transform_clear(QQmlListProperty<QGraphicsTransform3D> *list)
+void QQuickItem3DPrivate::transform_clear(QQmlListProperty<QQuickQGraphicsTransform3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
object->d->transforms.clear();
object->update();
@@ -401,9 +401,9 @@ void QDeclarativeItem3DPrivate::transform_clear(QQmlListProperty<QGraphicsTransf
qWarning()<<"Warning: could not find Item3D to clear of transformations";
}
-int QDeclarativeItem3DPrivate::pretransform_count(QQmlListProperty<QGraphicsTransform3D> *list)
+int QQuickItem3DPrivate::pretransform_count(QQmlListProperty<QQuickQGraphicsTransform3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->pretransforms.count();
} else {
@@ -412,10 +412,10 @@ int QDeclarativeItem3DPrivate::pretransform_count(QQmlListProperty<QGraphicsTran
}
}
-void QDeclarativeItem3DPrivate::pretransform_append(QQmlListProperty<QGraphicsTransform3D> *list, QGraphicsTransform3D *item)
+void QQuickItem3DPrivate::pretransform_append(QQmlListProperty<QQuickQGraphicsTransform3D> *list, QQuickQGraphicsTransform3D *item)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
- QList<QGraphicsTransform3D *> *ptrans;
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
+ QList<QQuickQGraphicsTransform3D *> *ptrans;
if (object)
{
ptrans = &object->d->pretransforms;
@@ -431,9 +431,9 @@ void QDeclarativeItem3DPrivate::pretransform_append(QQmlListProperty<QGraphicsTr
qWarning()<<"Warning: could not find Item3D to add transformation to.";
}
-QGraphicsTransform3D *QDeclarativeItem3DPrivate::pretransform_at(QQmlListProperty<QGraphicsTransform3D> *list, int idx)
+QQuickQGraphicsTransform3D *QQuickItem3DPrivate::pretransform_at(QQmlListProperty<QQuickQGraphicsTransform3D> *list, int idx)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->pretransforms.at(idx);
} else {
@@ -443,10 +443,10 @@ QGraphicsTransform3D *QDeclarativeItem3DPrivate::pretransform_at(QQmlListPropert
return 0;
}
-void QDeclarativeItem3DPrivate::pretransform_clear(QQmlListProperty<QGraphicsTransform3D> *list)
+void QQuickItem3DPrivate::pretransform_clear(QQmlListProperty<QQuickQGraphicsTransform3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
object->d->pretransforms.clear();
object->update();
@@ -455,9 +455,9 @@ void QDeclarativeItem3DPrivate::pretransform_clear(QQmlListProperty<QGraphicsTra
qWarning()<<"Warning: could not find Item3D to clear of transformations";
}
-int QDeclarativeItem3DPrivate::animations_count(QQmlListProperty<QDeclarativeAnimation3D> *list)
+int QQuickItem3DPrivate::animations_count(QQmlListProperty<QQuickAnimation3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->animations.count();
} else {
@@ -466,10 +466,10 @@ int QDeclarativeItem3DPrivate::animations_count(QQmlListProperty<QDeclarativeAni
}
}
-void QDeclarativeItem3DPrivate::animations_append(QQmlListProperty<QDeclarativeAnimation3D> *list, QDeclarativeAnimation3D *item)
+void QQuickItem3DPrivate::animations_append(QQmlListProperty<QQuickAnimation3D> *list, QQuickAnimation3D *item)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
- QList<QDeclarativeAnimation3D *> *panim;
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
+ QList<QQuickAnimation3D *> *panim;
if (object)
{
panim = &object->d->animations;
@@ -481,9 +481,9 @@ void QDeclarativeItem3DPrivate::animations_append(QQmlListProperty<QDeclarativeA
qWarning()<<"Warning: could not find Item3D to add animation to.";
}
-QDeclarativeAnimation3D* QDeclarativeItem3DPrivate::animations_at(QQmlListProperty<QDeclarativeAnimation3D> *list, int idx)
+QQuickAnimation3D* QQuickItem3DPrivate::animations_at(QQmlListProperty<QQuickAnimation3D> *list, int idx)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
return object->d->animations.at(idx);
} else {
@@ -493,9 +493,9 @@ QDeclarativeAnimation3D* QDeclarativeItem3DPrivate::animations_at(QQmlListProper
return 0;
}
-void QDeclarativeItem3DPrivate::animations_clear(QQmlListProperty<QDeclarativeAnimation3D> *list)
+void QQuickItem3DPrivate::animations_clear(QQmlListProperty<QQuickAnimation3D> *list)
{
- QDeclarativeItem3D *object = qobject_cast<QDeclarativeItem3D *>(list->object);
+ QQuickItem3D *object = qobject_cast<QQuickItem3D *>(list->object);
if (object) {
object->d->animations.clear();
}
@@ -505,7 +505,7 @@ void QDeclarativeItem3DPrivate::animations_clear(QQmlListProperty<QDeclarativeAn
-void QDeclarativeItem3DPrivate::data_append(QQmlListProperty<QObject> *prop, QObject *o)
+void QQuickItem3DPrivate::data_append(QQmlListProperty<QObject> *prop, QObject *o)
{
// This function is called by the QML runtime to assign children to
// an item3d. The object 'o' is the new child, and prop->object is the
@@ -525,13 +525,13 @@ void QDeclarativeItem3DPrivate::data_append(QQmlListProperty<QObject> *prop, QOb
QQuickItem *i = qobject_cast<QQuickItem *>(o);
if (i)
- i->setParentItem(static_cast<QDeclarativeItem3D *>(prop->object));
+ i->setParentItem(static_cast<QQuickItem3D *>(prop->object));
else
- o->setParent(static_cast<QDeclarativeItem3D *>(prop->object));
+ o->setParent(static_cast<QQuickItem3D *>(prop->object));
}
-QObject *QDeclarativeItem3DPrivate::resources_at(QQmlListProperty<QObject> *prop, int index)
+QObject *QQuickItem3DPrivate::resources_at(QQmlListProperty<QObject> *prop, int index)
{
QObjectList children = prop->object->children();
if (index < children.count())
@@ -540,12 +540,12 @@ QObject *QDeclarativeItem3DPrivate::resources_at(QQmlListProperty<QObject> *prop
return 0;
}
-void QDeclarativeItem3DPrivate::resources_append(QQmlListProperty<QObject> *prop, QObject *o)
+void QQuickItem3DPrivate::resources_append(QQmlListProperty<QObject> *prop, QObject *o)
{
o->setParent(prop->object);
}
-int QDeclarativeItem3DPrivate::resources_count(QQmlListProperty<QObject> *prop)
+int QQuickItem3DPrivate::resources_count(QQmlListProperty<QObject> *prop)
{
return prop->object->children().count();
}
@@ -555,7 +555,7 @@ int QDeclarativeItem3DPrivate::resources_count(QQmlListProperty<QObject> *prop)
Applies position, scale and rotation transforms for this item3d to matrix
\a m
*/
-QMatrix4x4 QDeclarativeItem3DPrivate::localTransforms() const
+QMatrix4x4 QQuickItem3DPrivate::localTransforms() const
{
QMatrix4x4 m;
m.translate(position);
@@ -583,25 +583,25 @@ QMatrix4x4 QDeclarativeItem3DPrivate::localTransforms() const
/*!
\internal
*/
-QDeclarativeItem3D::QDeclarativeItem3D(QObject *parent)
+QQuickItem3D::QQuickItem3D(QObject *parent)
: QQuickItem(0)
{
- d = new QDeclarativeItem3DPrivate(this);
+ d = new QQuickItem3DPrivate(this);
- QDeclarativeItem3D *itemParent = qobject_cast<QDeclarativeItem3D *>(parent);
+ QQuickItem3D *itemParent = qobject_cast<QQuickItem3D *>(parent);
if (itemParent) {
setParentItem(itemParent);
} else {
setParent(parent);
}
- // TODO: Handle QDeclarativeItem3D case
+ // TODO: Handle QQuickItem3D case
}
/*!
\internal
*/
-QDeclarativeItem3D::~QDeclarativeItem3D()
+QQuickItem3D::~QQuickItem3D()
{
delete d;
}
@@ -617,12 +617,12 @@ QDeclarativeItem3D::~QDeclarativeItem3D()
\sa x, y, z
*/
-QVector3D QDeclarativeItem3D::position() const
+QVector3D QQuickItem3D::position() const
{
return d->position;
}
-void QDeclarativeItem3D::setPosition(const QVector3D& value)
+void QQuickItem3D::setPosition(const QVector3D& value)
{
d->position = value;
emit positionChanged();
@@ -638,12 +638,12 @@ void QDeclarativeItem3D::setPosition(const QVector3D& value)
\sa position, y, z
*/
-qreal QDeclarativeItem3D::x() const
+qreal QQuickItem3D::x() const
{
return d->position.x();
}
-void QDeclarativeItem3D::setX(qreal value)
+void QQuickItem3D::setX(qreal value)
{
d->position.setX(value);
emit positionChanged();
@@ -659,12 +659,12 @@ void QDeclarativeItem3D::setX(qreal value)
\sa position, x, z
*/
-qreal QDeclarativeItem3D::y() const
+qreal QQuickItem3D::y() const
{
return d->position.y();
}
-void QDeclarativeItem3D::setY(qreal value)
+void QQuickItem3D::setY(qreal value)
{
d->position.setY(value);
emit positionChanged();
@@ -680,12 +680,12 @@ void QDeclarativeItem3D::setY(qreal value)
\sa position, x, y
*/
-qreal QDeclarativeItem3D::z() const
+qreal QQuickItem3D::z() const
{
return d->position.z();
}
-void QDeclarativeItem3D::setZ(qreal value)
+void QQuickItem3D::setZ(qreal value)
{
d->position.setZ(value);
emit positionChanged();
@@ -702,12 +702,12 @@ void QDeclarativeItem3D::setZ(qreal value)
\sa transform
*/
-qreal QDeclarativeItem3D::scale() const
+qreal QQuickItem3D::scale() const
{
return d->scale;
}
-void QDeclarativeItem3D::setScale(qreal value)
+void QQuickItem3D::setScale(qreal value)
{
d->scale = value;
emit scaleChanged();
@@ -755,9 +755,9 @@ void QDeclarativeItem3D::setScale(qreal value)
*/
-QQmlListProperty<QGraphicsTransform3D> QDeclarativeItem3D::transform()
+QQmlListProperty<QQuickQGraphicsTransform3D> QQuickItem3D::transform()
{
- return QQmlListProperty<QGraphicsTransform3D>(this, 0, d->transform_append, d->transform_count,
+ return QQmlListProperty<QQuickQGraphicsTransform3D>(this, 0, d->transform_append, d->transform_count,
d->transform_at, d->transform_clear);
}
@@ -781,9 +781,9 @@ QQmlListProperty<QGraphicsTransform3D> QDeclarativeItem3D::transform()
\sa transform, scale, position
*/
-QQmlListProperty<QGraphicsTransform3D> QDeclarativeItem3D::pretransform()
+QQmlListProperty<QQuickQGraphicsTransform3D> QQuickItem3D::pretransform()
{
- return QQmlListProperty<QGraphicsTransform3D>(this, 0, d->pretransform_append, d->pretransform_count,
+ return QQmlListProperty<QQuickQGraphicsTransform3D>(this, 0, d->pretransform_append, d->pretransform_count,
d->pretransform_at, d->pretransform_clear);
}
@@ -808,12 +808,12 @@ QQmlListProperty<QGraphicsTransform3D> QDeclarativeItem3D::pretransform()
The default value for this property is false.
*/
-bool QDeclarativeItem3D::inheritEvents() const
+bool QQuickItem3D::inheritEvents() const
{
return d->inheritEvents;
}
-void QDeclarativeItem3D::setInheritEvents(bool inherit)
+void QQuickItem3D::setInheritEvents(bool inherit)
{
d->inheritEvents = inherit;
@@ -821,7 +821,7 @@ void QDeclarativeItem3D::setInheritEvents(bool inherit)
if (inherit)
{
for (int index = 0; index < children().size(); ++index) {
- QDeclarativeItem3D *subItem = qobject_cast<QDeclarativeItem3D *>(children().at(index));
+ QQuickItem3D *subItem = qobject_cast<QQuickItem3D *>(children().at(index));
if (subItem)
{
// Proxy the mouse event signals to the parent so that
@@ -838,7 +838,7 @@ void QDeclarativeItem3D::setInheritEvents(bool inherit)
else
{
for (int index = 0; index < children().size(); ++index) {
- QDeclarativeItem3D *subItem = qobject_cast<QDeclarativeItem3D *>(children().at(index));
+ QQuickItem3D *subItem = qobject_cast<QQuickItem3D *>(children().at(index));
if (subItem)
{
// Proxy the mouse event signals to the parent so that
@@ -871,12 +871,12 @@ void QDeclarativeItem3D::setInheritEvents(bool inherit)
\sa effect
*/
-QDeclarativeMesh *QDeclarativeItem3D::mesh() const
+QQuickMesh *QQuickItem3D::mesh() const
{
return d->mesh;
}
-void QDeclarativeItem3D::setMesh(QDeclarativeMesh *value)
+void QQuickItem3D::setMesh(QQuickMesh *value)
{
if (d->mesh != value)
{
@@ -917,12 +917,12 @@ void QDeclarativeItem3D::setMesh(QDeclarativeMesh *value)
\sa Effect, mesh
*/
-QDeclarativeEffect *QDeclarativeItem3D::effect() const
+QQuickEffect *QQuickItem3D::effect() const
{
return d->effect;
}
-void QDeclarativeItem3D::setEffect(QDeclarativeEffect *value)
+void QQuickItem3D::setEffect(QQuickEffect *value)
{
if (d->effect == value)
return;
@@ -948,12 +948,12 @@ void QDeclarativeItem3D::setEffect(QDeclarativeEffect *value)
\sa Viewport::light
*/
-QGLLightParameters *QDeclarativeItem3D::light() const
+QGLLightParameters *QQuickItem3D::light() const
{
return d->light;
}
-void QDeclarativeItem3D::setLight(QGLLightParameters *value)
+void QQuickItem3D::setLight(QGLLightParameters *value)
{
if (d->light != value) {
if (d->light) {
@@ -978,7 +978,7 @@ void QDeclarativeItem3D::setLight(QGLLightParameters *value)
child items for this item. This provides logical grouping of items in a
scene. Transformations that are applied to this item will also affect
child items. Note that children that are not derived from
- QDeclarativeItem3D will not be rendered at draw time, but will interact
+ QQuickItem3D will not be rendered at draw time, but will interact
normally otherwise (e.g. parenting, signal passing etc). Use a
qobject_cast if you need to check whether a child is an Item3D.
@@ -993,11 +993,11 @@ void QDeclarativeItem3D::setLight(QGLLightParameters *value)
\sa transform
*/
-QQmlListProperty<QObject> QDeclarativeItem3D::resources()
+QQmlListProperty<QObject> QQuickItem3D::resources()
{
- return QQmlListProperty<QObject>(this, 0, QDeclarativeItem3DPrivate::resources_append,
- QDeclarativeItem3DPrivate::resources_count,
- QDeclarativeItem3DPrivate::resources_at);
+ return QQmlListProperty<QObject>(this, 0, QQuickItem3DPrivate::resources_append,
+ QQuickItem3DPrivate::resources_count,
+ QQuickItem3DPrivate::resources_at);
}
@@ -1009,9 +1009,9 @@ QQmlListProperty<QObject> QDeclarativeItem3D::resources()
include additional data and resources. Currently there is no underlying
implementation for this.
*/
-QQmlListProperty<QObject> QDeclarativeItem3D::data()
+QQmlListProperty<QObject> QQuickItem3D::data()
{
- return QQmlListProperty<QObject>(this, 0, QDeclarativeItem3DPrivate::data_append);
+ return QQmlListProperty<QObject>(this, 0, QQuickItem3DPrivate::data_append);
}
/*!
@@ -1029,12 +1029,12 @@ QQmlListProperty<QObject> QDeclarativeItem3D::data()
\li CullClockwise Cull faces based on clockwise winding of vertices.
\endlist
*/
-QDeclarativeItem3D::CullFaces QDeclarativeItem3D::cullFaces() const
+QQuickItem3D::CullFaces QQuickItem3D::cullFaces() const
{
return d->cullFaces;
}
-void QDeclarativeItem3D::setCullFaces(QDeclarativeItem3D::CullFaces value)
+void QQuickItem3D::setCullFaces(QQuickItem3D::CullFaces value)
{
if (d->cullFaces != value) {
d->cullFaces = value;
@@ -1059,12 +1059,12 @@ void QDeclarativeItem3D::setCullFaces(QDeclarativeItem3D::CullFaces value)
and must be drawn in back-to-front order for correct rendering.
\endlist
*/
-QDeclarativeItem3D::SortMode QDeclarativeItem3D::sortChildren() const
+QQuickItem3D::SortMode QQuickItem3D::sortChildren() const
{
return d->sortChildren;
}
-void QDeclarativeItem3D::setSortChildren(QDeclarativeItem3D::SortMode mode)
+void QQuickItem3D::setSortChildren(QQuickItem3D::SortMode mode)
{
if (d->sortChildren != mode) {
d->sortChildren = mode;
@@ -1081,7 +1081,7 @@ void QDeclarativeItem3D::setSortChildren(QDeclarativeItem3D::SortMode mode)
\sa drawLightingCleanup(), draw()
*/
-void QDeclarativeItem3D::drawLightingSetup(QGLPainter *painter, const QGLLightParameters *currentLight, QMatrix4x4 &currentLightTransform)
+void QQuickItem3D::drawLightingSetup(QGLPainter *painter, const QGLLightParameters *currentLight, QMatrix4x4 &currentLightTransform)
{
//Lighting
Q_UNUSED(currentLight)
@@ -1099,7 +1099,7 @@ void QDeclarativeItem3D::drawLightingSetup(QGLPainter *painter, const QGLLightPa
\sa drawLightingSetup(), draw()
*/
-void QDeclarativeItem3D::drawLightingCleanup(QGLPainter *painter, const QGLLightParameters *currentLight, QMatrix4x4 &currentLightTransform)
+void QQuickItem3D::drawLightingCleanup(QGLPainter *painter, const QGLLightParameters *currentLight, QMatrix4x4 &currentLightTransform)
{
if (d->light)
painter->setMainLight(currentLight, currentLightTransform);
@@ -1114,7 +1114,7 @@ void QDeclarativeItem3D::drawLightingCleanup(QGLPainter *painter, const QGLLight
\sa drawLightingCleanup(), draw()
*/
-void QDeclarativeItem3D::drawEffectSetup(QGLPainter *painter, bool &viewportBlend, bool &effectBlend)
+void QQuickItem3D::drawEffectSetup(QGLPainter *painter, bool &viewportBlend, bool &effectBlend)
{
// Blending change for the effect.
viewportBlend = d->viewport ? d->viewport->blending() : false;
@@ -1138,7 +1138,7 @@ void QDeclarativeItem3D::drawEffectSetup(QGLPainter *painter, bool &viewportBlen
\sa drawEffectSetup(), draw()
*/
-void QDeclarativeItem3D::drawEffectCleanup(QGLPainter *painter, bool &viewportBlend, bool &effectBlend)
+void QQuickItem3D::drawEffectCleanup(QGLPainter *painter, bool &viewportBlend, bool &effectBlend)
{
if (d->effect)
d->effect->disableEffect(painter);
@@ -1158,7 +1158,7 @@ void QDeclarativeItem3D::drawEffectCleanup(QGLPainter *painter, bool &viewportBl
\sa drawCullCleanup(), draw()
*/
-void QDeclarativeItem3D::drawCullSetup()
+void QQuickItem3D::drawCullSetup()
{
//Culling
if ((d->cullFaces & ~CullClockwise) == CullDisabled) {
@@ -1180,7 +1180,7 @@ void QDeclarativeItem3D::drawCullSetup()
\sa drawCullSetup(), draw()
*/
-void QDeclarativeItem3D::drawCullCleanup()
+void QQuickItem3D::drawCullCleanup()
{
if (d->cullFaces != CullDisabled)
glDisable(GL_CULL_FACE);
@@ -1194,7 +1194,7 @@ void QDeclarativeItem3D::drawCullCleanup()
\sa drawTransformCleanup(), draw()
*/
-void QDeclarativeItem3D::drawTransformSetup(QGLPainter *painter)
+void QQuickItem3D::drawTransformSetup(QGLPainter *painter)
{
//Local and Global transforms
painter->modelViewMatrix().push();
@@ -1207,7 +1207,7 @@ void QDeclarativeItem3D::drawTransformSetup(QGLPainter *painter)
\sa drawTransformSetup(), draw()
*/
-void QDeclarativeItem3D::drawTransformCleanup(QGLPainter *painter)
+void QQuickItem3D::drawTransformCleanup(QGLPainter *painter)
{
//Unset parameters for transforms, effects etc.
painter->modelViewMatrix().pop();
@@ -1221,19 +1221,19 @@ void QDeclarativeItem3D::drawTransformCleanup(QGLPainter *painter)
\sa sortMode(), draw()
*/
-void QDeclarativeItem3D::drawChildren(QGLPainter *painter)
+void QQuickItem3D::drawChildren(QGLPainter *painter)
{
// Find all 3d children for drawing
- QList<QDeclarativeItem3D *> list;;
+ QList<QQuickItem3D *> list;;
foreach (QObject* o, children())
{
- if (QDeclarativeItem3D *item3d = qobject_cast<QDeclarativeItem3D*>(o))
+ if (QQuickItem3D *item3d = qobject_cast<QQuickItem3D*>(o))
{
list.append(item3d);
}
}
- if (d->sortChildren == QDeclarativeItem3D::BackToFront) {
+ if (d->sortChildren == QQuickItem3D::BackToFront) {
// Collect up the transformed z positions of all children.
QList<qreal> zlist;
QMatrix4x4 mv = painter->modelViewMatrix();
@@ -1280,7 +1280,7 @@ void QDeclarativeItem3D::drawChildren(QGLPainter *painter)
\sa drawItem(), drawLightingSetup(), drawCullSetup(), drawEffectSetup(), drawChildren(), drawTransformSetup()
*/
-void QDeclarativeItem3D::draw(QGLPainter *painter)
+void QQuickItem3D::draw(QGLPainter *painter)
{
// Bail out if this item and its children have been disabled.
if (!d->isEnabled)
@@ -1331,7 +1331,7 @@ void QDeclarativeItem3D::draw(QGLPainter *painter)
/*!
\internal
*/
-void QDeclarativeViewport::setItemViewport(QDeclarativeItem3D *item)
+void QQuickViewport::setItemViewport(QQuickItem3D *item)
{
item->d->viewport = this;
}
@@ -1348,14 +1348,14 @@ void QDeclarativeViewport::setItemViewport(QDeclarativeItem3D *item)
function performs all of the splitting of meshes into sub-branches ready for local
control by the item.
*/
-void QDeclarativeItem3D::initialize(QGLPainter *painter)
+void QQuickItem3D::initialize(QGLPainter *painter)
{
if (d->isInitialized) return;
if (!d->viewport)
{
- if (QDeclarativeItem3D* parentItem =
- qobject_cast<QDeclarativeItem3D*>(parent()))
+ if (QQuickItem3D* parentItem =
+ qobject_cast<QQuickItem3D*>(parent()))
{
d->viewport = parentItem->d->viewport;
Q_ASSERT(d->viewport);
@@ -1365,7 +1365,7 @@ void QDeclarativeItem3D::initialize(QGLPainter *painter)
d->objectPickId = d->viewport->registerPickableObject(this);
for (int index = 0; index < children().size(); ++index) {
- QDeclarativeItem3D *item = qobject_cast<QDeclarativeItem3D *>(children().at(index));
+ QQuickItem3D *item = qobject_cast<QQuickItem3D *>(children().at(index));
if (item) {
//Event inheritance is generally only declared at initialization, but can also be done at runtime
//if the user wishes (though not recommended).
@@ -1396,12 +1396,12 @@ void QDeclarativeItem3D::initialize(QGLPainter *painter)
\sa initialize()
*/
-bool QDeclarativeItem3D::isInitialized() const
+bool QQuickItem3D::isInitialized() const
{
return d->isInitialized;
}
-void QDeclarativeItem3D::componentComplete()
+void QQuickItem3D::componentComplete()
{
QQuickItem::componentComplete();
d->componentComplete = true;
@@ -1418,7 +1418,7 @@ void QDeclarativeItem3D::componentComplete()
}
}
- QDeclarativeItem3D *parentItem3D = qobject_cast<QDeclarativeItem3D*>(parentItem());
+ QQuickItem3D *parentItem3D = qobject_cast<QQuickItem3D*>(parentItem());
if (!parentItem3D)
{
if (!d->viewport)
@@ -1450,7 +1450,7 @@ void QDeclarativeItem3D::componentComplete()
The \c drawItem function performs the actual drawing of the mesh branch which corresponds
to the section of the mesh being drawn by the \l Item3D to a specific \a painter.
*/
-void QDeclarativeItem3D::drawItem(QGLPainter *painter)
+void QQuickItem3D::drawItem(QGLPainter *painter)
{
if (d->mesh)
{
@@ -1459,7 +1459,7 @@ void QDeclarativeItem3D::drawItem(QGLPainter *painter)
}
/*!
- \relates QDeclarativeItem3D
+ \relates QQuickItem3D
Print a description of \a item to the console.
If \a detailed is true (which it is by default) then all the properties
@@ -1470,11 +1470,11 @@ void QDeclarativeItem3D::drawItem(QGLPainter *painter)
The \a indent argument is used internally.
*/
-void qDumpItem(QDeclarativeItem3D *item, bool detailed, int indent)
+void qDumpItem(QQuickItem3D *item, bool detailed, int indent)
{
if (item)
{
- QDeclarativeMesh *mesh = item->mesh();
+ QQuickMesh *mesh = item->mesh();
QString ind;
ind.fill(QLatin1Char(' '), indent * 4);
if (mesh)
@@ -1492,7 +1492,7 @@ void qDumpItem(QDeclarativeItem3D *item, bool detailed, int indent)
QObjectList kids = item->children();
for (int i = 0; i < kids.size(); ++i)
{
- QDeclarativeItem3D *it = qobject_cast<QDeclarativeItem3D*>(kids.at(i));
+ QQuickItem3D *it = qobject_cast<QQuickItem3D*>(kids.at(i));
qDumpItem(it, detailed, indent + 1);
}
}
@@ -1503,16 +1503,16 @@ void qDumpItem(QDeclarativeItem3D *item, bool detailed, int indent)
world coordinates (i.e. coordinates untransformed by any item3d's
transforms).
*/
-QMatrix4x4 QDeclarativeItem3DPrivate::localToWorldMatrix() const
+QMatrix4x4 QQuickItem3DPrivate::localToWorldMatrix() const
{
QMatrix4x4 result;
result = localTransforms() * result;
- QDeclarativeItem3D *anscestor = qobject_cast<QDeclarativeItem3D *>(item->parent());
+ QQuickItem3D *anscestor = qobject_cast<QQuickItem3D *>(item->parent());
while (anscestor)
{
result = anscestor->d->localTransforms() * result;
- anscestor = qobject_cast<QDeclarativeItem3D *>(anscestor->parent());
+ anscestor = qobject_cast<QQuickItem3D *>(anscestor->parent());
}
return result;
}
@@ -1521,13 +1521,13 @@ QMatrix4x4 QDeclarativeItem3DPrivate::localToWorldMatrix() const
Calculates and returns a matrix that transforms world coordinates into
coordinates relative to this Item3D.
*/
-QMatrix4x4 QDeclarativeItem3DPrivate::worldToLocalMatrix() const
+QMatrix4x4 QQuickItem3DPrivate::worldToLocalMatrix() const
{
bool inversionSuccessful;
QMatrix4x4 result = localToWorldMatrix().inverted(&inversionSuccessful);
if (inversionSuccessful)
return result;
- qWarning() << "QDeclarativeItem3D - matrix inversion failed trying to generate worldToLocal Matrix";
+ qWarning() << "QQuickItem3D - matrix inversion failed trying to generate worldToLocal Matrix";
return QMatrix4x4();
}
@@ -1535,7 +1535,7 @@ QMatrix4x4 QDeclarativeItem3DPrivate::worldToLocalMatrix() const
Returns the position of a local \a point in world space (i.e. not
transformed by this item, it's parents, the camera etc).
*/
-QVector3D QDeclarativeItem3D::localToWorld(const QVector3D &point) const
+QVector3D QQuickItem3D::localToWorld(const QVector3D &point) const
{
return d->localToWorldMatrix() * point;
}
@@ -1543,7 +1543,7 @@ QVector3D QDeclarativeItem3D::localToWorld(const QVector3D &point) const
/*!
Returns the position of a point in world space in local coordinates.
*/
-QVector3D QDeclarativeItem3D::worldToLocal(const QVector3D &point) const
+QVector3D QQuickItem3D::worldToLocal(const QVector3D &point) const
{
return d->worldToLocalMatrix() * point;
}
@@ -1555,7 +1555,7 @@ QVector3D QDeclarativeItem3D::worldToLocal(const QVector3D &point) const
Returns the boolean value of the regular QObject::event() function.oo
*/
-bool QDeclarativeItem3D::event(QEvent *e)
+bool QQuickItem3D::event(QEvent *e)
{
// Convert the raw event into a signal representing the user's action.
if (e->type() == QEvent::MouseButtonPress) {
@@ -1579,13 +1579,13 @@ bool QDeclarativeItem3D::event(QEvent *e)
return QObject::event(e);
}
-void QDeclarativeItem3D::handleEffectChanged()
+void QQuickItem3D::handleEffectChanged()
{
d->requireBlockingEffectsCheck = true;
update();
}
-void QDeclarativeItem3D::handleOpenglContextIsAboutToBeDestroyed()
+void QQuickItem3D::handleOpenglContextIsAboutToBeDestroyed()
{
if (d->mesh) {
d->mesh->openglContextIsAboutToBeDestroyed();
@@ -1603,12 +1603,12 @@ void QDeclarativeItem3D::handleOpenglContextIsAboutToBeDestroyed()
\sa mesh
*/
-QString QDeclarativeItem3D::meshNode() const
+QString QQuickItem3D::meshNode() const
{
return d->meshNode;
}
-void QDeclarativeItem3D::setMeshNode(const QString &node)
+void QQuickItem3D::setMeshNode(const QString &node)
{
//the actual instantiation of the node as the mesh itself is undertaken in the initialize function.
d->meshNode = node;
@@ -1618,7 +1618,7 @@ void QDeclarativeItem3D::setMeshNode(const QString &node)
\internal
Update the \l Viewport with which this item is associated.
*/
-void QDeclarativeItem3D::update()
+void QQuickItem3D::update()
{
if (d->requireBlockingEffectsCheck && d->effect && d->mesh && d->componentComplete)
{
@@ -1670,13 +1670,13 @@ void QDeclarativeItem3D::update()
Update the animations property.
//TODO
*/
-void QDeclarativeItem3D::updateAnimations()
+void QQuickItem3D::updateAnimations()
{
d->animations.clear();
if (d->mesh) {
const QList<QGLSceneAnimation *>& rSrcList = d->mesh->getAnimations();
for (int i=0; i<rSrcList.count(); ++i) {
- d->animations.append(new QDeclarativeAnimation3D(rSrcList.at(i),0));
+ d->animations.append(new QQuickAnimation3D(rSrcList.at(i),0));
}
}
emit animationsChanged();
@@ -1691,12 +1691,12 @@ void QDeclarativeItem3D::updateAnimations()
\sa mesh
*/
-bool QDeclarativeItem3D::isEnabled() const
+bool QQuickItem3D::isEnabled() const
{
return d->isEnabled;
}
-void QDeclarativeItem3D::setEnabled(bool value)
+void QQuickItem3D::setEnabled(bool value)
{
if (d->isEnabled != value) {
d->isEnabled = value;
@@ -1707,15 +1707,15 @@ void QDeclarativeItem3D::setEnabled(bool value)
/*!
//TODO
*/
-QQmlListProperty<QDeclarativeAnimation3D> QDeclarativeItem3D::animations()
+QQmlListProperty<QQuickAnimation3D> QQuickItem3D::animations()
{
- return QQmlListProperty<QDeclarativeAnimation3D>(this, 0, d->animations_append, d->animations_count, d->animations_at, d->animations_clear);
+ return QQmlListProperty<QQuickAnimation3D>(this, 0, d->animations_append, d->animations_count, d->animations_at, d->animations_clear);
}
/*!
Returns the unique pick ID for this item.
*/
-int QDeclarativeItem3D::objectPickId() const
+int QQuickItem3D::objectPickId() const
{
return d->objectPickId;
}
diff --git a/src/quick3d/qdeclarativeitem3d.h b/src/quick3d/qquickitem3d.h
index 68dfad4bf..a2888ce62 100644
--- a/src/quick3d/qdeclarativeitem3d.h
+++ b/src/quick3d/qquickitem3d.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEITEM3D_H
-#define QDECLARATIVEITEM3D_H
+#ifndef QQUICKITEM3D_H
+#define QQUICKITEM3D_H
#include "qt3dquickglobal.h"
@@ -50,7 +50,7 @@
#include <QtQuick/qquickitem.h>
-#include "qdeclarativeanimation3d.h"
+#include "qquickanimation3d.h"
#include "qglscenenode.h"
#include "qglpainter.h"
#include "qgraphicstransform3d.h"
@@ -59,12 +59,12 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QDeclarativeItem3DPrivate;
-class QDeclarativeMesh;
-class QDeclarativeEffect;
-class QDeclarativeViewport;
+class QQuickItem3DPrivate;
+class QQuickMesh;
+class QQuickEffect;
+class QQuickViewport;
-class Q_QT3D_QUICK_EXPORT QDeclarativeItem3D : public QQuickItem
+class Q_QT3D_QUICK_EXPORT QQuickItem3D : public QQuickItem
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
@@ -76,10 +76,10 @@ class Q_QT3D_QUICK_EXPORT QDeclarativeItem3D : public QQuickItem
Q_PROPERTY(qreal y READ y WRITE setY NOTIFY positionChanged)
Q_PROPERTY(qreal z READ z WRITE setZ NOTIFY positionChanged)
Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
- Q_PROPERTY(QQmlListProperty<QGraphicsTransform3D> transform READ transform DESIGNABLE false FINAL)
- Q_PROPERTY(QQmlListProperty<QGraphicsTransform3D> pretransform READ pretransform DESIGNABLE false FINAL)
- Q_PROPERTY(QDeclarativeMesh *mesh READ mesh WRITE setMesh NOTIFY meshChanged)
- Q_PROPERTY(QDeclarativeEffect *effect READ effect WRITE setEffect NOTIFY effectChanged)
+ Q_PROPERTY(QQmlListProperty<QQuickQGraphicsTransform3D> transform READ transform DESIGNABLE false FINAL)
+ Q_PROPERTY(QQmlListProperty<QQuickQGraphicsTransform3D> pretransform READ pretransform DESIGNABLE false FINAL)
+ Q_PROPERTY(QQuickMesh *mesh READ mesh WRITE setMesh NOTIFY meshChanged)
+ Q_PROPERTY(QQuickEffect *effect READ effect WRITE setEffect NOTIFY effectChanged)
Q_PROPERTY(QGLLightParameters *light READ light WRITE setLight NOTIFY lightChanged)
Q_PROPERTY(QQmlListProperty<QObject> resources READ resources DESIGNABLE false)
Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false)
@@ -88,11 +88,11 @@ class Q_QT3D_QUICK_EXPORT QDeclarativeItem3D : public QQuickItem
Q_PROPERTY(QString meshNode READ meshNode WRITE setMeshNode NOTIFY meshNodeChanged)
Q_PROPERTY(bool inheritEvents READ inheritEvents WRITE setInheritEvents NOTIFY inheritEventsChanged)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(QQmlListProperty<QDeclarativeAnimation3D> animations READ animations NOTIFY animationsChanged DESIGNABLE false)
+ Q_PROPERTY(QQmlListProperty<QQuickAnimation3D> animations READ animations NOTIFY animationsChanged DESIGNABLE false)
Q_CLASSINFO("DefaultProperty", "data")
public:
- QDeclarativeItem3D(QObject *parent = 0);
- ~QDeclarativeItem3D();
+ QQuickItem3D(QObject *parent = 0);
+ ~QQuickItem3D();
enum CullFace
{
@@ -123,14 +123,14 @@ public:
qreal scale() const;
void setScale(qreal value);
- QDeclarativeMesh *mesh() const;
- void setMesh(QDeclarativeMesh* value);
+ QQuickMesh *mesh() const;
+ void setMesh(QQuickMesh* value);
bool inheritEvents() const;
void setInheritEvents(bool inherit);
- QDeclarativeEffect *effect() const;
- void setEffect(QDeclarativeEffect *value);
+ QQuickEffect *effect() const;
+ void setEffect(QQuickEffect *value);
QGLLightParameters *light() const;
void setLight(QGLLightParameters *value);
@@ -138,8 +138,8 @@ public:
QQmlListProperty<QObject> data();
QQmlListProperty<QObject> resources();
- QQmlListProperty<QGraphicsTransform3D> transform();
- QQmlListProperty<QGraphicsTransform3D> pretransform();
+ QQmlListProperty<QQuickQGraphicsTransform3D> transform();
+ QQmlListProperty<QQuickQGraphicsTransform3D> pretransform();
CullFaces cullFaces() const;
void setCullFaces(CullFaces value);
@@ -153,7 +153,7 @@ public:
bool isEnabled() const;
void setEnabled(bool value);
- QQmlListProperty<QDeclarativeAnimation3D> animations();
+ QQmlListProperty<QQuickAnimation3D> animations();
virtual void draw(QGLPainter *painter);
virtual void initialize(QGLPainter *painter);
@@ -212,19 +212,19 @@ Q_SIGNALS:
void animationsChanged();
private:
- QDeclarativeItem3DPrivate *d;
+ QQuickItem3DPrivate *d;
- friend class QDeclarativeItem3DPrivate;
- friend class QDeclarativeViewport;
+ friend class QQuickItem3DPrivate;
+ friend class QQuickViewport;
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeItem3D::CullFaces)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickItem3D::CullFaces)
-Q_QT3D_QUICK_EXPORT void qDumpItem(QDeclarativeItem3D *item, bool detailed = true, int indent = 0);
+Q_QT3D_QUICK_EXPORT void qDumpItem(QQuickItem3D *item, bool detailed = true, int indent = 0);
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeItem3D)
+QML_DECLARE_TYPE(QQuickItem3D)
QT_END_HEADER
diff --git a/src/quick3d/qdeclarativemesh.cpp b/src/quick3d/qquickmesh.cpp
index 27f381822..eaba7c09d 100644
--- a/src/quick3d/qdeclarativemesh.cpp
+++ b/src/quick3d/qquickmesh.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qdeclarativemesh.h"
+#include "qquickmesh.h"
#include "qglabstractscene.h"
#include "qglscenenode.h"
@@ -52,7 +52,7 @@
#include <QtCore/qlist.h>
/*!
- \qmlclass Mesh QDeclarativeMesh
+ \qmlclass Mesh QQuickMesh
\brief The Mesh item provides a means of abstracting 3D mesh and geometry representations in
a way that can be used in QML. The Mesh class contains necessary properties and methods for
display and manipulation of 3d objects of this type.
@@ -97,10 +97,10 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeMeshPrivate
+class QQuickMeshPrivate
{
public:
- QDeclarativeMeshPrivate()
+ QQuickMeshPrivate()
: dataReply(0)
, scene(0)
, nextSceneBranchId(0)
@@ -110,7 +110,7 @@ public:
, loaded(false)
, dumpInfo(false)
{}
- ~QDeclarativeMeshPrivate()
+ ~QQuickMeshPrivate()
{
delete scene;
}
@@ -122,7 +122,7 @@ public:
QUrl data;
QString meshName;
- QDeclarativeMesh *parentMesh;
+ QQuickMesh *parentMesh;
QNetworkReply *dataReply;
QGLAbstractScene *scene;
int nextSceneBranchId;
@@ -161,7 +161,7 @@ inline void gatherTexturesRecursive(QGLSceneNode* pNode, QList<QGLTexture2D*>& f
}
}
-void QDeclarativeMeshPrivate::cleanupResources()
+void QQuickMeshPrivate::cleanupResources()
{
QList<QGLTexture2D*> textures;
gatherTexturesRecursive(scene->mainNode(),textures);
@@ -174,16 +174,16 @@ void QDeclarativeMeshPrivate::cleanupResources()
\internal
Construct a \l Mesh object with \a parent as its parent.
*/
-QDeclarativeMesh::QDeclarativeMesh(QObject *parent)
+QQuickMesh::QQuickMesh(QObject *parent)
: QObject(parent)
- ,d(new QDeclarativeMeshPrivate())
+ ,d(new QQuickMeshPrivate())
{}
/*!
\internal
Destroy the \l Mesh object and free any unneeded memory.
*/
-QDeclarativeMesh::~QDeclarativeMesh()
+QQuickMesh::~QQuickMesh()
{
delete d;
}
@@ -204,12 +204,12 @@ QDeclarativeMesh::~QDeclarativeMesh()
requirements within the different file types.
*/
-QUrl QDeclarativeMesh::source() const
+QUrl QQuickMesh::source() const
{
return d->data;
}
-void QDeclarativeMesh::setSource(const QUrl& value)
+void QQuickMesh::setSource(const QUrl& value)
{
if (d->data == value)
return;
@@ -246,12 +246,12 @@ void QDeclarativeMesh::setSource(const QUrl& value)
Users can associate a name with a mesh to facilitate easy finding or
description of a mesh.
*/
-QString QDeclarativeMesh::meshName() const
+QString QQuickMesh::meshName() const
{
return d->meshName;
}
-void QDeclarativeMesh::setMeshName(const QString& value)
+void QQuickMesh::setMeshName(const QString& value)
{
bool emitDataChanged = false;
if (d->meshName != value)
@@ -290,12 +290,12 @@ void QDeclarativeMesh::setMeshName(const QString& value)
Specifies the current options for loading this mesh. The default value
is the null string, meaning no options are applied.
*/
-QString QDeclarativeMesh::options() const
+QString QQuickMesh::options() const
{
return d->options;
}
-void QDeclarativeMesh::setOptions(const QString &options)
+void QQuickMesh::setOptions(const QString &options)
{
if (options != d->options)
{
@@ -309,7 +309,7 @@ void QDeclarativeMesh::setOptions(const QString &options)
Once the request for data has been finished the \l Mesh class is now free to load
the scene.
*/
-void QDeclarativeMesh::dataRequestFinished()
+void QQuickMesh::dataRequestFinished()
{
setScene(QGLAbstractScene::loadScene(d->dataReply, d->data, d->options));
d->dataReply->deleteLater();
@@ -332,7 +332,7 @@ void QDeclarativeMesh::dataRequestFinished()
\sa QGLAbstractScene
*/
-void QDeclarativeMesh::initSceneObjectList()
+void QQuickMesh::initSceneObjectList()
{
d->sceneObjects.clear();
if (d->scene) {
@@ -353,9 +353,9 @@ void QDeclarativeMesh::initSceneObjectList()
\internal
//TODO
*/
-void QDeclarativeMesh::initAnimations()
+void QQuickMesh::initAnimations()
{
- //qDebug("QDeclarativeMesh::initAnimations()");
+ //qDebug("QQuickMesh::initAnimations()");
d->originalAnimations.clear();
if (d->scene) {
const QList<QGLSceneAnimation *>& rSrcList = d->scene->animations();
@@ -368,7 +368,7 @@ void QDeclarativeMesh::initAnimations()
Get the main scene node for the \l QGLAbstractScene associated with this mesh.
*/
-QGLSceneNode *QDeclarativeMesh::getSceneObject()
+QGLSceneNode *QQuickMesh::getSceneObject()
{
//This variant of the function gets the main scene object for the scene
if (!d->mainSceneObject)
@@ -382,7 +382,7 @@ QGLSceneNode *QDeclarativeMesh::getSceneObject()
Get the scene object called \a name, specified as a QString, and retrieve the
scene object in this mesh which corresponds to it.
*/
-QGLSceneNode *QDeclarativeMesh::getSceneObject(const QString &name)
+QGLSceneNode *QQuickMesh::getSceneObject(const QString &name)
{
//This variant of the function gets the mesh scene object for a scene
//based on the name of the object.
@@ -403,7 +403,7 @@ QGLSceneNode *QDeclarativeMesh::getSceneObject(const QString &name)
\internal
//TODO
*/
-QList<QGLSceneAnimation *> QDeclarativeMesh::getAnimations()
+QList<QGLSceneAnimation *> QQuickMesh::getAnimations()
{
return d->originalAnimations;
}
@@ -413,7 +413,7 @@ QList<QGLSceneAnimation *> QDeclarativeMesh::getAnimations()
Used mainly for diagnostic purposes this function returns a QStringList containing
all of the object names for the given mesh.
*/
-QStringList QDeclarativeMesh::getSceneObjectNames()
+QStringList QQuickMesh::getSceneObjectNames()
{
//Get a string list of all mesh object names in the scene.
if (d->sceneObjects.empty())
@@ -439,12 +439,12 @@ QStringList QDeclarativeMesh::getSceneObjectNames()
names of all the subnodes of the mesh, materials and geometry parameters, will be
dumped to the console during the loading of the model.
*/
-bool QDeclarativeMesh::dumpInfo() const
+bool QQuickMesh::dumpInfo() const
{
return d->dumpInfo;
}
-void QDeclarativeMesh::setDumpInfo(bool enable)
+void QQuickMesh::setDumpInfo(bool enable)
{
if (enable != d->dumpInfo)
{
@@ -468,7 +468,7 @@ void QDeclarativeMesh::setDumpInfo(bool enable)
\sa QGLAbstractScene
*/
-void QDeclarativeMesh::setScene(QGLAbstractScene *scene)
+void QQuickMesh::setScene(QGLAbstractScene *scene)
{
delete d->scene;
resetSceneBranches();
@@ -519,7 +519,7 @@ void QDeclarativeMesh::setScene(QGLAbstractScene *scene)
manipulated sub-branch of the whole, the branches taken are identified numerically. This
function returns the next scene branch ID number
*/
-int QDeclarativeMesh::nextSceneBranchId() const
+int QQuickMesh::nextSceneBranchId() const
{
//Retrieve the next unused scene branch ID
return d->nextSceneBranchId;
@@ -537,7 +537,7 @@ int QDeclarativeMesh::nextSceneBranchId() const
destruction rules apply, however this \a parent parameter gives the user extra flexibility if
required.
*/
-int QDeclarativeMesh::createSceneBranch(QString nodeName)
+int QQuickMesh::createSceneBranch(QString nodeName)
{
if (!d->scene) {
qWarning() << "Unable to split mesh: no scene initialised - attempt to add scene object failed.";
@@ -577,11 +577,11 @@ int QDeclarativeMesh::createSceneBranch(QString nodeName)
The \a previousParent of \a rootSceneObject is also stored so that the object can be restored to its
previous parent if necessary.
*/
-int QDeclarativeMesh::addSceneBranch(QGLSceneNode *rootSceneObject, QObject *previousParent)
+int QQuickMesh::addSceneBranch(QGLSceneNode *rootSceneObject, QObject *previousParent)
{
//when adding a new object to a mesh we also store the previous parent information
//in case we wish to 'reattach' it to the parent at a later stage.
- QDeclarativeMeshPrivate::branchObject newBranch;
+ QQuickMeshPrivate::branchObject newBranch;
newBranch.previousParent=previousParent;
newBranch.rootSceneObject = rootSceneObject;
@@ -600,7 +600,7 @@ int QDeclarativeMesh::addSceneBranch(QGLSceneNode *rootSceneObject, QObject *pre
If the item selected is already the default item, and no parent can be found, it is deleted.
*/
-void QDeclarativeMesh::restoreSceneBranch(int branchId)
+void QQuickMesh::restoreSceneBranch(int branchId)
{
if (d->sceneBranches.contains(branchId)) {
@@ -608,7 +608,7 @@ void QDeclarativeMesh::restoreSceneBranch(int branchId)
return;
}
- QDeclarativeMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
+ QQuickMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
if (!targetBranch.previousParent && branchId!=0) {
targetBranch.rootSceneObject->setParent(getSceneObject());
@@ -629,10 +629,10 @@ void QDeclarativeMesh::restoreSceneBranch(int branchId)
\internal
Return a pointer to the scene branch identified by \a branchId.
*/
-QGLSceneNode *QDeclarativeMesh::getSceneBranch(int branchId) const
+QGLSceneNode *QQuickMesh::getSceneBranch(int branchId) const
{
if (!d->sceneBranches.contains(branchId)) return NULL;
- QDeclarativeMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
+ QQuickMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
return targetBranch.rootSceneObject;
}
@@ -643,7 +643,7 @@ QGLSceneNode *QDeclarativeMesh::getSceneBranch(int branchId) const
restore them to their original position in the object hierarchy of the scene. It then clears the
map ready for reuse.
*/
-void QDeclarativeMesh::resetSceneBranches()
+void QQuickMesh::resetSceneBranches()
{
//Delete all "hanging" object entries in the scene branches list and return them
//to their rightful place in their parent scene if possible.
@@ -659,12 +659,12 @@ void QDeclarativeMesh::resetSceneBranches()
\internal
Core "draw" function for the mesh draws scene branch \a branchId using \a painter.
*/
-void QDeclarativeMesh::draw(QGLPainter *painter, int branchId)
+void QQuickMesh::draw(QGLPainter *painter, int branchId)
{
if (!d->sceneBranches.contains(branchId)) {
qWarning() << "No scene object with ID: " << branchId << "for" << this;
} else {
- QDeclarativeMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
+ QQuickMeshPrivate::branchObject targetBranch = d->sceneBranches.value(branchId);
targetBranch.rootSceneObject->draw(painter);
}
}
@@ -673,7 +673,7 @@ void QDeclarativeMesh::draw(QGLPainter *painter, int branchId)
\internal
Reference counting increment.
*/
-void QDeclarativeMesh::ref()
+void QQuickMesh::ref()
{
++(d->refCount);
}
@@ -683,7 +683,7 @@ void QDeclarativeMesh::ref()
Reference counting decrement; returns true if there are still outstanding references
to the class.
*/
-bool QDeclarativeMesh::deref()
+bool QQuickMesh::deref()
{
--(d->refCount);
return d->refCount > 0;
@@ -697,7 +697,7 @@ bool QDeclarativeMesh::deref()
Returns a pointer to the QGLMaterial material object \a materialName; or NULL if
either there is no current scene, or if the scene does not contain such a material.
*/
-QObject *QDeclarativeMesh::material(const QString& nodeName, const QString& materialName)
+QObject *QQuickMesh::material(const QString& nodeName, const QString& materialName)
{
if (!d->scene)
return 0;
@@ -730,7 +730,7 @@ QObject *QDeclarativeMesh::material(const QString& nodeName, const QString& mate
/*!
\internal
*/
-void QDeclarativeMesh::classBegin()
+void QQuickMesh::classBegin()
{
}
@@ -741,7 +741,7 @@ void QDeclarativeMesh::classBegin()
\sa loaded()
*/
-void QDeclarativeMesh::componentComplete()
+void QQuickMesh::componentComplete()
{
d->completed = true;
if (d->loaded)
@@ -755,7 +755,7 @@ void QDeclarativeMesh::componentComplete()
\internal
//TODO
*/
-void QDeclarativeMesh::openglContextIsAboutToBeDestroyed()
+void QQuickMesh::openglContextIsAboutToBeDestroyed()
{
d->cleanupResources();
}
diff --git a/src/quick3d/qdeclarativemesh.h b/src/quick3d/qquickmesh.h
index 264408180..f36cd6492 100644
--- a/src/quick3d/qdeclarativemesh.h
+++ b/src/quick3d/qquickmesh.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEMESH_H
-#define QDECLARATIVEMESH_H
+#ifndef QQUICKMESH_H
+#define QQUICKMESH_H
#include "qt3dquickglobal.h"
@@ -59,12 +59,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtQuick3D)
-class QDeclarativeMeshPrivate;
+class QQuickMeshPrivate;
class QGLAbstractScene;
class QGLMaterial;
class QGLSceneAnimation;
-class Q_QT3D_QUICK_EXPORT QDeclarativeMesh : public QObject, public QQmlParserStatus
+class Q_QT3D_QUICK_EXPORT QQuickMesh : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
@@ -75,8 +75,8 @@ class Q_QT3D_QUICK_EXPORT QDeclarativeMesh : public QObject, public QQmlParserSt
Q_PROPERTY(bool dumpInfo READ dumpInfo WRITE setDumpInfo NOTIFY dumpInfoChanged)
public:
- QDeclarativeMesh(QObject *parent = 0);
- ~QDeclarativeMesh();
+ QQuickMesh(QObject *parent = 0);
+ ~QQuickMesh();
QUrl source() const;
void setSource(const QUrl& value);
@@ -132,13 +132,13 @@ private Q_SLOTS:
void dataRequestFinished();
private:
- QDeclarativeMeshPrivate *d;
+ QQuickMeshPrivate *d;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeMesh)
+QML_DECLARE_TYPE(QQuickMesh)
QT_END_HEADER
diff --git a/src/quick3d/qdeclarativeviewport.h b/src/quick3d/qquickviewport.h
index 3f884c5e3..5c80823a2 100644
--- a/src/quick3d/qdeclarativeviewport.h
+++ b/src/quick3d/qquickviewport.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEVIEWPORT_H
-#define QDECLARATIVEVIEWPORT_H
+#ifndef QQUICKVIEWPORT_H
+#define QQUICKVIEWPORT_H
#include "qt3dquickglobal.h"
#include <QtCore/qobject.h>
@@ -51,18 +51,18 @@ QT_BEGIN_NAMESPACE
QT_MODULE(QtQuick3D)
-class QDeclarativeItem3D;
+class QQuickItem3D;
// Abstract interface for "Item3D" getting access to the "Viewport"
// item in the QML/3D plugin.
-class Q_QT3D_QUICK_EXPORT QDeclarativeViewport
+class Q_QT3D_QUICK_EXPORT QQuickViewport
{
public:
virtual int registerPickableObject(QObject *obj) = 0;
virtual void update3d() = 0;
virtual bool blending() const = 0;
- void setItemViewport(QDeclarativeItem3D *item);
+ void setItemViewport(QQuickItem3D *item);
};
QT_END_NAMESPACE
diff --git a/src/quick3d/quick3d.pri b/src/quick3d/quick3d.pri
index 0f40a8d4b..f62c137f0 100644
--- a/src/quick3d/quick3d.pri
+++ b/src/quick3d/quick3d.pri
@@ -3,11 +3,11 @@ VPATH += $$PWD
HEADERS += \
qt3dquickglobal.h \
- qdeclarativeitem3d.h \
- qdeclarativeeffect.h \
- qdeclarativemesh.h \
- qdeclarativeviewport.h \
- qdeclarativeanimation3d.h \
+ qquickitem3d.h \
+ qquickeffect.h \
+ qquickmesh.h \
+ qquickviewport.h \
+ qquickanimation3d.h \
line.h \
capsulemesh.h \
point.h \
@@ -16,10 +16,10 @@ HEADERS += \
SOURCES += \
- qdeclarativeeffect.cpp \
- qdeclarativeitem3d.cpp \
- qdeclarativemesh.cpp \
- qdeclarativeanimation3d.cpp \
+ qquickeffect.cpp \
+ qquickitem3d.cpp \
+ qquickmesh.cpp \
+ qquickanimation3d.cpp \
line.cpp \
capsulemesh.cpp \
point.cpp \
diff --git a/src/quick3d/sphere.cpp b/src/quick3d/sphere.cpp
index 3efd08296..6bbacb21a 100644
--- a/src/quick3d/sphere.cpp
+++ b/src/quick3d/sphere.cpp
@@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE
\internal
*/
Sphere::Sphere(QObject *parent)
- : QDeclarativeItem3D(parent)
+ : QQuickItem3D(parent)
, m_radius(1.0f)
, m_lod(-1)
, m_axis(Qt::ZAxis)
diff --git a/src/quick3d/spheremesh.cpp b/src/quick3d/spheremesh.cpp
index 3e52d2d22..2487c8d83 100644
--- a/src/quick3d/spheremesh.cpp
+++ b/src/quick3d/spheremesh.cpp
@@ -208,7 +208,7 @@ private:
\internal
*/
SphereMesh::SphereMesh(QObject *parent)
- : QDeclarativeMesh(parent)
+ : QQuickMesh(parent)
, d(new SphereMeshPrivate)
{
}
@@ -321,7 +321,7 @@ void SphereMesh::draw(QGLPainter *painter, int branchId)
{
if (!d->currentSphere)
createGeometry();
- QDeclarativeMesh::draw(painter, branchId);
+ QQuickMesh::draw(painter, branchId);
}
/*!
diff --git a/src/quick3d/spheremesh.h b/src/quick3d/spheremesh.h
index c8d6871c1..86c7c8ecf 100644
--- a/src/quick3d/spheremesh.h
+++ b/src/quick3d/spheremesh.h
@@ -43,7 +43,7 @@
#define SPHEREMESH_H
#include "qglscenenode.h"
-#include "qdeclarativemesh.h"
+#include "qquickmesh.h"
//#include "spheremesh_p.h"
#include <QtCore/qmap.h>
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
class SphereMeshPrivate;
-class Q_QT3D_QUICK_EXPORT SphereMesh : public QDeclarativeMesh
+class Q_QT3D_QUICK_EXPORT SphereMesh : public QQuickMesh
{
Q_OBJECT
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
diff --git a/src/quick3d/teapot.h b/src/quick3d/teapot.h
index dd7f9b1a5..9ce0e027a 100644
--- a/src/quick3d/teapot.h
+++ b/src/quick3d/teapot.h
@@ -44,17 +44,17 @@
// This is a dummy header for defining the interface of "Teapot.qml" to qdoc.
-#include "qdeclarativeitem3d.h"
+#include "qquickitem3d.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Teapot : public QDeclarativeItem3D
+class Teapot : public QQuickItem3D
{
Q_OBJECT
public:
- Teapot(QObject *parent = 0) : QDeclarativeItem3D(parent) {}
+ Teapot(QObject *parent = 0) : QQuickItem3D(parent) {}
~Teapot() {}
};
diff --git a/src/threed/graphicsview/qgraphicsbillboardtransform.cpp b/src/threed/graphicsview/qgraphicsbillboardtransform.cpp
index 272bbecdd..9a7d6628c 100644
--- a/src/threed/graphicsview/qgraphicsbillboardtransform.cpp
+++ b/src/threed/graphicsview/qgraphicsbillboardtransform.cpp
@@ -148,7 +148,7 @@ public:
Construct a billboard transform and attach it to \a parent.
*/
QGraphicsBillboardTransform::QGraphicsBillboardTransform(QObject *parent)
- : QGraphicsTransform3D(parent), d_ptr(new QGraphicsBillboardTransformPrivate)
+ : QQuickQGraphicsTransform3D(parent), d_ptr(new QGraphicsBillboardTransformPrivate)
{
}
@@ -241,7 +241,7 @@ void QGraphicsBillboardTransform::applyTo(QMatrix4x4 *matrix) const
/*!
\internal
*/
-QGraphicsTransform3D *QGraphicsBillboardTransform::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *QGraphicsBillboardTransform::clone(QObject *parent) const
{
Q_D(const QGraphicsBillboardTransform);
QGraphicsBillboardTransform *copy = new QGraphicsBillboardTransform(parent);
diff --git a/src/threed/graphicsview/qgraphicsbillboardtransform.h b/src/threed/graphicsview/qgraphicsbillboardtransform.h
index 44f7a3d81..d3f3d0189 100644
--- a/src/threed/graphicsview/qgraphicsbillboardtransform.h
+++ b/src/threed/graphicsview/qgraphicsbillboardtransform.h
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
class QGraphicsBillboardTransformPrivate;
-class Q_QT3D_EXPORT QGraphicsBillboardTransform : public QGraphicsTransform3D
+class Q_QT3D_EXPORT QGraphicsBillboardTransform : public QQuickQGraphicsTransform3D
{
Q_OBJECT
Q_PROPERTY(bool preserveUpVector READ preserveUpVector WRITE setPreserveUpVector NOTIFY preserveUpVectorChanged)
@@ -63,7 +63,7 @@ public:
void setPreserveUpVector(bool value);
void applyTo(QMatrix4x4 *matrix) const;
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
Q_SIGNALS:
void preserveUpVectorChanged();
diff --git a/src/threed/graphicsview/qgraphicsrotation3d.cpp b/src/threed/graphicsview/qgraphicsrotation3d.cpp
index 547fa5071..9ee17ff7e 100644
--- a/src/threed/graphicsview/qgraphicsrotation3d.cpp
+++ b/src/threed/graphicsview/qgraphicsrotation3d.cpp
@@ -127,7 +127,7 @@ public:
Create a 3D rotation transformation and attach it to \a parent.
*/
QGraphicsRotation3D::QGraphicsRotation3D(QObject *parent)
- : QGraphicsTransform3D(parent)
+ : QQuickQGraphicsTransform3D(parent)
, d_ptr(new QGraphicsRotation3DPrivate)
{
}
@@ -243,7 +243,7 @@ void QGraphicsRotation3D::applyTo(QMatrix4x4 *matrix) const
/*!
\internal
*/
-QGraphicsTransform3D *QGraphicsRotation3D::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *QGraphicsRotation3D::clone(QObject *parent) const
{
Q_D(const QGraphicsRotation3D);
QGraphicsRotation3D *copy = new QGraphicsRotation3D(parent);
diff --git a/src/threed/graphicsview/qgraphicsrotation3d.h b/src/threed/graphicsview/qgraphicsrotation3d.h
index 0fad7ba94..e59f775c7 100644
--- a/src/threed/graphicsview/qgraphicsrotation3d.h
+++ b/src/threed/graphicsview/qgraphicsrotation3d.h
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class QGraphicsRotation3DPrivate;
-class Q_QT3D_EXPORT QGraphicsRotation3D : public QGraphicsTransform3D
+class Q_QT3D_EXPORT QGraphicsRotation3D : public QQuickQGraphicsTransform3D
{
Q_OBJECT
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
@@ -70,7 +70,7 @@ public:
void setAxis(const QVector3D &value);
void applyTo(QMatrix4x4 *matrix) const;
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
Q_SIGNALS:
void originChanged();
diff --git a/src/threed/graphicsview/qgraphicsscale3d.cpp b/src/threed/graphicsview/qgraphicsscale3d.cpp
index 1c0ae1c26..285ccc553 100644
--- a/src/threed/graphicsview/qgraphicsscale3d.cpp
+++ b/src/threed/graphicsview/qgraphicsscale3d.cpp
@@ -146,7 +146,7 @@ public:
Construct a 3D scale transform and attach it to \a parent.
*/
QGraphicsScale3D::QGraphicsScale3D(QObject *parent)
- : QGraphicsTransform3D(parent), d_ptr(new QGraphicsScale3DPrivate)
+ : QQuickQGraphicsTransform3D(parent), d_ptr(new QGraphicsScale3DPrivate)
{
}
@@ -315,7 +315,7 @@ void QGraphicsScale3D::applyTo(QMatrix4x4 *matrix) const
/*!
\internal
*/
-QGraphicsTransform3D *QGraphicsScale3D::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *QGraphicsScale3D::clone(QObject *parent) const
{
Q_D(const QGraphicsScale3D);
QGraphicsScale3D *copy = new QGraphicsScale3D(parent);
diff --git a/src/threed/graphicsview/qgraphicsscale3d.h b/src/threed/graphicsview/qgraphicsscale3d.h
index 78ce9db05..b1b97b4ef 100644
--- a/src/threed/graphicsview/qgraphicsscale3d.h
+++ b/src/threed/graphicsview/qgraphicsscale3d.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QGraphicsScale3DPrivate;
-class Q_QT3D_EXPORT QGraphicsScale3D : public QGraphicsTransform3D
+class Q_QT3D_EXPORT QGraphicsScale3D : public QQuickQGraphicsTransform3D
{
Q_OBJECT
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
@@ -68,7 +68,7 @@ public:
void setScale(const QVector3D &value);
void applyTo(QMatrix4x4 *matrix) const;
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
Q_SIGNALS:
void originChanged();
diff --git a/src/threed/graphicsview/qgraphicstransform3d.cpp b/src/threed/graphicsview/qgraphicstransform3d.cpp
index 4411ac9b6..1ec693d1f 100644
--- a/src/threed/graphicsview/qgraphicstransform3d.cpp
+++ b/src/threed/graphicsview/qgraphicstransform3d.cpp
@@ -44,29 +44,29 @@
QT_BEGIN_NAMESPACE
/*!
- \class QGraphicsTransform3D
- \brief The QGraphicsTransform3D class is an abstract base class for building 3D transformations.
+ \class QQuickQGraphicsTransform3D
+ \brief The QQuickQGraphicsTransform3D class is an abstract base class for building 3D transformations.
\since 4.8
\ingroup qt3d
\ingroup qt3d::graphicsview
- QGraphicsTransform3D lets you create and control advanced transformations
+ QQuickQGraphicsTransform3D lets you create and control advanced transformations
that can be configured independently using specialized properties.
Scene nodes have an associated list of transforms, which are applied
in order, one at a time, to the modelview matrix. Transformations are
computed in true 3D space using QMatrix4x4.
- QGraphicsTransform3D is particularly useful for animations. Whereas
+ QQuickQGraphicsTransform3D is particularly useful for animations. Whereas
QGLPainter::modelViewMatrix() lets you assign any transform directly,
there is no direct way to interpolate between two different
transformations (e.g., when transitioning between two states, each for
which the item has a different arbitrary transform assigned). Using
- QGraphicsTransform3D you can interpolate the property values of each
+ QQuickQGraphicsTransform3D you can interpolate the property values of each
independent transformation. The resulting operation is then combined into a
single transform which is applied to the modelview matrix during drawing.
If you want to create your own configurable transformation, you can create
- a subclass of QGraphicsTransform3D (or any or the existing subclasses), and
+ a subclass of QQuickQGraphicsTransform3D (or any or the existing subclasses), and
reimplement the pure virtual applyTo() function, which takes a pointer to a
QMatrix4x4. Each operation you would like to apply should be exposed as
properties (e.g., customTransform->setVerticalShear(2.5)). Inside you
@@ -78,32 +78,32 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QGraphicsTransform3D::QGraphicsTransform3D(QObject *parent)
+ \fn QQuickQGraphicsTransform3D::QQuickQGraphicsTransform3D(QObject *parent)
Constructs a 3D transformation and attaches it to \a parent.
*/
/*!
- \fn QGraphicsTransform3D::~QGraphicsTransform3D()
+ \fn QQuickQGraphicsTransform3D::~QQuickQGraphicsTransform3D()
Destroys this 3D transformation.
*/
/*!
- \fn void QGraphicsTransform3D::applyTo(QMatrix4x4 *matrix) const
+ \fn void QQuickQGraphicsTransform3D::applyTo(QMatrix4x4 *matrix) const
Applies the effect of this transformation to the specified
modelview \a matrix.
*/
/*!
- \fn QGraphicsTransform3D *QGraphicsTransform3D::clone(QObject *parent) const
+ \fn QQuickQGraphicsTransform3D *QQuickQGraphicsTransform3D::clone(QObject *parent) const
Clones a copy of this transformation and attaches the clone to \a parent.
*/
/*!
- \fn void QGraphicsTransform3D::transformChanged()
+ \fn void QQuickQGraphicsTransform3D::transformChanged()
Signal that is emitted whenever any of the transformation's
parameters are changed.
diff --git a/src/threed/graphicsview/qgraphicstransform3d.h b/src/threed/graphicsview/qgraphicstransform3d.h
index 10debcf1d..310e9e252 100644
--- a/src/threed/graphicsview/qgraphicstransform3d.h
+++ b/src/threed/graphicsview/qgraphicstransform3d.h
@@ -50,15 +50,15 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class Q_QT3D_EXPORT QGraphicsTransform3D : public QObject
+class Q_QT3D_EXPORT QQuickQGraphicsTransform3D : public QObject
{
Q_OBJECT
public:
- QGraphicsTransform3D(QObject *parent = 0) : QObject(parent) {}
- ~QGraphicsTransform3D() {}
+ QQuickQGraphicsTransform3D(QObject *parent = 0) : QObject(parent) {}
+ ~QQuickQGraphicsTransform3D() {}
virtual void applyTo(QMatrix4x4 *matrix) const = 0;
- virtual QGraphicsTransform3D *clone(QObject *parent = 0) const = 0;
+ virtual QQuickQGraphicsTransform3D *clone(QObject *parent = 0) const = 0;
Q_SIGNALS:
void transformChanged();
diff --git a/src/threed/graphicsview/qgraphicstranslation3d.cpp b/src/threed/graphicsview/qgraphicstranslation3d.cpp
index 980ce5583..baadb59d2 100644
--- a/src/threed/graphicsview/qgraphicstranslation3d.cpp
+++ b/src/threed/graphicsview/qgraphicstranslation3d.cpp
@@ -118,7 +118,7 @@ public:
Constructs a new translation and attaches it to \a parent.
*/
QGraphicsTranslation3D::QGraphicsTranslation3D(QObject *parent)
- : QGraphicsTransform3D(parent), d_ptr(new QGraphicsTranslation3DPrivate)
+ : QQuickQGraphicsTransform3D(parent), d_ptr(new QGraphicsTranslation3DPrivate)
{
}
@@ -209,7 +209,7 @@ void QGraphicsTranslation3D::applyTo(QMatrix4x4 *matrix) const
/*!
\internal
*/
-QGraphicsTransform3D *QGraphicsTranslation3D::clone(QObject *parent) const
+QQuickQGraphicsTransform3D *QGraphicsTranslation3D::clone(QObject *parent) const
{
Q_D(const QGraphicsTranslation3D);
QGraphicsTranslation3D *copy = new QGraphicsTranslation3D(parent);
diff --git a/src/threed/graphicsview/qgraphicstranslation3d.h b/src/threed/graphicsview/qgraphicstranslation3d.h
index 8c087fa39..323a892d3 100644
--- a/src/threed/graphicsview/qgraphicstranslation3d.h
+++ b/src/threed/graphicsview/qgraphicstranslation3d.h
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
class QGraphicsTranslation3DPrivate;
-class Q_QT3D_EXPORT QGraphicsTranslation3D : public QGraphicsTransform3D
+class Q_QT3D_EXPORT QGraphicsTranslation3D : public QQuickQGraphicsTransform3D
{
Q_OBJECT
Q_PROPERTY(QVector3D translate READ translate WRITE setTranslate NOTIFY translateChanged)
@@ -67,7 +67,7 @@ public:
void setProgress(qreal value);
void applyTo(QMatrix4x4 *matrix) const;
- QGraphicsTransform3D *clone(QObject *parent) const;
+ QQuickQGraphicsTransform3D *clone(QObject *parent) const;
Q_SIGNALS:
void translateChanged();
diff --git a/src/threed/scene/qglscenenode.cpp b/src/threed/scene/qglscenenode.cpp
index 25f5b57ba..ae114abed 100644
--- a/src/threed/scene/qglscenenode.cpp
+++ b/src/threed/scene/qglscenenode.cpp
@@ -563,7 +563,7 @@ void QGLSceneNode::setZ(qreal z)
\sa setTransforms(), addTransform(), position()
*/
-QList<QGraphicsTransform3D *> QGLSceneNode::transforms() const
+QList<QQuickQGraphicsTransform3D *> QGLSceneNode::transforms() const
{
Q_D(const QGLSceneNode);
return d->transforms;
@@ -586,16 +586,16 @@ QList<QGraphicsTransform3D *> QGLSceneNode::transforms() const
\sa transforms(), addTransform(), position()
*/
-void QGLSceneNode::setTransforms(const QList<QGraphicsTransform3D *> &transforms)
+void QGLSceneNode::setTransforms(const QList<QQuickQGraphicsTransform3D *> &transforms)
{
Q_D(QGLSceneNode);
for (int index = 0; index < d->transforms.size(); ++index) {
- QGraphicsTransform3D *transform = d->transforms.at(index);
+ QQuickQGraphicsTransform3D *transform = d->transforms.at(index);
disconnect(transform, SIGNAL(transformChanged()), this, SLOT(transformChanged()));
}
d->transforms.clear();
for (int index = 0; index < transforms.size(); ++index) {
- QGraphicsTransform3D *transform = transforms.at(index);
+ QQuickQGraphicsTransform3D *transform = transforms.at(index);
if (transform) {
connect(transform, SIGNAL(transformChanged()), this, SLOT(transformChanged()));
d->transforms.append(transform);
@@ -615,7 +615,7 @@ void QGLSceneNode::setTransforms(const QList<QGraphicsTransform3D *> &transforms
\sa transforms(), setTransforms()
*/
-void QGLSceneNode::addTransform(QGraphicsTransform3D *transform)
+void QGLSceneNode::addTransform(QQuickQGraphicsTransform3D *transform)
{
Q_D(QGLSceneNode);
if (!transform)
@@ -2024,7 +2024,7 @@ void qDumpScene(QGLSceneNode *node, bool detailed, int indent, const QSet<QGLSce
qDebug("%s %0.4f %0.4f %0.4f %0.4f",
qPrintable(ind), m(i, 0), m(i, 1), m(i, 2), m(i, 3));
}
- QList<QGraphicsTransform3D*> tx = node->transforms();
+ QList<QQuickQGraphicsTransform3D*> tx = node->transforms();
if (tx.size() > 0)
qDebug("%s transforms list:", qPrintable(ind));
for (int i = 0; i < tx.size(); ++i)
diff --git a/src/threed/scene/qglscenenode.h b/src/threed/scene/qglscenenode.h
index 37d3e079b..607736acf 100644
--- a/src/threed/scene/qglscenenode.h
+++ b/src/threed/scene/qglscenenode.h
@@ -56,7 +56,7 @@ QT_MODULE(Qt3D)
class QGLSceneNodePrivate;
class QGLAbstractEffect;
class QGLPickNode;
-class QGraphicsTransform3D;
+class QQuickQGraphicsTransform3D;
class Q_QT3D_EXPORT QGLSceneNode : public QObject
{
@@ -106,9 +106,9 @@ public:
qreal z() const;
void setZ(qreal z);
- QList<QGraphicsTransform3D *> transforms() const;
- void setTransforms(const QList<QGraphicsTransform3D *> &transforms);
- void addTransform(QGraphicsTransform3D *transform);
+ QList<QQuickQGraphicsTransform3D *> transforms() const;
+ void setTransforms(const QList<QQuickQGraphicsTransform3D *> &transforms);
+ void addTransform(QQuickQGraphicsTransform3D *transform);
QGL::DrawingMode drawingMode() const;
void setDrawingMode(QGL::DrawingMode mode);
diff --git a/src/threed/scene/qglscenenode_p.h b/src/threed/scene/qglscenenode_p.h
index 12a4cb784..2e2a16698 100644
--- a/src/threed/scene/qglscenenode_p.h
+++ b/src/threed/scene/qglscenenode_p.h
@@ -123,7 +123,7 @@ public:
QSharedPointer<QGLMaterialCollection> palette;
QMatrix4x4 localTransform;
QVector3D translate;
- QList<QGraphicsTransform3D *> transforms;
+ QList<QQuickQGraphicsTransform3D *> transforms;
QGL::StandardEffect localEffect;
QGLAbstractEffect *customEffect;
QList<QGLSceneNode*> childNodes;
diff --git a/sync.profile b/sync.profile
index ff52bf6cc..930b147e8 100644
--- a/sync.profile
+++ b/sync.profile
@@ -11,7 +11,7 @@
"core" => "#include <QtCore/QtCore>\n",
"gui" => "#include <QtGui/QtGui>\n",
"opengl" => "#include <QtOpenGL/QtOpenGL>\n",
- "declarative" => "#include <QtQml/QDeclarative>\n",
+ "declarative" => "#include <QtQml/QtQml>\n",
"quick" => "#include <QtQuick/QQuick>\n",
"network" => "#include <QtNetwork/QtNetwork>\n"
);
diff --git a/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp b/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
index a266a700e..fe26b13a8 100644
--- a/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
+++ b/tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
@@ -151,7 +151,7 @@ void tst_QGLSceneNode::modify()
QCOMPARE(updatedSpy.count(), 6);
QVERIFY(node.position() == QVector3D(-45.0f, 67.0f, -23.5f));
- QList<QGraphicsTransform3D *> transforms;
+ QList<QQuickQGraphicsTransform3D *> transforms;
transforms.append(new QGraphicsScale3D(this));
transforms.append(new QGraphicsRotation3D(this));
node.setTransforms(transforms);
@@ -405,8 +405,8 @@ void tst_QGLSceneNode::removeNode()
QCOMPARE(node5Spy.count(), 1);
}
-static bool sameTransforms(const QList<QGraphicsTransform3D *> &transforms1,
- const QList<QGraphicsTransform3D *> &transforms2)
+static bool sameTransforms(const QList<QQuickQGraphicsTransform3D *> &transforms1,
+ const QList<QQuickQGraphicsTransform3D *> &transforms2)
{
if (transforms1.size() != transforms2.size())
return false;
@@ -454,7 +454,7 @@ void tst_QGLSceneNode::clone()
m.scale(23.5f);
TestEffect userEffect;
QGLPickNode pick;
- QList<QGraphicsTransform3D *> transforms;
+ QList<QQuickQGraphicsTransform3D *> transforms;
transforms.append(new QGraphicsScale3D(this));
transforms.append(new QGraphicsRotation3D(this));
@@ -689,7 +689,7 @@ protected:
m.translate(position());
if (!localTransform().isIdentity())
m *= localTransform();
- QList<QGraphicsTransform3D *> tx = transforms();
+ QList<QQuickQGraphicsTransform3D *> tx = transforms();
for (int index = tx.size() - 1; index >= 0; --index)
tx.at(index)->applyTo(&m);