summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-05-31 18:24:15 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-05-31 18:24:15 +0200
commit69507867af88f2820e30f50c537db8a1368bc9ea (patch)
treea9565ebd85c1ccf52b614475c240410b85d4ca3b
parent63fd0d90965694c52f82a8c7a80cea86f3bacc7c (diff)
Removed animated background tutorial and changed to import QtQuick 1.0
-rw-r--r--examples/animatedbackground/BackgroundSwirls.qml113
-rw-r--r--examples/animatedbackground/SlideDeck.qml69
-rw-r--r--examples/animatedbackground/SlideDeckRotated.qml51
-rw-r--r--examples/animatedbackground/Swirl.qml102
-rw-r--r--examples/animatedbackground/particle.pngbin861 -> 0 bytes
-rw-r--r--examples/customtransition/OpacityTransitionPresentation.qml2
-rw-r--r--examples/customtransition/SlideDeck.qml2
-rw-r--r--examples/customtransition/SlideDeckRotated.qml2
-rw-r--r--examples/tutorial/CodeSection.qml2
-rw-r--r--examples/tutorial/SlideDeck.qml2
-rw-r--r--examples/tutorial/SlideDeckRotated.qml2
-rw-r--r--src/Presentation.qml2
-rw-r--r--src/Slide.qml2
13 files changed, 8 insertions, 343 deletions
diff --git a/examples/animatedbackground/BackgroundSwirls.qml b/examples/animatedbackground/BackgroundSwirls.qml
deleted file mode 100644
index 17777f0..0000000
--- a/examples/animatedbackground/BackgroundSwirls.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/***************************************************************************
-**
-** This file is part of QML Presentation System **
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).*
-**
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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."
-**
-**************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.particles 2.0
-
-Item {
- anchors.fill: parent
-
- Rectangle {
- anchors.fill: parent
- gradient: Gradient {
- GradientStop { position: 0; color: "lightsteelblue" }
- GradientStop { position: 1; color: "black" }
- }
- }
-
- Rectangle {
- id: colorTableItem
- width: 16
- height: 16
- anchors.fill: parent
-
- property color color1: Qt.rgba(0.8, 0.8, 1, 0.3)
- property color color2: Qt.rgba(0.8, 0.8, 1, 0.3)
-
- gradient: Gradient {
- GradientStop { position: 0; color: colorTableItem.color1 }
- GradientStop { position: 0.3; color: "transparent" }
- GradientStop { position: 0.7; color: "transparent" }
- GradientStop { position: 1; color: colorTableItem.color2 }
- }
-
- visible: false
- }
-
- ShaderEffectSource {
- id: colorTableSource
- sourceItem: colorTableItem
- smooth: true
- }
-
- Repeater {
- model: 4
- Swirl {
-
- width: parent.width
- anchors.bottom: parent.bottom
- height: parent.height / (2 + index)
- opacity: 0.3
- speed: (index + 1) / 5
- colorTable: colorTableSource
- }
- }
-
- ParticleSystem{
- id: particles
- }
- ColoredParticle{
- anchors.fill: parent
- system: particles
- image: "particle.png"
- alpha: 0
- colorVariation: 0.3
- }
- TrailEmitter{
- anchors.fill: parent
- system: particles
- particlesPerSecond: Math.sqrt(parent.width * parent.height) / 30
- particleDuration: 2000
- emitting: true
- particleSize: 4
- particleSizeVariation: 2
-
- acceleration: AngleVector{ angle: 90; angleVariation: 360; magnitude: 20; }
- speed: AngleVector{ angle: -90; angleVariation: 360; magnitude: 10; }
-
- }
-
-}
diff --git a/examples/animatedbackground/SlideDeck.qml b/examples/animatedbackground/SlideDeck.qml
deleted file mode 100644
index 44c9a6e..0000000
--- a/examples/animatedbackground/SlideDeck.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************
-**
-** This file is part of QML Presentation System **
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).*
-**
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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."
-**
-**************************************************************************/
-
-import QtQuick 2.0
-
-import Qt.labs.presentation 1.0
-
-Presentation {
- width: 1280
- height: 720
-
- BackgroundSwirls {}
-
- property color textColor: "white"
-
- Slide {
- centeredText: "Animated Background"
- fontScale: 2
- }
-
- Slide {
- title: "Composition"
- content: [
- "Gradient Rectangle",
- "Swirls using ShaderEffectItem",
- " Movement using a vertexShader",
- " Colorized using a gradient rect converted to a texture",
- " Controlled using QML properties and animations",
- "Snow",
- " Using 'Qt.labs.particles 2.0'",
- " TrailsEmitter",
- " ColoredParticle"
- ]
- }
-
-}
diff --git a/examples/animatedbackground/SlideDeckRotated.qml b/examples/animatedbackground/SlideDeckRotated.qml
deleted file mode 100644
index 166c99d..0000000
--- a/examples/animatedbackground/SlideDeckRotated.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************
-**
-** This file is part of QML Presentation System **
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).*
-**
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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."
-**
-**************************************************************************/
-
-import QtQuick 2.0
-
-Item
-{
- height: 640
- width: 360
- Item {
- rotation: 90
- SlideDeck {
- y: -360
- width: 640
- height: 360
- }
- }
-}
diff --git a/examples/animatedbackground/Swirl.qml b/examples/animatedbackground/Swirl.qml
deleted file mode 100644
index 51f039b..0000000
--- a/examples/animatedbackground/Swirl.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/***************************************************************************
-**
-** This file is part of QML Presentation System **
-**
-** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).*
-**
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** 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."
-**
-**************************************************************************/
-
-import QtQuick 2.0
-
-ShaderEffectItem {
- id: shader
-
- width: 400
- height: 300
-
- property real speed: 1
-
- property color d: Qt.rgba(Math.random() * 0.7,
- Math.random() * 0.5,
- Math.random() * 0.7,
- Math.random() * 0.5)
- property real tx
- NumberAnimation on tx { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite }
- property real ty
- NumberAnimation on ty { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite }
- property real tz
- NumberAnimation on tz { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite }
- property real tw
- NumberAnimation on tw { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite }
-
- property real amplitude: height / 2
-
- property variant colorTable: ShaderEffectSource { sourceItem: Rectangle { width: 4; height: 4; color: "steelblue" } }
-
- fragmentShader: "
- uniform lowp float qt_Opacity;
- uniform lowp sampler2D colorTable;
- varying highp vec2 qt_TexCoord0;
-
- void main() {
- gl_FragColor = texture2D(colorTable, qt_TexCoord0);
- gl_FragColor.w *= qt_Opacity;
- }
- "
-
- vertexShader: "
- uniform lowp vec4 d;
- uniform highp float tx;
- uniform highp float ty;
- uniform highp float tz;
- uniform highp float tw;
- uniform highp float amplitude;
- uniform highp mat4 qt_ModelViewProjectionMatrix;
- attribute highp vec4 qt_Vertex;
- attribute highp vec2 qt_MultiTexCoord0;
- varying highp vec2 qt_TexCoord0;
-
- void main() {
- highp vec4 pos = qt_Vertex;
-
- highp float y1 = sin(tx + d.x * qt_MultiTexCoord0.x * 17. + 2. * d.y) + sin(ty + d.z * qt_MultiTexCoord0.x * 11. + 5. * d.w);
- highp float y2 = sin(tz + d.w * qt_MultiTexCoord0.x * 7. + 3. * d.z) + sin(tw + d.y * qt_MultiTexCoord0.x * 19. + 3. * d.x);
-
- pos.y += mix(y1, y2, qt_MultiTexCoord0.y) * amplitude * 0.5;
-
- gl_Position = qt_ModelViewProjectionMatrix * pos;
- qt_TexCoord0 = qt_MultiTexCoord0;
- }
- "
-
- mesh: GridMesh { resolution: Qt.size(width / 10, 4) }
-
-}
diff --git a/examples/animatedbackground/particle.png b/examples/animatedbackground/particle.png
deleted file mode 100644
index 5c83896..0000000
--- a/examples/animatedbackground/particle.png
+++ /dev/null
Binary files differ
diff --git a/examples/customtransition/OpacityTransitionPresentation.qml b/examples/customtransition/OpacityTransitionPresentation.qml
index 71dece7..4870be2 100644
--- a/examples/customtransition/OpacityTransitionPresentation.qml
+++ b/examples/customtransition/OpacityTransitionPresentation.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
import Qt.labs.presentation 1.0
Presentation {
diff --git a/examples/customtransition/SlideDeck.qml b/examples/customtransition/SlideDeck.qml
index 69f6827..2611dfa 100644
--- a/examples/customtransition/SlideDeck.qml
+++ b/examples/customtransition/SlideDeck.qml
@@ -35,7 +35,7 @@
**************************************************************************/
import Qt.labs.presentation 1.0
-import QtQuick 2.0
+import QtQuick 1.0
OpacityTransitionPresentation
{
diff --git a/examples/customtransition/SlideDeckRotated.qml b/examples/customtransition/SlideDeckRotated.qml
index 166c99d..02d029f 100644
--- a/examples/customtransition/SlideDeckRotated.qml
+++ b/examples/customtransition/SlideDeckRotated.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
Item
{
diff --git a/examples/tutorial/CodeSection.qml b/examples/tutorial/CodeSection.qml
index a7e8abd..b4fad83 100644
--- a/examples/tutorial/CodeSection.qml
+++ b/examples/tutorial/CodeSection.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
Rectangle
{
diff --git a/examples/tutorial/SlideDeck.qml b/examples/tutorial/SlideDeck.qml
index 0960f58..b02ccd3 100644
--- a/examples/tutorial/SlideDeck.qml
+++ b/examples/tutorial/SlideDeck.qml
@@ -35,7 +35,7 @@
**************************************************************************/
import Qt.labs.presentation 1.0
-import QtQuick 2.0
+import QtQuick 1.0
Presentation
{
diff --git a/examples/tutorial/SlideDeckRotated.qml b/examples/tutorial/SlideDeckRotated.qml
index 166c99d..02d029f 100644
--- a/examples/tutorial/SlideDeckRotated.qml
+++ b/examples/tutorial/SlideDeckRotated.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
Item
{
diff --git a/src/Presentation.qml b/src/Presentation.qml
index c7a94ce..3a41aba 100644
--- a/src/Presentation.qml
+++ b/src/Presentation.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
Item {
id: root
diff --git a/src/Slide.qml b/src/Slide.qml
index b970211..5cc6726 100644
--- a/src/Slide.qml
+++ b/src/Slide.qml
@@ -34,7 +34,7 @@
**
**************************************************************************/
-import QtQuick 2.0
+import QtQuick 1.0
Item {
id: slide