diff options
author | Wolfgang Beck <wolfgang.beck@nokia.com> | 2012-05-17 12:27:18 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 03:06:56 +0200 |
commit | 17d908ba5205513e9ed0be33aebeb3736bda0326 (patch) | |
tree | da04213540ee61853aab6b4260721f1badd703b2 /examples/sensors/cubehouse | |
parent | 32e2d98ea438041e7e0c4df7e67053c5ee7527a7 (diff) |
Unfork the examples.
Some examples were forked off and updated. Unfork by bringing
these changes back (a later update will bring the other examples
in line with this new style).
The changes are primarily made up of file renaming.
Also, JPG files have been converted to PNG.
Some documentation updates have been done.
Change-Id: Ib090abb5ebea2003d479d2336a23317f52b8c4d8
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'examples/sensors/cubehouse')
-rw-r--r-- | examples/sensors/cubehouse/Cube.qml | 81 | ||||
-rw-r--r-- | examples/sensors/cubehouse/Cubehouse.qml | 113 | ||||
-rw-r--r-- | examples/sensors/cubehouse/Room.qml | 288 | ||||
-rw-r--r-- | examples/sensors/cubehouse/Table.qml | 50 | ||||
-rw-r--r-- | examples/sensors/cubehouse/cubehouse.pro | 19 | ||||
-rw-r--r-- | examples/sensors/cubehouse/icon.png | bin | 7607 -> 0 bytes | |||
-rw-r--r-- | examples/sensors/cubehouse/images/ground.jpg | bin | 3077 -> 0 bytes | |||
-rw-r--r-- | examples/sensors/cubehouse/images/qtlogo.png | bin | 13923 -> 0 bytes | |||
-rw-r--r-- | examples/sensors/cubehouse/images/roof.jpg | bin | 3866 -> 0 bytes | |||
-rw-r--r-- | examples/sensors/cubehouse/images/wall.jpg | bin | 6195 -> 0 bytes | |||
-rw-r--r-- | examples/sensors/cubehouse/info.json | 14 | ||||
-rw-r--r-- | examples/sensors/cubehouse/mesh/table.3ds | bin | 9149 -> 0 bytes |
12 files changed, 0 insertions, 565 deletions
diff --git a/examples/sensors/cubehouse/Cube.qml b/examples/sensors/cubehouse/Cube.qml deleted file mode 100644 index c174b8fe..00000000 --- a/examples/sensors/cubehouse/Cube.qml +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt3D 1.0 -import Qt3D.Shapes 1.0 - -Cube { - objectName: "cube" - - transform: [ - Rotation3D { - angle: 45.0 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 45.0 - axis: Qt.vector3d(0, 0, 1) - }, - Rotation3D { - id: yRT - angle: 0 - axis: Qt.vector3d(0, -1, 0) - } - ] - - SequentialAnimation { - running: true - loops: Animation.Infinite - NumberAnimation { - target: yRT - property: "angle" - from: 0 - to: 360 - duration: 1000 - } - } - - effect: Effect { - color: "#aaca00" - texture: "images/qtlogo.png" - decal: true - } -} diff --git a/examples/sensors/cubehouse/Cubehouse.qml b/examples/sensors/cubehouse/Cubehouse.qml deleted file mode 100644 index 5a1b91f8..00000000 --- a/examples/sensors/cubehouse/Cubehouse.qml +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt3D 1.0 -import Qt3D.Shapes 1.0 - -//! [0] -import QtMobility.sensors 1.3 -//! [0] - -import "." - -Item { - id: mainWindow - width: 320 - height: 480 - - Viewport { - id: view - anchors.top: parent.top - width: parent.width - height: parent.height - fillColor: "darkblue" - objectName: "cube viewport" - camera: Camera { eye: Qt.vector3d(0, 3, 1.6 * room.scale - 4)} - - Room{ - id: room - scale: 7.0 - } - - function rotateY(y) - { - room.rotateY(y); - } - - function rotateX(x) - { - room.rotateX(x); - } - } - -//! [1] - Accelerometer { - id: accel - active: true - dataRate: 20 -//! [1] - -//! [2] - property double pitch: 0.0 - property double roll: 0.0 -//! [2] - -//! [3] - onReadingChanged: { - pitch = -(Math.atan2(reading.x, Math.sqrt(reading.y * reading.y + reading.z * reading.z)) * 180) / Math.PI; - roll = (Math.atan2(reading.y, Math.sqrt(reading.x * reading.x + reading.z * reading.z)) * 180) / Math.PI; - } - } -//! [3] - - - //Timer to read out the x and y rotation of the TiltSensor -//! [4] - Timer { - interval: 50; running: true; repeat: true - - onTriggered: { - view.rotateY(accel.pitch); - view.rotateX(accel.roll); - } - } -//! [4] -} diff --git a/examples/sensors/cubehouse/Room.qml b/examples/sensors/cubehouse/Room.qml deleted file mode 100644 index 43af3b12..00000000 --- a/examples/sensors/cubehouse/Room.qml +++ /dev/null @@ -1,288 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt3D 1.0 -import Qt3D.Shapes 1.0 -import "." - -Item3D{ - id: room - property double scale: 1.0 - property bool yspin: false - property bool xspin: false - property int yrot: 0 - property int xrot: 0 - property double distanceCorrection: 3.7 - - transform: [ - Rotation3D { - id: yRT - angle: 0 - axis: Qt.vector3d(0, -1, 0) - }, - Rotation3D { - id: xRT - angle: 0 - axis: Qt.vector3d(-1, 0, 0) - } - ] - - SequentialAnimation { - running: yspin - NumberAnimation { - target: yRT - property: "angle" - to: yrot - easing.type:"Linear" - duration: 50 - } - onCompleted: yspin = false - } - - SequentialAnimation { - running: xspin - NumberAnimation { - target: xRT - property: "angle" - to: xrot - easing.type:"Linear" - duration: 50 - } - onCompleted: xspin = false - } - - function rotateY(y) - { - room.yrot=y; - room.yspin = true; - } - - function rotateX(x) - { - room.xrot=x; - room.xspin = true; - } - - Quad { - id: frontWall - scale: room.scale - effect: Effect { - texture: "images/wall.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -frontWall.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 0 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 0 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Quad { - id: ground - scale: room.scale - effect: Effect { - texture: "images/ground.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -ground.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Quad { - id: leftWall - scale: room.scale - effect: Effect { - texture: "images/wall.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -leftWall.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: 0 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Quad { - id: rightWall - scale: room.scale - effect: Effect { - texture: "images/wall.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -rightWall.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: 180 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Quad { - id: roof - scale: room.scale - effect: Effect { - texture: "images/roof.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -roof.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: -90 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 90 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Quad { - id: backWall - scale: room.scale - effect: Effect { - texture: "images/wall.jpg" - } - transform: [ - Translation3D { - translate: Qt.vector3d(0, -backWall.scale + room.distanceCorrection, 0) - }, - Rotation3D { - angle: -90 - axis: Qt.vector3d(1, 0, 0) - }, - Rotation3D { - angle: 0 - axis: Qt.vector3d(0, 1, 0) - }, - Rotation3D { - angle: 0 - axis: Qt.vector3d(0, 0, 1) - } - ] - } - - Cube { - id: cube - scale: 0.5 - - transform: [ - Translation3D { - translate: Qt.vector3d(0.0, 0.0, 0.0) - } - ] - } - - Table { - scale: 0.025 - transform: [ - Translation3D { - translate: Qt.vector3d(0, -7 + room.distanceCorrection, 0) - } - ] - } - - Teapot { - scale: 0.5 - - effect: Effect { - color: "#ffffaa" - decal: true - } - - transform: [ - Translation3D { - translate: Qt.vector3d(0.0, -4.50 + room.distanceCorrection, 0.0) - } - ] - } -} diff --git a/examples/sensors/cubehouse/Table.qml b/examples/sensors/cubehouse/Table.qml deleted file mode 100644 index 683d28de..00000000 --- a/examples/sensors/cubehouse/Table.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtSensors module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import Qt3D 1.0 -import Qt3D.Shapes 1.0 -import "." - -Item3D { - id: table - scale: 1 - mesh: Mesh { source: "mesh/table.3ds" } -} diff --git a/examples/sensors/cubehouse/cubehouse.pro b/examples/sensors/cubehouse/cubehouse.pro deleted file mode 100644 index 075ec4ef..00000000 --- a/examples/sensors/cubehouse/cubehouse.pro +++ /dev/null @@ -1,19 +0,0 @@ -TEMPLATE = aux - -app.files = \ - Cube.qml \ - Cubehouse.qml \ - Room.qml \ - Table.qml \ - icon.png \ - images \ - info.json \ - mesh - -MT_SYSROOT=$$(MT_SYSROOT) -!isEmpty(MT_SYSROOT):EXAMPLES_PREFIX=/opt/mt/applications -!isEmpty(EXAMPLES_PREFIX) { - app.path = $$EXAMPLES_PREFIX/com.nokia.mt.cubehouse - INSTALLS = app -} - diff --git a/examples/sensors/cubehouse/icon.png b/examples/sensors/cubehouse/icon.png Binary files differdeleted file mode 100644 index 193ad561..00000000 --- a/examples/sensors/cubehouse/icon.png +++ /dev/null diff --git a/examples/sensors/cubehouse/images/ground.jpg b/examples/sensors/cubehouse/images/ground.jpg Binary files differdeleted file mode 100644 index 2664b99e..00000000 --- a/examples/sensors/cubehouse/images/ground.jpg +++ /dev/null diff --git a/examples/sensors/cubehouse/images/qtlogo.png b/examples/sensors/cubehouse/images/qtlogo.png Binary files differdeleted file mode 100644 index 7d3e97eb..00000000 --- a/examples/sensors/cubehouse/images/qtlogo.png +++ /dev/null diff --git a/examples/sensors/cubehouse/images/roof.jpg b/examples/sensors/cubehouse/images/roof.jpg Binary files differdeleted file mode 100644 index 53a35d64..00000000 --- a/examples/sensors/cubehouse/images/roof.jpg +++ /dev/null diff --git a/examples/sensors/cubehouse/images/wall.jpg b/examples/sensors/cubehouse/images/wall.jpg Binary files differdeleted file mode 100644 index 7c56e23f..00000000 --- a/examples/sensors/cubehouse/images/wall.jpg +++ /dev/null diff --git a/examples/sensors/cubehouse/info.json b/examples/sensors/cubehouse/info.json deleted file mode 100644 index 39e39a8b..00000000 --- a/examples/sensors/cubehouse/info.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "info-version": "1.0", - "dict": { - "Category": "application", - "Runtime": "qml", - "DisplayName": "Cubehouse", - "Subcategory": "utility", - "MainQML": "Cubehouse.qml", - "Version": "1.0", - "Identifier": "com.nokia.mt.cubehouse", - "Summary": "Cubehouse using Accelerometer", - "Author": "Qt" - } -} diff --git a/examples/sensors/cubehouse/mesh/table.3ds b/examples/sensors/cubehouse/mesh/table.3ds Binary files differdeleted file mode 100644 index 3e576bd1..00000000 --- a/examples/sensors/cubehouse/mesh/table.3ds +++ /dev/null |