diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-24 16:37:03 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-24 16:37:03 +1000 |
commit | 2a18f33552d20b637989e876175c6bd03c69bc97 (patch) | |
tree | 1bfe921c52dcebeaadf79511168db7d8164ee062 /examples/declarative/particles/launcherContent | |
parent | 09b01b54f23fb10fd6b63398edf813a2bbd04cff (diff) | |
parent | a9853d2ffe177bf98eb7610b58bb1bbb44743510 (diff) |
Merge branch 'qtquick2' of scm.dev.nokia.troll.no:qt/qtdeclarative-staging
Conflicts:
src/declarative/items/qsgtextnode.cpp
Diffstat (limited to 'examples/declarative/particles/launcherContent')
34 files changed, 159 insertions, 0 deletions
diff --git a/examples/declarative/particles/launcherContent/Button.qml b/examples/declarative/particles/launcherContent/Button.qml new file mode 100644 index 0000000000..a937b3bede --- /dev/null +++ b/examples/declarative/particles/launcherContent/Button.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples 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 + +Rectangle { + id: container + + property string text: "Button" + signal clicked + + width: buttonLabel.width + 20; height: buttonLabel.height + 20 + smooth: true + property color myCol: "#999999" + border { width: 1; color: Qt.darker(myCol) } + radius: 8 + + gradient: Gradient { + GradientStop { + position: 0.0 + color: { + if (mouseArea.pressed) + return Qt.darker(myCol) + else + return Qt.lighter(myCol) + } + } + GradientStop { position: 1.0; color: myCol } + } + + MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + + Text { + id: buttonLabel; text: container.text; anchors.centerIn: container; color: "black"; font.pixelSize: 24 + } +} diff --git a/examples/declarative/particles/launcherContent/Shell.qml b/examples/declarative/particles/launcherContent/Shell.qml new file mode 100644 index 0000000000..32b0cd624c --- /dev/null +++ b/examples/declarative/particles/launcherContent/Shell.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples 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 + +Loader{ + id: ldr + visible: false + focus: visible + onVisibleChanged: source = "" + opacity: visible?1:0 + Behavior on opacity{NumberAnimation{}} + + function setDemo(str){ + visible = true; + source = str; + } + Image{//TODO: Augment with PARTICLES + z: 1 + source: "icons/close.png" + MouseArea{ + anchors.fill: parent + onClicked: ldr.visible = false; + } + } + Rectangle{ + z: -1 + anchors.fill: parent + color:"black" + Text{ + color: "white" + anchors.centerIn: parent + text: ldr.Status == Loader.Error ? "Error :(" : "Loading..." + } + MouseArea{ + id: graball + anchors.fill: parent + onClicked:; + } + } +} diff --git a/examples/declarative/particles/launcherContent/icons/asteroid.png b/examples/declarative/particles/launcherContent/icons/asteroid.png Binary files differnew file mode 100644 index 0000000000..77480c6f09 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/asteroid.png diff --git a/examples/declarative/particles/launcherContent/icons/blackhole.png b/examples/declarative/particles/launcherContent/icons/blackhole.png Binary files differnew file mode 100644 index 0000000000..4bd8040c3b --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/blackhole.png diff --git a/examples/declarative/particles/launcherContent/icons/blurparticles.png b/examples/declarative/particles/launcherContent/icons/blurparticles.png Binary files differnew file mode 100644 index 0000000000..7a247ae46e --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/blurparticles.png diff --git a/examples/declarative/particles/launcherContent/icons/close.png b/examples/declarative/particles/launcherContent/icons/close.png Binary files differnew file mode 100644 index 0000000000..c37714ee8f --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/close.png diff --git a/examples/declarative/particles/launcherContent/icons/dynamicemitters.png b/examples/declarative/particles/launcherContent/icons/dynamicemitters.png Binary files differnew file mode 100644 index 0000000000..0cdef9d21e --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/dynamicemitters.png diff --git a/examples/declarative/particles/launcherContent/icons/fireballs.png b/examples/declarative/particles/launcherContent/icons/fireballs.png Binary files differnew file mode 100644 index 0000000000..39acf8b40d --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/fireballs.png diff --git a/examples/declarative/particles/launcherContent/icons/flickr.png b/examples/declarative/particles/launcherContent/icons/flickr.png Binary files differnew file mode 100644 index 0000000000..4de2650280 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/flickr.png diff --git a/examples/declarative/particles/launcherContent/icons/gridsplosion.png b/examples/declarative/particles/launcherContent/icons/gridsplosion.png Binary files differnew file mode 100644 index 0000000000..ec75453df6 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/gridsplosion.png diff --git a/examples/declarative/particles/launcherContent/icons/layered.png b/examples/declarative/particles/launcherContent/icons/layered.png Binary files differnew file mode 100644 index 0000000000..a28e3c4f02 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/layered.png diff --git a/examples/declarative/particles/launcherContent/icons/list.png b/examples/declarative/particles/launcherContent/icons/list.png Binary files differnew file mode 100644 index 0000000000..bc13263cff --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/list.png diff --git a/examples/declarative/particles/launcherContent/icons/overburst.png b/examples/declarative/particles/launcherContent/icons/overburst.png Binary files differnew file mode 100644 index 0000000000..4ef0435991 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/overburst.png diff --git a/examples/declarative/particles/launcherContent/icons/package.png b/examples/declarative/particles/launcherContent/icons/package.png Binary files differnew file mode 100644 index 0000000000..eba8951c26 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/package.png diff --git a/examples/declarative/particles/launcherContent/icons/plain.png b/examples/declarative/particles/launcherContent/icons/plain.png Binary files differnew file mode 100644 index 0000000000..dd51498514 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/plain.png diff --git a/examples/declarative/particles/launcherContent/icons/plasmapatrol.png b/examples/declarative/particles/launcherContent/icons/plasmapatrol.png Binary files differnew file mode 100644 index 0000000000..fda852b420 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/plasmapatrol.png diff --git a/examples/declarative/particles/launcherContent/icons/portal.png b/examples/declarative/particles/launcherContent/icons/portal.png Binary files differnew file mode 100644 index 0000000000..9c1f910d0c --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/portal.png diff --git a/examples/declarative/particles/launcherContent/icons/rainbow.png b/examples/declarative/particles/launcherContent/icons/rainbow.png Binary files differnew file mode 100644 index 0000000000..8841ea30f9 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/rainbow.png diff --git a/examples/declarative/particles/launcherContent/icons/remove.png b/examples/declarative/particles/launcherContent/icons/remove.png Binary files differnew file mode 100644 index 0000000000..c37714ee8f --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/remove.png diff --git a/examples/declarative/particles/launcherContent/icons/samegame.png b/examples/declarative/particles/launcherContent/icons/samegame.png Binary files differnew file mode 100644 index 0000000000..d00698264b --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/samegame.png diff --git a/examples/declarative/particles/launcherContent/icons/shimmer.png b/examples/declarative/particles/launcherContent/icons/shimmer.png Binary files differnew file mode 100644 index 0000000000..0ff53196a6 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/shimmer.png diff --git a/examples/declarative/particles/launcherContent/icons/smile.png b/examples/declarative/particles/launcherContent/icons/smile.png Binary files differnew file mode 100644 index 0000000000..f990e6c03e --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/smile.png diff --git a/examples/declarative/particles/launcherContent/icons/smilefactory.png b/examples/declarative/particles/launcherContent/icons/smilefactory.png Binary files differnew file mode 100644 index 0000000000..78ea52790f --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/smilefactory.png diff --git a/examples/declarative/particles/launcherContent/icons/snow.png b/examples/declarative/particles/launcherContent/icons/snow.png Binary files differnew file mode 100644 index 0000000000..d98e14b8ae --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/snow.png diff --git a/examples/declarative/particles/launcherContent/icons/spaceexplorer.png b/examples/declarative/particles/launcherContent/icons/spaceexplorer.png Binary files differnew file mode 100644 index 0000000000..770584a0fa --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/spaceexplorer.png diff --git a/examples/declarative/particles/launcherContent/icons/spriteparticles.png b/examples/declarative/particles/launcherContent/icons/spriteparticles.png Binary files differnew file mode 100644 index 0000000000..5603964939 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/spriteparticles.png diff --git a/examples/declarative/particles/launcherContent/icons/spritestateparticles.png b/examples/declarative/particles/launcherContent/icons/spritestateparticles.png Binary files differnew file mode 100644 index 0000000000..dd01518ac4 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/spritestateparticles.png diff --git a/examples/declarative/particles/launcherContent/icons/spritevariedparticles.png b/examples/declarative/particles/launcherContent/icons/spritevariedparticles.png Binary files differnew file mode 100644 index 0000000000..495bb6beee --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/spritevariedparticles.png diff --git a/examples/declarative/particles/launcherContent/icons/stream.png b/examples/declarative/particles/launcherContent/icons/stream.png Binary files differnew file mode 100644 index 0000000000..a74f9a0340 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/stream.png diff --git a/examples/declarative/particles/launcherContent/icons/trails.png b/examples/declarative/particles/launcherContent/icons/trails.png Binary files differnew file mode 100644 index 0000000000..0337ebcfd8 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/trails.png diff --git a/examples/declarative/particles/launcherContent/icons/turbulence.png b/examples/declarative/particles/launcherContent/icons/turbulence.png Binary files differnew file mode 100644 index 0000000000..2b9446ea90 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/turbulence.png diff --git a/examples/declarative/particles/launcherContent/icons/ultraparticles.png b/examples/declarative/particles/launcherContent/icons/ultraparticles.png Binary files differnew file mode 100644 index 0000000000..0d87eea427 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/ultraparticles.png diff --git a/examples/declarative/particles/launcherContent/icons/velocityfrommotion.png b/examples/declarative/particles/launcherContent/icons/velocityfrommotion.png Binary files differnew file mode 100644 index 0000000000..79baa08293 --- /dev/null +++ b/examples/declarative/particles/launcherContent/icons/velocityfrommotion.png diff --git a/examples/declarative/particles/launcherContent/launcher.js b/examples/declarative/particles/launcherContent/launcher.js new file mode 100644 index 0000000000..e4fedd30d7 --- /dev/null +++ b/examples/declarative/particles/launcherContent/launcher.js @@ -0,0 +1,8 @@ +function nameFromPath(path){ + var ret = path.split('/'); + return ret[ret.length-1].split('.')[0]; +} +function iconFromPath(path){ + var ret = path.split('/'); + return "launcherContent/icons/" + ret[ret.length-1].split('.')[0] + ".png"; +} |