diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-05-12 10:06:27 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-05-12 10:07:15 +0300 |
commit | 6880277f23b47117f7788f08f855ed99b5120f9f (patch) | |
tree | de8b9e64ffce03a3ce77c8ffac396f7174e91956 /tests/qmlcamera | |
parent | 590d11726e0708e9f8fad0ec386cc5859dbe5cc8 (diff) |
CustomDataItem made into a public class
Task-number: QTRD-3055
Change-Id: I1e449df7c1bcb48fc639dbae579e2e1499c9ef2b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'tests/qmlcamera')
-rw-r--r-- | tests/qmlcamera/qml/qmlcamera/main.qml | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/tests/qmlcamera/qml/qmlcamera/main.qml b/tests/qmlcamera/qml/qmlcamera/main.qml index 56e7d035..0f708615 100644 --- a/tests/qmlcamera/qml/qmlcamera/main.qml +++ b/tests/qmlcamera/qml/qmlcamera/main.qml @@ -18,7 +18,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 -import QtDataVisualization 1.0 +import QtDataVisualization 1.1 import "." Rectangle { @@ -66,6 +66,16 @@ Rectangle { scene.activeCamera.yRotation: camControlArea.yValue scene.activeCamera.zoomLevel: zoomSlider.value inputHandler: null + + customItemList: [shuttleItem] + } + + Custom3DItem { + id: shuttleItem + meshFile: ":/items/shuttle.obj" + textureFile: ":/items/shuttle.png" + position: Qt.vector3d(5.0,35.0,3.0) + scaling: Qt.vector3d(0.2,0.2,0.2) } MouseArea { @@ -168,23 +178,10 @@ Rectangle { id: shuttleAdd anchors.bottom: dataToggle.top width: camControlArea.width - text: "Add Shuttle" - property bool addObject: true + text: "Remove Shuttle" onClicked: { - if (addObject === true) { - testChart.addCustomItem(":/items/shuttle.obj", - Qt.vector3d(5.0,35.0,3.0), - Qt.vector3d(0.2,0.2,0.2), - Qt.quaternion(0.0,0.0,0.0,0.0), - ":/items/shuttle.png") - text = "Remove Shuttle" - addObject = false - } else { - testChart.removeCustomItemAt(Qt.vector3d(5.0,35.0,3.0)) - text = "Add Shuttle" - addObject = true - } + testChart.removeCustomItemAt(Qt.vector3d(5.0,35.0,3.0)) + text = "Shuttle has been deleted" } } - } |