summaryrefslogtreecommitdiffstats
path: root/examples/mobile/qtbubblelevel/qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mobile/qtbubblelevel/qml')
-rw-r--r--examples/mobile/qtbubblelevel/qml/BubbleLevel.qml226
-rw-r--r--examples/mobile/qtbubblelevel/qml/Button.qml72
-rw-r--r--examples/mobile/qtbubblelevel/qml/Tube.qml87
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/board.pngbin520721 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/bubble.pngbin4951 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/calibbutton.pngbin4881 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/exit.pngbin2308 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/reflection.pngbin1306 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/scale.pngbin271 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/signblank.pngbin41230 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/signwithtext.pngbin47648 -> 0 bytes
-rw-r--r--examples/mobile/qtbubblelevel/qml/images/taskswitcher.pngbin767 -> 0 bytes
12 files changed, 0 insertions, 385 deletions
diff --git a/examples/mobile/qtbubblelevel/qml/BubbleLevel.qml b/examples/mobile/qtbubblelevel/qml/BubbleLevel.qml
deleted file mode 100644
index 790fa24c..00000000
--- a/examples/mobile/qtbubblelevel/qml/BubbleLevel.qml
+++ /dev/null
@@ -1,226 +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 demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Image {
- id: bubbleLevel
-
- //! [0]
- // Signaled when task switcher button is pressed
- signal minimizeApplication()
-
- // Signaled when correction angle is saved
- signal saveCorrectionAngle(variant angle)
-
- // These functions are used as Qt slots
- function handleRotation(deg) {
- horTube.rawangle = deg
- }
-
- function setCorrectionAngle(deg) {
- horTube.angleconstant = deg
- }
-
- // Used to show the task switcher button in Maemo targets
- property alias taskSwitcherVisible: taskSwitcher.visible
- //! [0]
-
- anchors.fill: parent
- source: "images/board.png"
- smooth: true
-
- MouseArea {
- anchors.fill: parent
- onClicked: sign.frontSide = true
- }
-
- Button {
- id: taskSwitcher
-
- anchors {
- left: parent.left
- right: horTube.left
- verticalCenter: horTube.verticalCenter
- margins: (parent.width - (horTube.x + horTube.width)) / 4
- }
-
- height: width
- source: "images/taskswitcher.png"
- mouseAreaScale: 2
- onClicked: bubbleLevel.minimizeApplication()
- visible: false
- }
-
- Button {
- id: exitButton
-
- anchors {
- left: horTube.right
- right: parent.right
- verticalCenter: horTube.verticalCenter
- margins: (parent.width - (horTube.x + horTube.width)) / 4
- }
-
- height: width
- source: "images/exit.png"
- mouseAreaScale: 2
- onClicked: Qt.quit()
- }
-
- //! [1]
- Tube {
- id: horTube
-
- property real rawangle: 0
- property real angleconstant: 0
-
- anchors.horizontalCenter: parent.horizontalCenter
- width: parent.width * 0.775; height: parent.height * 0.15625
- deg: rawangle - angleconstant
- }
- //! [1]
-
- Flipable {
- id: sign
-
- property bool frontSide: true
-
- x: parent.width * 0.185; y: parent.height * 0.669
- width: parent.width * 0.63; height: parent.height * 0.258
-
- MouseArea {
- anchors.fill: parent
- onClicked: sign.frontSide = !sign.frontSide
- z: -1
- }
-
- transform: Rotation {
-
- origin.x: sign.width / 2; origin.y: sign.height / 2
- axis.x: 1; axis.y: 0; axis.z: 0
- angle: sign.frontSide ? 0 : 180
-
- Behavior on angle {
- RotationAnimation {
- direction: RotationAnimation.Clockwise
- easing.type: Easing.InOutCubic; duration: 300
- }
- }
- }
-
- front: Image {
- anchors.fill: parent
- source: "images/signwithtext.png"
- smooth: true
- }
-
- back: Image {
- anchors.fill: parent
- source: "images/signblank.png"
- smooth: true
-
- Text {
- id: oldValue
-
- anchors {
- left: parent.left; leftMargin: parent.width * 0.10
- right: saveButton.left; rightMargin: 10
- verticalCenter: parent.verticalCenter
- }
-
- text: "Place the device on a level surface and tap Calibrate."
- color: "#302020"
- wrapMode: Text.WordWrap
- font { bold: false; pixelSize: Math.min(parent.width, parent.height) * 0.19 }
- }
-
- Button {
- id: saveButton
-
- anchors {
- right: parent.right; rightMargin: parent.width * 0.09
- verticalCenter: parent.verticalCenter
- }
-
- width: parent.width * 0.25; height: parent.height * 0.65
- border { width: 2; color: "#555555" }
- radius: 10
-
- onClicked: {
- horTube.angleconstant = horTube.rawangle
- saveCorrectionAngle(horTube.angleconstant)
- }
-
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#999999" }
- GradientStop { position: 0.2; color: "#BBBBBB" }
- GradientStop { position: 0.8; color: "#BBBBBB" }
- GradientStop { position: 1.0; color: "#999999" }
- }
-
- Text {
- anchors.centerIn: parent
- color: "#302020"
- text: "Calibrate"
- font { bold: true; pixelSize: parent.width * 0.15 }
- smooth: true
- }
- }
- }
- }
-
- Button {
- anchors {
- left: sign.right
- right: parent.right
- verticalCenter: sign.verticalCenter
- margins: (parent.width - (sign.x + sign.width)) / 4
- }
-
- height: width
- source: "images/calibbutton.png"
- mouseAreaScale: 2
- smooth: true
-
- onClicked: sign.frontSide = !sign.frontSide
- }
-}
diff --git a/examples/mobile/qtbubblelevel/qml/Button.qml b/examples/mobile/qtbubblelevel/qml/Button.qml
deleted file mode 100644
index d4d0277b..00000000
--- a/examples/mobile/qtbubblelevel/qml/Button.qml
+++ /dev/null
@@ -1,72 +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 demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: button
-
- property alias source: image.source
- property alias mouseAreaScale: mouseArea.scale
-
- signal clicked
-
- width: 50; height: 50
- color: "transparent"
-
- Behavior on scale { NumberAnimation { duration: 50 } }
-
- Image {
- id: image
-
- anchors.fill: parent
- smooth: true
- }
-
- MouseArea {
- id: mouseArea
-
- anchors.fill: parent
- onClicked: { button.clicked() }
- onEntered: { button.scale = 0.9 }
- onExited: { button.scale = 1.0 }
- }
-}
diff --git a/examples/mobile/qtbubblelevel/qml/Tube.qml b/examples/mobile/qtbubblelevel/qml/Tube.qml
deleted file mode 100644
index 728c0c6e..00000000
--- a/examples/mobile/qtbubblelevel/qml/Tube.qml
+++ /dev/null
@@ -1,87 +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 demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** 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 Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-//! [0]
-Item {
- id: tube
-
- property real deg
-
- Image {
- id: bubble
-
- property real center: tube.width / 2
- property real bubbleCenter: bubble.width / 2
-
- function calX() {
- var newX = center + tube.deg / -20 * center
-
- if((newX - bubbleCenter) < 0) {
- return 0
- }
- else if((newX + bubbleCenter) > tube.width) {
- return tube.width - 2 * bubbleCenter
- }
-
- return newX - bubbleCenter;
- }
-
- x: calX()
- width: 0.16129032 * parent.width; height: 0.66666667 * parent.height
- source: "images/bubble.png"
- smooth: true
- }
-
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- width: 0.36451613 * parent.width; height: 0.66666667 * parent.height
- source: "images/scale.png"
- }
-
- Image {
- width: parent.width; height: 0.32 * parent.height
- opacity: 0.8
- source: "images/reflection.png"
- }
-}
-//! [0]
diff --git a/examples/mobile/qtbubblelevel/qml/images/board.png b/examples/mobile/qtbubblelevel/qml/images/board.png
deleted file mode 100644
index aaed8d01..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/board.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/bubble.png b/examples/mobile/qtbubblelevel/qml/images/bubble.png
deleted file mode 100644
index e73be9e5..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/bubble.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/calibbutton.png b/examples/mobile/qtbubblelevel/qml/images/calibbutton.png
deleted file mode 100644
index 5f84dad7..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/calibbutton.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/exit.png b/examples/mobile/qtbubblelevel/qml/images/exit.png
deleted file mode 100644
index 64a61634..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/exit.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/reflection.png b/examples/mobile/qtbubblelevel/qml/images/reflection.png
deleted file mode 100644
index 093781ec..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/reflection.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/scale.png b/examples/mobile/qtbubblelevel/qml/images/scale.png
deleted file mode 100644
index c75b21e2..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/scale.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/signblank.png b/examples/mobile/qtbubblelevel/qml/images/signblank.png
deleted file mode 100644
index 03b53cc0..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/signblank.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/signwithtext.png b/examples/mobile/qtbubblelevel/qml/images/signwithtext.png
deleted file mode 100644
index be9c050f..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/signwithtext.png
+++ /dev/null
Binary files differ
diff --git a/examples/mobile/qtbubblelevel/qml/images/taskswitcher.png b/examples/mobile/qtbubblelevel/qml/images/taskswitcher.png
deleted file mode 100644
index 89ff7a15..00000000
--- a/examples/mobile/qtbubblelevel/qml/images/taskswitcher.png
+++ /dev/null
Binary files differ