diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativepositioners/data')
11 files changed, 384 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml new file mode 100644 index 0000000..f6376a1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml @@ -0,0 +1,60 @@ +import Qt 4.6 + +Item { + width: 640 + height: 480 + Grid { + columns: 3 + add: Transition { + NumberAnimation { + properties: "x,y"; + } + } + move: Transition { + NumberAnimation { + properties: "x,y"; + } + } + Rectangle { + objectName: "one" + color: "red" + x: -100 + y: -100 + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + x: -100 + y: -100 + opacity: 0 + color: "green" + width: 50 + height: 50 + } + Rectangle { + objectName: "three" + color: "blue" + x: -100 + y: -100 + width: 50 + height: 50 + } + Rectangle { + objectName: "four" + color: "cyan" + x: -100 + y: -100 + width: 50 + height: 50 + } + Rectangle { + objectName: "five" + color: "magenta" + x: -100 + y: -100 + width: 50 + height: 50 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml new file mode 100644 index 0000000..5b4a30d --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/grid.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid.qml new file mode 100644 index 0000000..830df6a --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/horizontal-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml new file mode 100644 index 0000000..c113a36 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml @@ -0,0 +1,40 @@ +import Qt 4.6 + +Item { + width: 640 + height: 480 + Row { + add: Transition { + NumberAnimation { + properties: "x"; + } + } + move: Transition { + NumberAnimation { + properties: "x"; + } + } + Rectangle { + objectName: "one" + color: "red" + x: -100; + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + color: "blue" + x: -100; + opacity: 0 + width: 50 + height: 50 + } + Rectangle { + objectName: "three" + x: -100; + color: "green" + width: 50 + height: 50 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml new file mode 100644 index 0000000..32bf775 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/horizontal.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml new file mode 100644 index 0000000..06ae151 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml new file mode 100644 index 0000000..4370a18 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/propertychanges.qml @@ -0,0 +1,39 @@ +import Qt 4.6 + +Grid { + id: myGrid + + width: 270 + height: 270 + x: 3 + y: 3 + columns: 4 + spacing: 3 + + add: columnTransition + move: columnTransition + + Repeater { + model: 20 + Rectangle { color: "black"; width: 50; height: 50 } + } + + data: [ + Transition { + id: rowTransition + objectName: "rowTransition" + NumberAnimation { + properties: "x,y"; + easing.type: "OutInCubic" + } + }, + Transition { + id: columnTransition + objectName: "columnTransition" + NumberAnimation { + properties: "x,y"; + easing.type: "OutInCubic" + } + } + ] +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeater.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeater.qml new file mode 100644 index 0000000..2bc5e94 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/vertical-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml new file mode 100644 index 0000000..10f6cbb --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml @@ -0,0 +1,40 @@ +import Qt 4.6 + +Item { + width: 640 + height: 480 + Column { + add: Transition { + NumberAnimation { + properties: "y"; + } + } + move: Transition { + NumberAnimation { + properties: "y"; + } + } + Rectangle { + objectName: "one" + color: "red" + y: -100 + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + color: "blue" + y: -100 + opacity: 0 + width: 50 + height: 50 + } + Rectangle { + objectName: "three" + color: "red" + y: -100 + width: 50 + height: 50 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml new file mode 100644 index 0000000..69a8256 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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/qdeclarativepositioners/data/vertical.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml new file mode 100644 index 0000000..856c180 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/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 + } + } +} |