diff options
Diffstat (limited to 'examples/3dstudioruntime2/qmldatainput')
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/doc/images/qmldatainput.png | bin | 0 -> 163178 bytes | |||
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/doc/src/qmldatainput.qdoc | 55 | ||||
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/presentation/Paper05.png | bin | 0 -> 321820 bytes | |||
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/presentation/datainput.uip | 22 | ||||
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/qml/qmldatainput/main.qml | 4 | ||||
-rw-r--r-- | examples/3dstudioruntime2/qmldatainput/qmldatainput.qrc | 1 |
6 files changed, 73 insertions, 9 deletions
diff --git a/examples/3dstudioruntime2/qmldatainput/doc/images/qmldatainput.png b/examples/3dstudioruntime2/qmldatainput/doc/images/qmldatainput.png Binary files differnew file mode 100644 index 0000000..e0567ee --- /dev/null +++ b/examples/3dstudioruntime2/qmldatainput/doc/images/qmldatainput.png diff --git a/examples/3dstudioruntime2/qmldatainput/doc/src/qmldatainput.qdoc b/examples/3dstudioruntime2/qmldatainput/doc/src/qmldatainput.qdoc new file mode 100644 index 0000000..58e6ae5 --- /dev/null +++ b/examples/3dstudioruntime2/qmldatainput/doc/src/qmldatainput.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt 3D Studio. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example qmldatainput + \title Qt 3D Studio Runtime: QML DataInput Example + \ingroup qt3dstudioruntime2-examples-qml + \brief Demonstrates using DataInput elements in QML + + \image qmldatainput.png + + \e {This example demonstrates using DataInput elements with QML in Studio} + + \include examples-run.qdocinc + + \section1 Description + + The presentation consists of a static text element serving as a label and a rotating text + element for showing the input data as text. There is also a data input of type \e{Ranged Number} + in the presentation. This data input is used to control both the rotation animation time and + the text shown on the second text element. + The range is specified as [0 .. 360] in the presentation, where zero maps + to the beginning of the animation and 360 maps to the end of the animation. + + The \l {qmldatainput/qml/qmldatainput/main.qml}{qml main} loads the presentation and animates + a number property. The value of the animated property is bound to the + \l{DataInput::value}{value} property of the DataInput element, making the value show up in the + linked text element in the presentation. The same value is used to control the animation time: + + \snippet qmldatainput/qml/qmldatainput/main.qml 1 +*/ diff --git a/examples/3dstudioruntime2/qmldatainput/presentation/Paper05.png b/examples/3dstudioruntime2/qmldatainput/presentation/Paper05.png Binary files differnew file mode 100644 index 0000000..e70749d --- /dev/null +++ b/examples/3dstudioruntime2/qmldatainput/presentation/Paper05.png diff --git a/examples/3dstudioruntime2/qmldatainput/presentation/datainput.uip b/examples/3dstudioruntime2/qmldatainput/presentation/datainput.uip index 6b47e44..901e994 100644 --- a/examples/3dstudioruntime2/qmldatainput/presentation/datainput.uip +++ b/examples/3dstudioruntime2/qmldatainput/presentation/datainput.uip @@ -24,16 +24,21 @@ </Model> <Text id="Text3" /> <Text id="Text4" /> + <Model id="Rectangle" > + <Material id="Default_001" name="Default" > + <Image id="Default_001_diffusemap" /> + </Material> + </Model> </Layer> </Scene> </Graph> <Logic > <State name="Master Slide" component="#Scene" > - <Add ref="#Layer" multisampleaa="None" progressiveaa="4x" temporalaa="True" /> - <Add ref="#Camera" controlledproperty="$cameraRotInput rotation" pivot="0 0 0" rotation="0 0 0" /> - <Add ref="#Light" castshadow="True" controlledproperty="$colorInput lightdiffuse" lightdiffuse="1 0 0" position="-350.984 -229.258 -30" /> + <Add ref="#Layer" multisampleaa="SSAA" progressiveaa="8x" /> + <Add ref="#Camera" controlledproperty="$cameraRotInput rotation" pivot="0 0 0" position="0 0 -800" rotation="0 0 0" /> + <Add ref="#Light" castshadow="True" controlledproperty="$colorInput lightdiffuse" lightdiffuse="1 0 0" lighttype="Point" position="-300.444 70.829 -30" shdwfactor="11.89" shdwfilter="6.94" shdwmapres="11" /> <State id="Scene-Slide1" name="Slide1" initialplaystate="Pause" > - <Add ref="#Text" name="Text" font="TitilliumWeb-Regular" position="216.513 76.6172 -113.498" scale="1 1 1" size="24" textstring="0" > + <Add ref="#Text" name="Text" controlledproperty="$stringInput textstring" font="TitilliumWeb-Regular" position="216.513 76.6172 -113.498" scale="1 1 1" size="24" textstring="0" > <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 0 0 10 0 0 0</AnimationTrack> <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 0 0 10 -360 0 0</AnimationTrack> @@ -42,13 +47,16 @@ <Add ref="#Cone" name="Cone" controlledproperty="$scaleInput scale" position="-417.135 -225.166 0" sourcepath="#Cone" /> <Add ref="#Default" /> <Add ref="#Cylinder" name="Cylinder" controlledproperty="$variantInput opacity" position="131.347 -180.422 0" sourcepath="#Cylinder" /> - <Add ref="#Default_002" /> + <Add ref="#Default_002" diffuse="0.666667 1 0.498039" /> <Add ref="#Text6" name="Text6" font="TitilliumWeb-Regular" position="135.678 -300.019 -8.28656" size="16" textstring="Opacity control (Variant type)" /> <Add ref="#Text8" name="Text8" font="TitilliumWeb-Regular" position="-428.683 -290.118 0" size="16" textstring="Scale control" /> - <Add ref="#Cube2" name="Cube2" controlledproperty="$vec3Input rotation" position="409.919 -177.535 0" sourcepath="#Cube" /> + <Add ref="#Cube2" name="Cube2" controlledproperty="$cameraRotInput rotation" position="409.919 -177.535 0" sourcepath="#Cube" /> <Add ref="#Default_003" controlledproperty="$vec3Input2 diffuse" /> <Add ref="#Text3" name="Text3" font="TitilliumWeb-Regular" position="434.456 -304.552 0" size="16" textstring="Rotation control Diffuse color control" /> - <Add ref="#Text4" name="Text4" font="TitilliumWeb-Regular" position="-381.051 290.118 0" size="18" textstring="Directional light color and Camera xy rotation controlled via Datainput" /> + <Add ref="#Text4" name="Text4" font="TitilliumWeb-Regular" position="-381.051 290.118 0" size="18" textstring="Directional light color control Camera xy rotation control" /> + <Add ref="#Rectangle" name="Rectangle" position="0 -400 20" rotation="90.5 0 0" scale="11.0468 7.99191 9.12813" sourcepath="#Rectangle" /> + <Add ref="#Default_001" diffuse="0.623529 0.623529 0.623529" diffusemap="#Default_001_diffusemap" /> + <Add ref="#Default_001_diffusemap" sourcepath="Paper05.png" /> </State> </State> </Logic> diff --git a/examples/3dstudioruntime2/qmldatainput/qml/qmldatainput/main.qml b/examples/3dstudioruntime2/qmldatainput/qml/qmldatainput/main.qml index ef7d0e7..c0757e2 100644 --- a/examples/3dstudioruntime2/qmldatainput/qml/qmldatainput/main.qml +++ b/examples/3dstudioruntime2/qmldatainput/qml/qmldatainput/main.qml @@ -83,14 +83,14 @@ Item { property: "inputScaleVec3" duration: 12000 from: Qt.vector3d(0.3, 0.5, 0.5) - to: Qt.vector3d(1.0, 1.0, 1.0) + to: Qt.vector3d(4.0, 4.0, 1.0) loops: Animation.Infinite running: true } Vector3dAnimation { target: studio3D property: "inputColorVec3" - duration: 2000 + duration: 6000 from: Qt.vector3d(0.1, 0.1, 0.3) to: Qt.vector3d(1.0, 0.5, 1.0) loops: Animation.Infinite diff --git a/examples/3dstudioruntime2/qmldatainput/qmldatainput.qrc b/examples/3dstudioruntime2/qmldatainput/qmldatainput.qrc index 6fb7388..97aaeaa 100644 --- a/examples/3dstudioruntime2/qmldatainput/qmldatainput.qrc +++ b/examples/3dstudioruntime2/qmldatainput/qmldatainput.qrc @@ -3,5 +3,6 @@ <file>qml/qmldatainput/main.qml</file> <file>presentation/datainput.uia</file> <file>presentation/datainput.uip</file> + <file>presentation/Paper05.png</file> </qresource> </RCC> |