summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlgraphicspositioners/data
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-09 03:27:49 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-09 03:27:49 (GMT)
commit1424d6be3691bafc980693c01532938dc4a640a6 (patch)
treeb3a94c161495fdf9e9a7ae82c2b34fb5bfad7d50 /tests/auto/declarative/qmlgraphicspositioners/data
parent3ceeb87db6b6f7beeffe9df0417bd076fa72eece (diff)
downloadQt-1424d6be3691bafc980693c01532938dc4a640a6.zip
Qt-1424d6be3691bafc980693c01532938dc4a640a6.tar.gz
Qt-1424d6be3691bafc980693c01532938dc4a640a6.tar.bz2
Split out layout and positioner tests
Includes actually adding some layout tests (which seem to expose bugs in the layouts).
Diffstat (limited to 'tests/auto/declarative/qmlgraphicspositioners/data')
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/grid-animated.qml55
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/grid-spacing.qml40
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/grid.qml39
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/horizontal-animated.qml42
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/horizontal-spacing.qml27
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/horizontal.qml26
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/repeater.qml20
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/vertical-animated.qml42
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/vertical-spacing.qml27
-rw-r--r--tests/auto/declarative/qmlgraphicspositioners/data/vertical.qml26
10 files changed, 344 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/grid-animated.qml b/tests/auto/declarative/qmlgraphicspositioners/data/grid-animated.qml
new file mode 100644
index 0000000..6b128ce
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/grid-animated.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ add: Transition {
+ NumberAnimation {
+ matchProperties: "x,y"; from: -100
+ }
+ }
+ remove: Transition {
+ NumberAnimation {
+ matchProperties: "x,y"; to: -100
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ matchProperties: "x,y";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ opacity: 0
+ color: "green"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/grid-spacing.qml b/tests/auto/declarative/qmlgraphicspositioners/data/grid-spacing.qml
new file mode 100644
index 0000000..5b4a30d
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/grid-spacing.qml
@@ -0,0 +1,40 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ spacing: 4
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/grid.qml b/tests/auto/declarative/qmlgraphicspositioners/data/grid.qml
new file mode 100644
index 0000000..830df6a
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/grid.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Grid {
+ columns: 3
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "green"
+ width: 20
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "blue"
+ width: 50
+ height: 20
+ }
+ Rectangle {
+ objectName: "four"
+ color: "cyan"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "five"
+ color: "magenta"
+ width: 10
+ height: 10
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-animated.qml b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-animated.qml
new file mode 100644
index 0000000..c29d6df
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-animated.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ add: Transition {
+ NumberAnimation {
+ matchProperties: "x"; from: -100
+ }
+ }
+ remove: Transition {
+ NumberAnimation {
+ matchProperties: "x"; to: -100
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ matchProperties: "x";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "blue"
+ opacity: 0
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-spacing.qml
new file mode 100644
index 0000000..32bf775
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal-spacing.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ spacing: 10
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/horizontal.qml b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal.qml
new file mode 100644
index 0000000..06ae151
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/horizontal.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/repeater.qml b/tests/auto/declarative/qmlgraphicspositioners/data/repeater.qml
new file mode 100644
index 0000000..2bc5e94
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/repeater.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Row {
+ Repeater{ model: 3;
+ delegate: Component {
+ Rectangle {
+ color: "red"
+ width: 50
+ height: 50
+ z: {if(index == 0){2;}else if(index == 1){1;} else{3;}}
+ objectName: {if(index == 0){"one";}else if(index == 1){"two";} else{"three";}}
+
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/vertical-animated.qml b/tests/auto/declarative/qmlgraphicspositioners/data/vertical-animated.qml
new file mode 100644
index 0000000..fcbc5f7
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/vertical-animated.qml
@@ -0,0 +1,42 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ add: Transition {
+ NumberAnimation {
+ matchProperties: "y"; from: -100
+ }
+ }
+ remove: Transition {
+ NumberAnimation {
+ matchProperties: "y"; to: -100
+ }
+ }
+ move: Transition {
+ NumberAnimation {
+ matchProperties: "y";
+ }
+ }
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "blue"
+ opacity: 0
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/vertical-spacing.qml b/tests/auto/declarative/qmlgraphicspositioners/data/vertical-spacing.qml
new file mode 100644
index 0000000..69a8256
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/vertical-spacing.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ spacing: 10
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlgraphicspositioners/data/vertical.qml b/tests/auto/declarative/qmlgraphicspositioners/data/vertical.qml
new file mode 100644
index 0000000..856c180
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicspositioners/data/vertical.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ width: 640
+ height: 480
+ Column {
+ Rectangle {
+ objectName: "one"
+ color: "red"
+ width: 50
+ height: 50
+ }
+ Rectangle {
+ objectName: "two"
+ color: "red"
+ width: 20
+ height: 10
+ }
+ Rectangle {
+ objectName: "three"
+ color: "red"
+ width: 40
+ height: 20
+ }
+ }
+}