diff options
author | Leena Miettinen <riitta-leena.miettinen@digia.com> | 2014-03-27 17:32:48 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@digia.com> | 2014-04-01 14:01:36 +0200 |
commit | 2301025c1d9d5fedda4c4fc232b71626488f0994 (patch) | |
tree | 9a9dee63eb25dbb01ab35500c0c3c22475bab03a /doc/examples/accelbubble | |
parent | 7f0b1062268f63e08ef521cbbc306634e8ff21d1 (diff) |
Doc: update the Android tutorial to also cover iOS
Rename as "Creating a Mobile Application".
Add the steps necessary for deploying to iOS devices.
Fix the link in the Tutorials tab in the Welcome mode.
Change-Id: Ie72bf087c789d8d1299b9b5ac19ad732da534012
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'doc/examples/accelbubble')
-rw-r--r-- | doc/examples/accelbubble/main.qml | 96 |
1 files changed, 54 insertions, 42 deletions
diff --git a/doc/examples/accelbubble/main.qml b/doc/examples/accelbubble/main.qml index 3e2f1d62d9..80c961f78b 100644 --- a/doc/examples/accelbubble/main.qml +++ b/doc/examples/accelbubble/main.qml @@ -1,29 +1,42 @@ -/**************************************************************************** +/************************************************************************** ** -** Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator ** +** You may use this file under the terms of the BSD license as follows: ** -** GNU Free Documentation License +** "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. ** -** 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. +** 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." ** -** -****************************************************************************/ - -// ********************************************************************** -// NOTE: the sections are not ordered by their logical order to avoid -// reshuffling the file each time the index order changes (i.e., often). -// Run the fixnavi.pl script to adjust the links to the index order. -// ********************************************************************** +**************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 +import QtQuick 2.2 +import QtQuick.Controls 1.1 import QtSensors 5.0 @@ -34,6 +47,29 @@ ApplicationWindow { height: 480 visible: true + Image { + id: bubble + source: "Bluebubble.svg" + smooth: true + property real centerX: mainWindow.width / 2 + property real centerY: mainWindow.height / 2 + property real bubbleCenter: bubble.width / 2 + x: centerX - bubbleCenter + y: centerY - bubbleCenter + + Behavior on y { + SmoothedAnimation { + easing.type: Easing.Linear + duration: 100 + } + } + Behavior on x { + SmoothedAnimation { + easing.type: Easing.Linear + duration: 100 + } + } + } Accelerometer { id: accel dataRate: 100 @@ -67,36 +103,12 @@ ApplicationWindow { return -(Math.atan(x / Math.sqrt(y * y + z * z)) * 57.2957795); } - Image { - id: bubble - source: "Bluebubble.svg" - smooth: true - property real centerX: mainWindow.width / 2 - property real centerY: mainWindow.height / 2 - property real bubbleCenter: bubble.width / 2 - x: centerX - bubbleCenter - y: centerY - bubbleCenter - - Behavior on y { - SmoothedAnimation { - easing.type: Easing.Linear - duration: 100 - } - } - Behavior on x { - SmoothedAnimation { - easing.type: Easing.Linear - duration: 100 - } - } - - MenuBar { + menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); - } } } } |