diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-05-31 15:25:44 +1000 |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-05-31 15:25:44 +1000 |
commit | 766521d62a4cf4598326a510186b080a91bde6dd (patch) | |
tree | 5cf89c1338f42122c370c649b73c8193ca079268 /examples/declarative/particles/allsmiles | |
parent | a91b8a041966f8aea4bf01fdcb1d5006547f3902 (diff) | |
parent | e7fef9d6115d1a9193c112d8fd4249ae9396dae3 (diff) |
Merge branch 'qtquick2'
Conflicts:
demos/declarative/flickr/common/Progress.qml
demos/declarative/flickr/common/RssModel.qml
demos/declarative/flickr/common/ScrollBar.qml
demos/declarative/flickr/common/Slider.qml
demos/declarative/flickr/mobile/Button.qml
demos/declarative/flickr/mobile/GridDelegate.qml
demos/declarative/flickr/mobile/ImageDetails.qml
demos/declarative/flickr/mobile/ListDelegate.qml
demos/declarative/flickr/mobile/TitleBar.qml
demos/declarative/flickr/mobile/ToolBar.qml
demos/declarative/webbrowser/content/Button.qml
demos/declarative/webbrowser/content/FlickableWebView.qml
demos/declarative/webbrowser/content/Header.qml
demos/declarative/webbrowser/content/ScrollBar.qml
demos/declarative/webbrowser/content/UrlInput.qml
demos/declarative/webbrowser/webbrowser.qml
doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
examples/declarative/modelviews/webview/newwindows/qml/alerts.html
examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/map.html
examples/declarative/modelviews/webview/newwindows/qml/content/pics/cancel.png
examples/declarative/modelviews/webview/newwindows/qml/content/pics/ok.png
examples/declarative/modelviews/webview/newwindows/qml/newwindows.html
src/declarative/graphicsitems/qdeclarativetextinput.cpp
src/declarative/qml/qdeclarativecompiledbindings.cpp
src/declarative/qml/qdeclarativecompiledbindings_p.h
src/declarative/qml/qdeclarativedom.cpp
src/declarative/qml/qdeclarativedom_p.h
src/declarative/qml/qdeclarativedom_p_p.h
src/declarative/qml/qdeclarativeengine.cpp
src/declarative/qml/qdeclarativetypeloader.cpp
src/imports/particles/particles.cpp
tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png
tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png
tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png
tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png
tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png
tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png
tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png
tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png
tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png
tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png
tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png
tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png
tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png
tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
Change-Id: I40df8a9403a58a6c03a0f1734f16a5cbed6c85ff
Diffstat (limited to 'examples/declarative/particles/allsmiles')
22 files changed, 714 insertions, 0 deletions
diff --git a/examples/declarative/particles/allsmiles/content/particle.png b/examples/declarative/particles/allsmiles/content/particle.png Binary files differnew file mode 100644 index 0000000000..5c83896d22 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/particle.png diff --git a/examples/declarative/particles/allsmiles/content/singlesmile.png b/examples/declarative/particles/allsmiles/content/singlesmile.png Binary files differnew file mode 100644 index 0000000000..4087fa6b7f --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/singlesmile.png diff --git a/examples/declarative/particles/allsmiles/content/sizeInOut.png b/examples/declarative/particles/allsmiles/content/sizeInOut.png Binary files differnew file mode 100644 index 0000000000..0a306ea21a --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/sizeInOut.png diff --git a/examples/declarative/particles/allsmiles/content/smileMask.png b/examples/declarative/particles/allsmiles/content/smileMask.png Binary files differnew file mode 100644 index 0000000000..65a0143e9e --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/smileMask.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite.png b/examples/declarative/particles/allsmiles/content/squarefacesprite.png Binary files differnew file mode 100644 index 0000000000..f9a5d5fcce --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite2.png b/examples/declarative/particles/allsmiles/content/squarefacesprite2.png Binary files differnew file mode 100644 index 0000000000..7106a520a4 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite2.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite3.png b/examples/declarative/particles/allsmiles/content/squarefacesprite3.png Binary files differnew file mode 100644 index 0000000000..f4e6f26856 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite3.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite4.png b/examples/declarative/particles/allsmiles/content/squarefacesprite4.png Binary files differnew file mode 100644 index 0000000000..1e094eed4a --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite4.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite5.png b/examples/declarative/particles/allsmiles/content/squarefacesprite5.png Binary files differnew file mode 100644 index 0000000000..1cfc5c7f8c --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite5.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite6.png b/examples/declarative/particles/allsmiles/content/squarefacesprite6.png Binary files differnew file mode 100644 index 0000000000..b040139a9e --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite6.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacesprite7.png b/examples/declarative/particles/allsmiles/content/squarefacesprite7.png Binary files differnew file mode 100644 index 0000000000..b1e5e4e339 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacesprite7.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacespriteX.png b/examples/declarative/particles/allsmiles/content/squarefacespriteX.png Binary files differnew file mode 100644 index 0000000000..93a0181dd0 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacespriteX.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacespriteXX.png b/examples/declarative/particles/allsmiles/content/squarefacespriteXX.png Binary files differnew file mode 100644 index 0000000000..3159efe246 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacespriteXX.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacewhite.png b/examples/declarative/particles/allsmiles/content/squarefacewhite.png Binary files differnew file mode 100644 index 0000000000..02259c5762 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacewhite.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacewhiteX.png b/examples/declarative/particles/allsmiles/content/squarefacewhiteX.png Binary files differnew file mode 100644 index 0000000000..59af205c6b --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacewhiteX.png diff --git a/examples/declarative/particles/allsmiles/content/squarefacewhiteXX.png b/examples/declarative/particles/allsmiles/content/squarefacewhiteXX.png Binary files differnew file mode 100644 index 0000000000..b0f15c6785 --- /dev/null +++ b/examples/declarative/particles/allsmiles/content/squarefacewhiteXX.png diff --git a/examples/declarative/particles/allsmiles/smile.qml b/examples/declarative/particles/allsmiles/smile.qml new file mode 100644 index 0000000000..e37e8fa98e --- /dev/null +++ b/examples/declarative/particles/allsmiles/smile.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "white" + width: 310 + height: 300 + ParticleSystem{ id: sys } + Picture{ + system: sys + anchors.fill: parent + image: "content/singlesmile.png" + onceOff: true + } + ColoredParticle{ + system: sys + image: "content/particle.png" + color: "black" + alpha: 0.4 + sizeTable: "content/sizeInOut.png" + } + TrailEmitter{ + id: emitter + system: sys + emitting: false + particleDuration: 4000 + maxParticles: 1200 + anchors.fill: parent + particleSize: 32 + speed: PointVector{ xVariation: 12; yVariation: 12 } + } + MouseArea{ + anchors.fill: parent + onClicked: emitter.burst(1200); + } +} + diff --git a/examples/declarative/particles/allsmiles/smilefactory.qml b/examples/declarative/particles/allsmiles/smilefactory.qml new file mode 100644 index 0000000000..47becb50fe --- /dev/null +++ b/examples/declarative/particles/allsmiles/smilefactory.qml @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "goldenrod" + width: 400 + height: 400 + ParticleSystem{id:sys} + DeformableParticle{ + system: sys + particles: ["goingLeft", "goingRight"] + image: "content/singlesmile.png" + rotation: 90 + rotationSpeed: 90 + autoRotation: true + } + DeformableParticle{ + system: sys + particles: ["goingDown"] + image: "content/squarefacespriteXX.png" + rotation: 180 + yVector: PointVector{ y: 0.5; yVariation: 0.25; xVariation: 0.25; } + } + Timer{ + running: true + repeat: false + interval: 100 + onTriggered: emitA.emitting = true; + } + Timer{ + running: true + repeat: false + interval: 4200 + onTriggered: emitB.emitting = true; + } + Timer{ + running: true + repeat: false + interval: 8400 + onTriggered: emitC.emitting = true; + } + TrailEmitter{ + id: emitA + x: 0 + y: 120 + system: sys + emitting: false + particle: "goingRight" + speed: PointVector{ x: 100 } + particleDuration: 4000 + particlesPerSecond: 2 + particleSize: 32 + } + TrailEmitter{ + id: emitB + x: 400 + y: 240 + system: sys + emitting: false + particle: "goingLeft" + speed: PointVector{ x: -100 } + particleDuration: 4000 + particlesPerSecond: 2 + particleSize: 32 + } + TrailEmitter{ + id: emitC + x: 0 + y: 360 + system: sys + emitting: false + particle: "goingDown" + speed: PointVector{ x: 100 } + particleDuration: 4000 + particlesPerSecond: 2 + particleSize: 32 + } +} diff --git a/examples/declarative/particles/allsmiles/spriteparticles.qml b/examples/declarative/particles/allsmiles/spriteparticles.qml new file mode 100644 index 0000000000..4bcb7081b8 --- /dev/null +++ b/examples/declarative/particles/allsmiles/spriteparticles.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "goldenrod" + width: 400 + height: 400 + ColoredParticle{ + id: test + particles: ["Test"] + image: "content/particle.png" + system: sys + z: 2 + anchors.fill: parent + color: "#336666CC" + colorVariation: 0.0 + } + SpriteParticle{ + id: single + particles: ["Face"] + system: sys + z: 2 + anchors.fill: parent + Sprite{ + source: "content/squarefacesprite.png" + frames: 6 + duration: 120 + } + } + Mask{ + id: mask + source: "content/smileMask.png" + } + TrailEmitter{ + system: sys + particle: "Test" + anchors.fill: parent + id: particles2 + particlesPerSecond: 6000 + particleDuration: 720 + emitting: true + particleSize: 10 + shape: mask + } + TrailEmitter{ + system: sys + particle: "Face" + anchors.fill: parent + id: particles + particlesPerSecond: 60 + particleDuration: 1440 + emitting: true + speed: PointVector{xVariation: 10; yVariation: 10;} + particleSize: 30 + particleSizeVariation: 10 + shape: mask + } + ParticleSystem{ + id: sys + anchors.fill: parent + } + +} diff --git a/examples/declarative/particles/allsmiles/spritestateparticles.qml b/examples/declarative/particles/allsmiles/spritestateparticles.qml new file mode 100644 index 0000000000..6a61487a89 --- /dev/null +++ b/examples/declarative/particles/allsmiles/spritestateparticles.qml @@ -0,0 +1,190 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "goldenrod" + width: 800 + height: 800 + id: root + SpriteImage{ + sprites: [Sprite{ + name: "happy" + source: "content/squarefacesprite2.png" + frames: 6 + duration: 120 + to: {"silly": 0.4, "sad": 0.2, "cyclops":0.1, "boggled":0.3, "dying":0.0} + }, Sprite{ + name: "silly" + source: "content/squarefacesprite.png" + frames: 6 + duration: 120 + to: {"love": 0.4, "happy": 0.1, "evil": 0.2, "cyclops":0.1, "boggled":0.2} + }, Sprite{ + name: "sad" + source: "content/squarefacesprite3.png" + frames: 6 + duration: 120 + to: {"love" : 0.2, "evil": 0.2, "silly": 0.2, "cyclops":0.2, "boggled":0.2} + }, Sprite{ + name: "cyclops" + source: "content/squarefacesprite4.png" + frames: 6 + duration: 120 + to: {"love": 0.1, "evil": 0.1, "silly":0.1, "boggled":0.1, "cyclops" : 1.0} + }, Sprite{ + name: "evil" + source: "content/squarefacesprite5.png" + frames: 6 + duration: 120 + to: {"happy": 1.0} + }, Sprite{ + name: "love" + source: "content/squarefacesprite6.png" + frames: 6 + duration: 120 + to: {"sad": 0.6, "evil":0.4, "boggled":0.2} + }, Sprite{ + name: "boggled" + source: "content/squarefacesprite7.png" + frames: 6 + duration: 120 + to: {"love" : 0.2, "evil": 0.2, "silly": 0.2, "cyclops":0.1, "sad":0.2} + }, Sprite{ + name: "dying" + source: "content/squarefacespriteX.png" + frames: 4 + duration: 120 + to: {"dead":1.0} + }, Sprite{ + name: "dead" + source: "content/squarefacespriteXX.png" + frames: 1 + duration: 10000 + }] + + width: 100 + height: 100 + x: 20 + y: 20 + z:4 + } + ParticleSystem{ id: sys } + SpriteParticle{ + anchors.fill: parent + id: particles + system: sys + sprites: [Sprite{ + name: "happy" + source: "content/squarefacesprite2.png" + frames: 6 + duration: 120 + to: {"silly": 0.4, "sad": 0.2, "cyclops":0.1, "boggled":0.3, "dying":0.0} + }, Sprite{ + name: "silly" + source: "content/squarefacesprite.png" + frames: 6 + duration: 120 + to: {"love": 0.4, "happy": 0.1, "evil": 0.2, "cyclops":0.1, "boggled":0.2} + }, Sprite{ + name: "sad" + source: "content/squarefacesprite3.png" + frames: 6 + duration: 120 + to: {"love" : 0.2, "evil": 0.2, "silly": 0.2, "cyclops":0.2, "boggled":0.2} + }, Sprite{ + name: "cyclops" + source: "content/squarefacesprite4.png" + frames: 6 + duration: 120 + to: {"love": 0.1, "evil": 0.1, "silly":0.1, "boggled":0.1, "cyclops" : 1.0} + }, Sprite{ + name: "evil" + source: "content/squarefacesprite5.png" + frames: 6 + duration: 120 + to: {"happy": 1.0} + }, Sprite{ + name: "love" + source: "content/squarefacesprite6.png" + frames: 6 + duration: 120 + to: {"sad": 0.6, "evil":0.4, "boggled":0.2} + }, Sprite{ + name: "boggled" + source: "content/squarefacesprite7.png" + frames: 6 + duration: 120 + to: {"love" : 0.2, "evil": 0.2, "silly": 0.2, "cyclops":0.1, "sad":0.2} + }, Sprite{ + name: "dying" + source: "content/squarefacespriteX.png" + frames: 4 + duration: 120 + to: {"dead":1.0} + }, Sprite{ + name: "dead" + source: "content/squarefacespriteXX.png" + frames: 1 + duration: 10000 + }] + } + TrailEmitter{ + system: sys + particlesPerSecond: 16 + particleDuration: 10000 + emitting: true + speed: AngleVector{angle: 90; magnitude: 60; angleVariation: 5} + acceleration: PointVector{ y: 10 } + particleSize: 30 + particleSizeVariation: 10 + width: parent.width + height: 100 + } + SpriteGoal{ + system: sys + width: root.width; + height: root.height/2; + y: root.height/2; + goalState:"dead" + } +} diff --git a/examples/declarative/particles/allsmiles/spritevariedparticles.qml b/examples/declarative/particles/allsmiles/spritevariedparticles.qml new file mode 100644 index 0000000000..c1b773093f --- /dev/null +++ b/examples/declarative/particles/allsmiles/spritevariedparticles.qml @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "goldenrod" + width: 800 + height: 800 + ParticleSystem{ id: sys } + SpriteParticle{ + system: sys + anchors.fill: parent + sprites: [Sprite{ + name: "initial" + source: "content/squarefacesprite.png" + frames: 6 + duration: 0 + to: {"happy":0.2, "silly":0.2, "sad":0.2, "cyclops":0.1, "evil":0.1, "love":0.1, "boggled":0.1} + }, Sprite{ + name: "silly" + source: "content/squarefacesprite.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "happy" + source: "content/squarefacesprite2.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "sad" + source: "content/squarefacesprite3.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "cyclops" + source: "content/squarefacesprite4.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "evil" + source: "content/squarefacesprite5.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "love" + source: "content/squarefacesprite6.png" + frames: 6 + duration: 120 + }, Sprite{ + name: "boggled" + source: "content/squarefacesprite7.png" + frames: 6 + duration: 120 + }] + } + TrailEmitter{ + id: particleEmitter + system: sys + width: parent.width + particlesPerSecond: 16 + particleDuration: 8000 + emitting: true + speed: AngleVector{angle: 90; magnitude: 300; magnitudeVariation: 100; angleVariation: 5} + acceleration: PointVector{ y: 10 } + particleSize: 30 + particleSizeVariation: 10 + } + Binding{ + target: particleEmitter + property: "y" + value: ma.mouseY + when: ma.mouseX !=0 || ma.mouseY!=0 + } + MouseArea{ + id: ma + anchors.fill: parent + } +} diff --git a/examples/declarative/particles/allsmiles/ultraparticles.qml b/examples/declarative/particles/allsmiles/ultraparticles.qml new file mode 100644 index 0000000000..85bbdbacd8 --- /dev/null +++ b/examples/declarative/particles/allsmiles/ultraparticles.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** 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 +import Qt.labs.particles 2.0 + +Rectangle{ + color: "white" + width: 640 + height: 480 + ParticleSystem{ + id: sys + } + UltraParticle{ + sprites: [ + Sprite{ + name: "licking" + source: "content/squarefacewhite.png" + frames: 6 + duration: 120 + to: {"dying":1, "licking":5} + }, + Sprite{ + name: "dying" + source: "content/squarefacewhiteX.png" + frames: 4 + duration: 120 + to: {"dead":1} + }, + Sprite{ + name: "dead" + source: "content/squarefacewhiteXX.png" + frames: 1 + duration: 120 + } + ] + colorVariation: 0.5 + rotationSpeedVariation: 360 + system: sys + colorTable: "../trails/content/colortable.png" + } + Friction{ + factor: 0.1 + system: sys + } + TrailEmitter{ + system: sys + anchors.centerIn: parent + id: particles + particlesPerSecond: 200 + particleDuration: 6000 + emitting: true + speed: AngleVector{angleVariation: 360; magnitude: 80; magnitudeVariation: 40} + particleSize: 40 + particleEndSize: 80 + } + Text{ + x: 16 + y: 16 + text: "QML..." + style: Text.Outline; styleColor: "#AAAAAA" + font.pixelSize: 32 + } + Text{ + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.margins: 16 + text: "... can you be trusted with the power?" + style: Text.Outline; styleColor: "#AAAAAA" + font.pixelSize: 32 + } +} |