From b3742c7bdeafd2541cdd584414166f2d95ef7e81 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 13 Aug 2014 11:57:14 +0200 Subject: Add changelog for QtSensors 5.3.1 and 5.3.2 release Change-Id: I98bd8e3989fc78b552e7685274143c0b8bd90e5e Reviewed-by: Jerome Pasion --- dist/changes-5.3.1 | 44 ++++++++++++++++++++++++++++++++++++++++++++ dist/changes-5.3.2 | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 dist/changes-5.3.1 create mode 100644 dist/changes-5.3.2 diff --git a/dist/changes-5.3.1 b/dist/changes-5.3.1 new file mode 100644 index 00000000..e1e8dfc3 --- /dev/null +++ b/dist/changes-5.3.1 @@ -0,0 +1,44 @@ +Qt 5.3.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.3.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.3 + +The Qt version 5.3 series is binary compatible with the 5.2.x series. +Applications compiled for 5.2 will continue to run with 5.3. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtSensors +--------- + + - [QTBUG-38224] Fixed usage of wrong directory separator by some sensor + examples. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Android +------- + + - [QTBUG-39335] Fixed crash when accelerationMode was set to Gravity + +Windows +------- + + - [QTBUG-39698] Fixed crash when trying to access the sensors on a desktop + rather than mobile platforms. + diff --git a/dist/changes-5.3.2 b/dist/changes-5.3.2 new file mode 100644 index 00000000..17f6d711 --- /dev/null +++ b/dist/changes-5.3.2 @@ -0,0 +1,41 @@ +Qt 5.3.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.3.0 and Qt 5.3.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.3 + +The Qt version 5.3 series is binary compatible with the 5.2.x series. +Applications compiled for 5.2 will continue to run with 5.3. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtSensors +--------- + + - QCompass documentation improved. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Linux +----- + + - [sensorfw] Fixed incomplete initialization after restarting sensord. + - [sensorfw] Improved debugging and tracing capabilities + - [sensorfw] Added more checks to be more tolerant in case of errors or + corner cases. + - [sensorfw] Minor code cleanups + -- cgit v1.2.3 From 7e38cf4ed75622fb05be585f2d2d99ebd5d172ec Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 15 Aug 2014 11:31:41 +0200 Subject: Do not warn if no config file is found. Since this is the default situation. Change-Id: I9ab76b8ef9402fe39df0aaa532b61bd43b520b71 Reviewed-by: Lorn Potter Reviewed-by: Alex Blasche --- src/sensors/qsensormanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sensors/qsensormanager.cpp b/src/sensors/qsensormanager.cpp index abe5f853..3b86c669 100644 --- a/src/sensors/qsensormanager.cpp +++ b/src/sensors/qsensormanager.cpp @@ -105,7 +105,7 @@ public: #endif qCDebug(sensorsCategory) << "Loading config from" << config; if (!QFile::exists(config)) { - qCWarning(sensorsCategory) << "There is no config file" << config; + qCDebug(sensorsCategory) << "There is no config file" << config; return; } QFile cfgfile(config); -- cgit v1.2.3 From fd3e65ef5ab6eb8e4b5bdad380d1f6862799856c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 15 Aug 2014 11:21:43 +0200 Subject: Do not warn when failing to load static plugins as sensor plugins Since the list of static plugins can contain all kinds of plugins, failing there is expected. Change-Id: Ia5051c75691717b2e7279a68ea06f7697cbca053 Reviewed-by: Alex Blasche --- src/sensors/qsensormanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sensors/qsensormanager.cpp b/src/sensors/qsensormanager.cpp index 3b86c669..d1a570ee 100644 --- a/src/sensors/qsensormanager.cpp +++ b/src/sensors/qsensormanager.cpp @@ -176,7 +176,7 @@ public Q_SLOTS: Q_GLOBAL_STATIC(QSensorManagerPrivate, sensorManagerPrivate) -static void initPlugin(QObject *o) +static void initPlugin(QObject *o, bool warnOnFail = true) { qCDebug(sensorsCategory) << "Init plugin" << o; if (!o) { @@ -202,7 +202,7 @@ static void initPlugin(QObject *o) qCDebug(sensorsCategory) << "Register sensors for " << plugin; d->seenPlugins.insert(o); plugin->registerSensors(); - } else { + } else if (warnOnFail) { qCWarning(sensorsCategory) << "Can't cast to plugin" << o; } } @@ -216,7 +216,7 @@ void QSensorManagerPrivate::loadPlugins() SENSORLOG() << "initializing static plugins"; // Qt-style static plugins Q_FOREACH (QObject *plugin, QPluginLoader::staticInstances()) { - initPlugin(plugin); + initPlugin(plugin, false/*do not warn on fail*/); } if (d->loadExternalPlugins) { -- cgit v1.2.3 From f33363d292484f0fe62b177df0fd8080910d01f9 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Sun, 17 Aug 2014 15:27:22 +0200 Subject: Add missing private headers warning Change-Id: I06883e0f2bb16999f13993b69b3701443912c5cc Reviewed-by: Alex Blasche Reviewed-by: Lorn Potter --- src/sensors/gestures/qsensorgesturemanagerprivate_p.h | 11 +++++++++++ .../qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h b/src/sensors/gestures/qsensorgesturemanagerprivate_p.h index 0994b2ab..e0d45527 100644 --- a/src/sensors/gestures/qsensorgesturemanagerprivate_p.h +++ b/src/sensors/gestures/qsensorgesturemanagerprivate_p.h @@ -42,6 +42,17 @@ #ifndef QSENSORGESTUREMANAGERPRIVATE_P_H #define QSENSORGESTUREMANAGERPRIVATE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include #include diff --git a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h index 6f48572b..46cb40b3 100644 --- a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h +++ b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h @@ -42,6 +42,17 @@ #ifndef QTESTSENSORGESTUREPLUGIN_P_H #define QTESTSENSORGESTUREPLUGIN_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include #include -- cgit v1.2.3 From c7dc5fb9326a7d0bbaa33aba8a383e2c1699fede Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 29 Aug 2014 11:33:41 +0200 Subject: Bump version Change-Id: I302c83fa8edd1d9e7f350c5d1e2edab3c7c0acf8 --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 3d3f19b8..6ff59106 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.3.2 +MODULE_VERSION = 5.3.3 -- cgit v1.2.3 From 86c62fa1f17630d78d249bec2471f81c38bbd8df Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 17 Sep 2014 15:02:23 +0200 Subject: Fix a couple of issues in the maze example 1.) Remove dependency on QtSystemInfo. The module is not officially supported at this stage and screen saver related code is not really required for the example. 2.) Add AndroidManifest.xml to lock the screen orientation in portrait mode. Since the example depends on the tilt sensor a rotating UI is messing the game up. 3.) Port app to current TiltSensor API. The game works but its biggest problem remains the UI. It uses fixed-size UI elements which makes it tiny on High DPI screens. Task-number: QTBUG-31076 Change-Id: I73df9361b5171da930df66072e8ee9eba89b71ad Reviewed-by: Mitch Curtis --- examples/sensors/maze/android/AndroidManifest.xml | 56 +++++++++++++++++++++++ examples/sensors/maze/maze.pro | 7 ++- examples/sensors/maze/maze.qml | 8 ++-- examples/sensors/sensors.pro | 4 +- 4 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 examples/sensors/maze/android/AndroidManifest.xml diff --git a/examples/sensors/maze/android/AndroidManifest.xml b/examples/sensors/maze/android/AndroidManifest.xml new file mode 100644 index 00000000..de787fad --- /dev/null +++ b/examples/sensors/maze/android/AndroidManifest.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/sensors/maze/maze.pro b/examples/sensors/maze/maze.pro index e4c4d866..f15fa570 100644 --- a/examples/sensors/maze/maze.pro +++ b/examples/sensors/maze/maze.pro @@ -1,16 +1,19 @@ TEMPLATE = app TARGET = maze -QT += quick +QT += quick sensors SOURCES = main.cpp OTHER_FILES = \ components \ $$files(*.qml) \ $$files(*.js) \ - content + content \ + android/AndroidManifest.xml target.path = $$[QT_INSTALL_EXAMPLES]/sensors/maze INSTALLS += target RESOURCES += \ maze.qrc + +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android diff --git a/examples/sensors/maze/maze.qml b/examples/sensors/maze/maze.qml index eeaea28f..19174a4f 100644 --- a/examples/sensors/maze/maze.qml +++ b/examples/sensors/maze/maze.qml @@ -75,7 +75,6 @@ import "components" //! [0] import QtSensors 5.0 //! [0] -import QtSystemInfo 5.0 //Import the javascript functions for this game import "lib.js" as Lib @@ -86,7 +85,6 @@ ApplicationWindow { property Mouse mouseCtrl; property LabyrinthSquare cheeseSquare; property Congratulation congratulation; - ScreenSaver { screenSaverEnabled: !tiltTimer.running } Rectangle { id: gameRect @@ -171,9 +169,9 @@ ApplicationWindow { } //! [1] - TiltSensor{ + TiltSensor { id: tiltSensor - enabled: true + active: true } //! [1] @@ -185,7 +183,7 @@ ApplicationWindow { //! [2] onTriggered: { if (!tiltSensor.enabled) - tiltSensor.enabled = true; + tiltSensor.active = true; //! [2] if (mouseCtrl === null) diff --git a/examples/sensors/sensors.pro b/examples/sensors/sensors.pro index 6b994b85..20537a8c 100644 --- a/examples/sensors/sensors.pro +++ b/examples/sensors/sensors.pro @@ -4,6 +4,7 @@ SUBDIRS += grue qtHaveModule(quick) { SUBDIRS += \ + maze \ qmlsensorgestures \ qmlqtsensors \ sensor_explorer \ @@ -19,7 +20,4 @@ qtHaveModule(widgets): SUBDIRS += \ qtHaveModule(3d): SUBDIRS += \ cubehouse -qtHaveModule(systeminfo): SUBDIRS += \ - maze - OTHER_FILES = stub.h -- cgit v1.2.3 From 1be9fc260de2e762d9e5c482505eb5db2f98f540 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 17 Sep 2014 15:17:42 +0200 Subject: Remove cube example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The example doesn't offer much example value. The accelerometer is presented by the accelbubble example too but doesn't have all the Qt3d dependencies. Cutting those dependencies is much cleaner. Task-number: QTBUG-31076 Change-Id: I074b24974cbd630d7b6ccc9eb21d8cabc96da86c Reviewed-by: Topi Reiniƶ --- .gitignore | 1 - examples/sensors/cubehouse/Cube.qml | 81 ------ examples/sensors/cubehouse/Room.qml | 288 ---------------------- examples/sensors/cubehouse/Table.qml | 50 ---- examples/sensors/cubehouse/content/ground.jpg | Bin 3077 -> 0 bytes examples/sensors/cubehouse/content/qtlogo.png | Bin 13923 -> 0 bytes examples/sensors/cubehouse/content/roof.jpg | Bin 3866 -> 0 bytes examples/sensors/cubehouse/content/wall.jpg | Bin 6195 -> 0 bytes examples/sensors/cubehouse/cubehouse.pro | 15 -- examples/sensors/cubehouse/cubehouse.qml | 113 --------- examples/sensors/cubehouse/cubehouse.qrc | 13 - examples/sensors/cubehouse/doc/src/cubehouse.qdoc | 60 ----- examples/sensors/cubehouse/main.cpp | 42 ---- examples/sensors/cubehouse/mesh/table.3ds | Bin 9149 -> 0 bytes examples/sensors/sensors.pro | 3 - 15 files changed, 666 deletions(-) delete mode 100644 examples/sensors/cubehouse/Cube.qml delete mode 100644 examples/sensors/cubehouse/Room.qml delete mode 100644 examples/sensors/cubehouse/Table.qml delete mode 100644 examples/sensors/cubehouse/content/ground.jpg delete mode 100644 examples/sensors/cubehouse/content/qtlogo.png delete mode 100644 examples/sensors/cubehouse/content/roof.jpg delete mode 100644 examples/sensors/cubehouse/content/wall.jpg delete mode 100644 examples/sensors/cubehouse/cubehouse.pro delete mode 100644 examples/sensors/cubehouse/cubehouse.qml delete mode 100644 examples/sensors/cubehouse/cubehouse.qrc delete mode 100644 examples/sensors/cubehouse/doc/src/cubehouse.qdoc delete mode 100644 examples/sensors/cubehouse/main.cpp delete mode 100644 examples/sensors/cubehouse/mesh/table.3ds diff --git a/.gitignore b/.gitignore index 6bbb56a6..66a88065 100644 --- a/.gitignore +++ b/.gitignore @@ -81,7 +81,6 @@ doc/src/snippets/sensors/sensorsdocsnippet # Generated example binaries examples/sensors/accel/accel examples/sensors/accelbubble/accelbubble -examples/sensors/cubehouse/cubehouse examples/sensors/grue/console_app/detect_grue examples/sensors/grue/grue examples/sensors/grue/lib/*gruesensor* diff --git a/examples/sensors/cubehouse/Cube.qml b/examples/sensors/cubehouse/Cube.qml deleted file mode 100644 index 4d74cc22..00000000 --- a/examples/sensors/cubehouse/Cube.qml +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia Plc 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: "content/qtlogo.png" - decal: true - } -} diff --git a/examples/sensors/cubehouse/Room.qml b/examples/sensors/cubehouse/Room.qml deleted file mode 100644 index c15c9eee..00000000 --- a/examples/sensors/cubehouse/Room.qml +++ /dev/null @@ -1,288 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia Plc 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: "content/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: "content/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: "content/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: "content/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: "content/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: "content/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 61c474c1..00000000 --- a/examples/sensors/cubehouse/Table.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia Plc 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/content/ground.jpg b/examples/sensors/cubehouse/content/ground.jpg deleted file mode 100644 index 2664b99e..00000000 Binary files a/examples/sensors/cubehouse/content/ground.jpg and /dev/null differ diff --git a/examples/sensors/cubehouse/content/qtlogo.png b/examples/sensors/cubehouse/content/qtlogo.png deleted file mode 100644 index 7d3e97eb..00000000 Binary files a/examples/sensors/cubehouse/content/qtlogo.png and /dev/null differ diff --git a/examples/sensors/cubehouse/content/roof.jpg b/examples/sensors/cubehouse/content/roof.jpg deleted file mode 100644 index 53a35d64..00000000 Binary files a/examples/sensors/cubehouse/content/roof.jpg and /dev/null differ diff --git a/examples/sensors/cubehouse/content/wall.jpg b/examples/sensors/cubehouse/content/wall.jpg deleted file mode 100644 index 7c56e23f..00000000 Binary files a/examples/sensors/cubehouse/content/wall.jpg and /dev/null differ diff --git a/examples/sensors/cubehouse/cubehouse.pro b/examples/sensors/cubehouse/cubehouse.pro deleted file mode 100644 index 18191d38..00000000 --- a/examples/sensors/cubehouse/cubehouse.pro +++ /dev/null @@ -1,15 +0,0 @@ -TEMPLATE = app -TARGET = cubehouse -QT += quick -SOURCES = main.cpp - -OTHER_FILES = \ - $$files(*.qml) \ - content \ - mesh - -target.path = $$[QT_INSTALL_EXAMPLES]/sensors/cubehouse -INSTALLS += target - -RESOURCES += \ - cubehouse.qrc diff --git a/examples/sensors/cubehouse/cubehouse.qml b/examples/sensors/cubehouse/cubehouse.qml deleted file mode 100644 index ee2774a4..00000000 --- a/examples/sensors/cubehouse/cubehouse.qml +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia Plc 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 QtSensors 5.0 -//! [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/cubehouse.qrc b/examples/sensors/cubehouse/cubehouse.qrc deleted file mode 100644 index 144151b0..00000000 --- a/examples/sensors/cubehouse/cubehouse.qrc +++ /dev/null @@ -1,13 +0,0 @@ - - - Cube.qml - cubehouse.qml - Room.qml - Table.qml - content/ground.jpg - content/wall.jpg - content/roof.jpg - content/qtlogo.png - mesh/table.3ds - - diff --git a/examples/sensors/cubehouse/doc/src/cubehouse.qdoc b/examples/sensors/cubehouse/doc/src/cubehouse.qdoc deleted file mode 100644 index e286e32e..00000000 --- a/examples/sensors/cubehouse/doc/src/cubehouse.qdoc +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the documentation of the Qt Toolkit. -** -** $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 Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example cubehouse - \title Qt Sensors - Cube House QML Accelerometer example - \ingroup qtsensors-examples - \brief The Cube House example demonstrates the use of the accelerometer to drive a camera to create a pseudo-3D effect. - \image cubehouse.png - -\section1 Overview - To write a QML application that will use the QML Accelerometer type from the QtSensors import you need to to the following steps: - - Import the QtSensors declarative plugin: - -\snippet cubehouse/cubehouse.qml 0 - - Add the Accelerometer QML types into your qml file. - -\snippet cubehouse/cubehouse.qml 1 - - In additional two properties are added to save the calculated pitch and roll values: - -\snippet cubehouse/cubehouse.qml 2 - - Reading out the Accelerometer data can be done by implementing the 'onReadingChanged' slot and - accessing the 'reading' property from the Accelerometer type: - -\snippet cubehouse/cubehouse.qml 3 - - By using a timer the view can be rotated using the pitch and roll properties from the Accelerometer type: - -\snippet cubehouse/cubehouse.qml 4 - -*/ - diff --git a/examples/sensors/cubehouse/main.cpp b/examples/sensors/cubehouse/main.cpp deleted file mode 100644 index 95d169f8..00000000 --- a/examples/sensors/cubehouse/main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** 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 Digia Plc 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$ -** -****************************************************************************/ - -#include "../stub.h" -SENSORS_EXAMPLE_MAIN(cubehouse) diff --git a/examples/sensors/cubehouse/mesh/table.3ds b/examples/sensors/cubehouse/mesh/table.3ds deleted file mode 100644 index 3e576bd1..00000000 Binary files a/examples/sensors/cubehouse/mesh/table.3ds and /dev/null differ diff --git a/examples/sensors/sensors.pro b/examples/sensors/sensors.pro index 20537a8c..953071cd 100644 --- a/examples/sensors/sensors.pro +++ b/examples/sensors/sensors.pro @@ -17,7 +17,4 @@ qtHaveModule(quick) { qtHaveModule(widgets): SUBDIRS += \ sensorgestures -qtHaveModule(3d): SUBDIRS += \ - cubehouse - OTHER_FILES = stub.h -- cgit v1.2.3