diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-01-16 13:01:19 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-16 11:24:28 +0100 |
commit | 5290b04325aa66f3f2934c9f143eee71d98a3249 (patch) | |
tree | 192b45d6fce25d1fb9478252fb7e20f2d7a3667a /tests/auto/particles/qquickimageparticle/data | |
parent | 5f730bc3ae4cf18c46e513bf1db055b2d9255fdc (diff) |
Test more of QQuickImageParticle
Now the color variance properties are tested, as is the debug code.
Just running the debugging code is valid testing, as it contains
pointer derefernces that could cause runtime errors, and this codepath
is not always enabled at runtime.
Additionally, debug mode control has been consolidated in the
ParticleSystem. However, this was not necessary for this test addition.
Change-Id: Ie56465145461486456462154dfafe546fedabcba
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/particles/qquickimageparticle/data')
-rw-r--r-- | tests/auto/particles/qquickimageparticle/data/colorVariance.qml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/auto/particles/qquickimageparticle/data/colorVariance.qml b/tests/auto/particles/qquickimageparticle/data/colorVariance.qml new file mode 100644 index 0000000000..d6576d3138 --- /dev/null +++ b/tests/auto/particles/qquickimageparticle/data/colorVariance.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia 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. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Rectangle { + color: "black" + width: 320 + height: 320 + + ParticleSystem { + id: sys + objectName: "system" + anchors.fill: parent + + ImageParticle { + source: "../../shared/star.png" + alpha: 0.5 + color: "#000000" + redVariation: 0.5 + greenVariation: 0.25 + blueVariation: 0.125 + alphaVariation: 0.25 + } + + Emitter{ + //0,0 position + size: 32 + emitRate: 1000 + lifeSpan: 500 + } + } +} |