summaryrefslogtreecommitdiffstats
path: root/tests/qmlcamera/qml/qmlcamera/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qmlcamera/qml/qmlcamera/main.qml')
-rw-r--r--tests/qmlcamera/qml/qmlcamera/main.qml31
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"
}
}
-
}