summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/rect
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-26 06:03:37 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-28 23:50:09 (GMT)
commitd81e74a5d40202ce17d31f71ae953a19ed7191dd (patch)
tree80bfb6e9d064f19e25038f6ac5990385abeecb5f /tests/auto/declarative/qmlvisual/rect
parentfbcf257f0988f1ffef442195acc9f4b4c1527870 (diff)
downloadQt-d81e74a5d40202ce17d31f71ae953a19ed7191dd.zip
Qt-d81e74a5d40202ce17d31f71ae953a19ed7191dd.tar.gz
Qt-d81e74a5d40202ce17d31f71ae953a19ed7191dd.tar.bz2
Rename visual test to qmlvisual.
Diffstat (limited to 'tests/auto/declarative/qmlvisual/rect')
-rw-r--r--tests/auto/declarative/qmlvisual/rect/GradientRect.qml25
-rw-r--r--tests/auto/declarative/qmlvisual/rect/MyRect.qml21
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.pngbin0 -> 29725 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml287
-rw-r--r--tests/auto/declarative/qmlvisual/rect/rect-painting.qml55
5 files changed, 388 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
new file mode 100644
index 0000000..1d3ec98
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+Item {
+ id: rect
+ property color color
+ property color border : Qt.rgba(0,0,0,0)
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 80; height: 80
+ Item {
+ anchors.centerIn: parent; rotation: rect.rotation;
+ Rectangle {
+ anchors.centerIn: parent; width: 80; height: 80
+ border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
+ radius: rect.radius; smooth: rect.smooth
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: rect.color }
+ GradientStop { position: 1.0; color: "white" }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/rect/MyRect.qml b/tests/auto/declarative/qmlvisual/rect/MyRect.qml
new file mode 100644
index 0000000..22e0948
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/MyRect.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+Item {
+ id: rect
+ property color color
+ property color border : Qt.rgba(0,0,0,0)
+ property int rotation
+ property int radius
+ property int borderWidth
+ property bool smooth: false
+
+ width: 80; height: 80
+ Item {
+ anchors.centerIn: parent; rotation: rect.rotation;
+ Rectangle {
+ anchors.centerIn: parent; width: 80; height: 80
+ color: rect.color; border.color: rect.border; border.width: rect.border != Qt.rgba(0,0,0,0) ? 2 : 0
+ radius: rect.radius; smooth: rect.smooth
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png
new file mode 100644
index 0000000..3b7970d
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml
new file mode 100644
index 0000000..52acadf
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.qml
@@ -0,0 +1,287 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 32
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 48
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 64
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 80
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 96
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 112
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 128
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 144
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 160
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 176
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 192
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 208
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 224
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 240
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 256
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 272
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 288
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 304
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 320
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 336
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 352
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 368
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 384
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 400
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 416
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 432
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 448
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 464
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 480
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 496
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 512
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 528
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 544
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 560
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 576
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 592
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 608
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 624
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 640
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 656
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 672
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 688
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 704
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 720
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 736
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 752
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 768
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 784
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 800
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 816
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 832
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 848
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 864
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 880
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 0
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 896
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 912
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 928
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 944
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 960
+ image: "rect-painting.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 992
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1008
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1024
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1040
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1056
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1072
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+ Frame {
+ msec: 1088
+ hash: "79998980caccd4eb479fbd9f2a13c860"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/rect/rect-painting.qml b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml
new file mode 100644
index 0000000..93beeec
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+
+Rectangle {
+ width: 900; height: 500
+ color: "white"
+
+ Rectangle {
+ anchors.top: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ color: "#eeeeee"
+ }
+
+ Grid {
+ anchors.centerIn: parent
+ columns: 8; rows:4; spacing: 30
+
+ MyRect { color: "lightsteelblue" }
+ MyRect { color: "lightsteelblue"; border: "gray" }
+ MyRect { color: "lightsteelblue"; radius: 10 }
+ MyRect { color: "lightsteelblue"; radius: 10; border: "gray" }
+ GradientRect { color: "lightsteelblue" }
+ GradientRect { color: "lightsteelblue"; border: "gray" }
+ GradientRect { color: "lightsteelblue"; radius: 10 }
+ GradientRect { color: "lightsteelblue"; radius: 10; border: "gray" }
+
+ MyRect { color: "thistle"; rotation: 10 }
+ MyRect { color: "thistle"; border: "gray"; rotation: 10 }
+ MyRect { color: "thistle"; radius: 10; rotation: 10 }
+ MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 }
+ GradientRect { color: "thistle"; rotation: 10 }
+ GradientRect { color: "thistle"; border: "gray"; rotation: 10 }
+ GradientRect { color: "thistle"; radius: 10; rotation: 10 }
+ GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 }
+
+ MyRect { color: "lightsteelblue"; smooth: true }
+ MyRect { color: "lightsteelblue"; border: "gray"; smooth: true }
+ MyRect { color: "lightsteelblue"; radius: 10; smooth: true }
+ MyRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true }
+ GradientRect { color: "lightsteelblue"; smooth: true }
+ GradientRect { color: "lightsteelblue"; border: "gray"; smooth: true }
+ GradientRect { color: "lightsteelblue"; radius: 10; smooth: true }
+ GradientRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true }
+
+ MyRect { color: "thistle"; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; radius: 10; rotation: 10; smooth: true }
+ MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; radius: 10; rotation: 10; smooth: true }
+ GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true }
+ }
+}