summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-05-14 16:46:49 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-05-14 15:02:16 +0000
commit22bd25e1640c1cd8753a57a9000a6aed2ae7fe22 (patch)
tree594115ee4a22bd707bd67bf1b2564460a04b9666 /examples
parent36315ec254a1e3f32c52cbd821f21220b90447f3 (diff)
simpleqml: Drop fire event and subpresentation tests
Make the example more like an example and drop features that are used for testing. The qml stuff also causes performance degradation on some systems (esp. on AMD on Windows) so it's not a good showcase. Change-Id: Ia113180669056fb935a9dfcbfab2a4595b2345c5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/3dstudioruntime2/simpleqml/main.qml32
-rw-r--r--examples/3dstudioruntime2/simpleqml/presentation/barrel.uip2
2 files changed, 0 insertions, 34 deletions
diff --git a/examples/3dstudioruntime2/simpleqml/main.qml b/examples/3dstudioruntime2/simpleqml/main.qml
index 4d47a47..0490a5a 100644
--- a/examples/3dstudioruntime2/simpleqml/main.qml
+++ b/examples/3dstudioruntime2/simpleqml/main.qml
@@ -98,33 +98,6 @@ Rectangle {
id: barrelRef
elementPath: "Barrel" // or Scene.Layer.Barrel but as long as it's unique the name's good enough
}
-
- // Let's try out a QML subpresentation defined in-line, i.e. no separate .qml file.
- SubPresentationSettings {
- qmlStreams: [
- QmlStream {
- presentationId: "embeddedQmlScene"
- Rectangle {
- color: "white"
- Rectangle {
- color: "red"
- width: parent.width * 0.8
- height: parent.height * 0.8
- anchors.centerIn: parent
- Text {
- anchors.centerIn: parent
- text: "Hello from\nembedded Qt Quick"
- color: "white"
- }
- NumberAnimation on rotation {
- from: 0; to: 360; duration: 10000
- loops: Animation.Infinite
- }
- }
- }
- }
- ]
- }
}
ignoredEvents: mouseEvCb.checked ? Studio3D.EnableAllEvents : (Studio3D.IgnoreMouseEvents | Studio3D.IgnoreWheelEvents)
onRunningChanged: console.log("running: " + s3d.running)
@@ -214,11 +187,6 @@ Rectangle {
focusPolicy: Qt.NoFocus
}
Button {
- text: "Fire event"
- onClicked: s3dpres.fireEvent("Scene.Layer.Camera", "customCameraEvent") // in actionevent.uip this will change the sphere's color
- focusPolicy: Qt.NoFocus
- }
- Button {
text: "Toggle camera"
onClicked: {
var v = s3dpres.getAttribute("Scene.Layer.Camera", "eyeball")
diff --git a/examples/3dstudioruntime2/simpleqml/presentation/barrel.uip b/examples/3dstudioruntime2/simpleqml/presentation/barrel.uip
index 66b40c2..dc4aca2 100644
--- a/examples/3dstudioruntime2/simpleqml/presentation/barrel.uip
+++ b/examples/3dstudioruntime2/simpleqml/presentation/barrel.uip
@@ -6,7 +6,6 @@
</ProjectSettings>
<Graph >
<Scene id="Scene" >
- <Layer id="splayer" />
<Layer id="Layer" >
<Camera id="Camera" />
<Light id="Light" />
@@ -28,7 +27,6 @@
<Add ref="#Camera" />
<Add ref="#Light" />
<State id="Scene-Slide1" name="Slide1" playmode="Looping" >
- <Add ref="#splayer" name="splayer" height="30" sourcepath="embeddedQmlScene" top="50" width="30" />
<Add ref="#Barrel" name="Barrel" position="0 -42 -483" rotation="90 0 0" scale="100 100 100" sourcepath=".\barrel\meshes\Barrel.mesh#1" >
<AnimationTrack property="opacity" type="EaseInOut" />
<AnimationTrack property="rotation.x" type="EaseInOut" >0 90 100 100 5 64 100 100 10 90 100 100</AnimationTrack>