1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: http://www.qt-project.org/
7 ** This file is part of the test suite of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
43 import QtQuick.Particles 2.0
46 id: affectorelementtest
48 property string testtext: ""
56 source: "pics/star.png"
58 entryEffect: ImageParticle.None
68 GradientStop { position: 0.0; color: "lightgray" }
69 GradientStop { position: 1.0; color: "gray" }
75 anchors.left: pipe.right
76 anchors.verticalCenter: pipe.verticalCenter
79 GradientStop { position: 0.0; color: "lightgray" }
80 GradientStop { position: 1.0; color: "gray" }
87 anchors.left: pipe.left
88 anchors.leftMargin: 10
89 anchors.bottom: pipe.bottom
90 anchors.bottomMargin: 8
94 speed: AngleDirection { angle: 0; magnitude: 30 }
100 x: pipe.width; y: pipe.y-100
103 width: parent.width - pipe.width
110 anchors.verticalCenter: pipe.verticalCenter
111 anchors.left: pipe.right
122 anchors.bottom: parent.bottom
123 anchors.bottomMargin: 100
124 width: parent.width; height: 100
128 anchors.bottom: parent.bottom; width: parent.width; height: 100
134 anchors.bottom: parent.bottom; width: 360; height: 5
139 SystemTestHelp { id: helpbubble; visible: statenum != 0
140 anchors { top: parent.top; horizontalCenter: parent.horizontalCenter; topMargin: 50 }
142 BugPanel { id: bugpanel }
145 State { name: "start"; when: statenum == 1
146 PropertyChanges { target: affectorelementtest
147 testtext: "This is a group of currently disabled Affector elements. "+
148 "A blue stream of particles should be flowing from a block to the left.\n"+
149 "Next, let's add some variance in direction when the particles leave the block." }
151 State { name: "spread"; when: statenum == 2
152 PropertyChanges { target: wander; enabled: true }
153 PropertyChanges { target: affectorelementtest
154 testtext: "The particles should be spreading out as they progress.\n"+
155 "Next, let's introduce gravity." }
157 State { name: "gravity"; when: statenum == 3
158 PropertyChanges { target: wander; enabled: true }
159 PropertyChanges { target: gravity; enabled: true }
160 PropertyChanges { target: affectorelementtest
161 testtext: "The particles should now be dropping.\n"+
162 "Also, no particles should be visible below the bounds of the application, "+
163 "i.e. the white panel.\n"+
164 "Next, let's introduce some friction at the bottom of the display." }
166 State { name: "friction"; when: statenum == 4
167 PropertyChanges { target: wander; enabled: true }
168 PropertyChanges { target: gravity; enabled: true }
169 PropertyChanges { target: friction; enabled: true }
170 PropertyChanges { target: affectorelementtest
171 testtext: "The particles should now be decelerating suddenly at the bottom.\n"+
172 "Next, let's add some turbulence to the flow." }
174 State { name: "turbulence"; when: statenum == 5
175 PropertyChanges { target: wander; enabled: true }
176 PropertyChanges { target: gravity; enabled: true }
177 PropertyChanges { target: friction; enabled: true }
178 PropertyChanges { target: turbulence; enabled: true }
179 PropertyChanges { target: affectorelementtest
180 testtext: "The particles should now be turbulent.\n"+
181 "Advance to restart the test." }