diff options
author | Qt by Nokia <qt-info@nokia.com> | 2011-04-27 14:13:26 +0200 |
---|---|---|
committer | axis <qt-info@nokia.com> | 2011-04-27 14:40:44 +0200 |
commit | a129444bb0156c936900dbd2f12bd9f427ff366c (patch) | |
tree | e2e8e77f185d5a5ac32ea0a96cd9945c742e8663 /tests/auto/declarative/qsgflickable/data | |
parent | 885735d011472bcfbb96e688d9e64553d7fe9d4b (diff) |
Initial import from qtquick2.
Branched from the monolithic repo, Qt qtquick2 branch, at commit
a4a585d2ee907746682846ae6e8a48e19deef469
Diffstat (limited to 'tests/auto/declarative/qsgflickable/data')
9 files changed, 154 insertions, 0 deletions
diff --git a/tests/auto/declarative/qsgflickable/data/disabledcontent.qml b/tests/auto/declarative/qsgflickable/data/disabledcontent.qml new file mode 100644 index 0000000000..f02f08e4ea --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/disabledcontent.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +Flickable { + width: 100; height: 100 + contentWidth: 200; contentHeight: 300 + + QGraphicsWidget { width: 200; height: 300; enabled: false } +} diff --git a/tests/auto/declarative/qsgflickable/data/flickable01.qml b/tests/auto/declarative/qsgflickable/data/flickable01.qml new file mode 100644 index 0000000000..cbec44bb4f --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/flickable01.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +Flickable { +} diff --git a/tests/auto/declarative/qsgflickable/data/flickable02.qml b/tests/auto/declarative/qsgflickable/data/flickable02.qml new file mode 100644 index 0000000000..80caa32da5 --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/flickable02.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +Flickable { + width: 100; height: 100 + contentWidth: row.width; contentHeight: row.height + + Row { + id: row + Repeater { + model: 4 + Rectangle { width: 200; height: 300; color: "blue" } + } + } +} diff --git a/tests/auto/declarative/qsgflickable/data/flickable03.qml b/tests/auto/declarative/qsgflickable/data/flickable03.qml new file mode 100644 index 0000000000..e34b63b6ac --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/flickable03.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +Flickable { + width: 100; height: 100 + contentWidth: column.width; contentHeight: column.height + + Column { + id: column + Repeater { + model: 4 + Rectangle { width: 200; height: 300; color: "blue" } + } + } +} diff --git a/tests/auto/declarative/qsgflickable/data/flickable04.qml b/tests/auto/declarative/qsgflickable/data/flickable04.qml new file mode 100644 index 0000000000..b2f30b84ec --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/flickable04.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 + +Flickable { + property bool ok: false + function check() { + if (column.parent == contentItem) + ok = true; + } + + width: 100; height: 100 + contentWidth: column.width; contentHeight: column.height + pressDelay: 200; boundsBehavior: Flickable.StopAtBounds; interactive: false + maximumFlickVelocity: 2000 + + Column { + id: column + Repeater { + model: 4 + Rectangle { width: 200; height: 300; color: "blue" } + } + } +} diff --git a/tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml b/tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml new file mode 100644 index 0000000000..bb8f1eefc6 --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Flickable { + width: 100; height: 100 + + QGraphicsWidget { objectName: "widget1"; width: 200; height: 300 } +} diff --git a/tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml b/tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml new file mode 100644 index 0000000000..60dadcc73c --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml @@ -0,0 +1,33 @@ +import QtQuick 2.0 + +Flickable { + property bool pressed: ma.pressed + width: 240 + height: 320 + contentWidth: 480 + contentHeight: 320 + flickableDirection: Flickable.HorizontalFlick + pressDelay: 50 + Flickable { + objectName: "innerFlickable" + flickableDirection: Flickable.VerticalFlick + width: 480 + height: 320 + contentWidth: 480 + contentHeight: 400 + pressDelay: 10000 + Rectangle { + y: 100 + anchors.horizontalCenter: parent.horizontalCenter + width: 240 + height: 100 + color: ma.pressed ? 'blue' : 'green' + MouseArea { + id: ma + objectName: "mouseArea" + anchors.fill: parent + } + } + } +} + diff --git a/tests/auto/declarative/qsgflickable/data/resize.qml b/tests/auto/declarative/qsgflickable/data/resize.qml new file mode 100644 index 0000000000..1a9ef54107 --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/resize.qml @@ -0,0 +1,27 @@ +import QtQuick 2.0 + +Rectangle { + function resizeContent() { + flick.resizeContent(600, 600, Qt.point(100, 100)) + } + function returnToBounds() { + flick.returnToBounds() + } + width: 400 + height: 360 + color: "gray" + + Flickable { + id: flick + objectName: "flick" + anchors.fill: parent + contentWidth: 300 + contentHeight: 300 + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "red" + } + } +} diff --git a/tests/auto/declarative/qsgflickable/data/wheel.qml b/tests/auto/declarative/qsgflickable/data/wheel.qml new file mode 100644 index 0000000000..2928bbcd72 --- /dev/null +++ b/tests/auto/declarative/qsgflickable/data/wheel.qml @@ -0,0 +1,25 @@ +import QtQuick 2.0 + +Rectangle { + width: 400 + height: 400 + color: "gray" + + Flickable { + id: flick + objectName: "flick" + anchors.fill: parent + contentWidth: 800 + contentHeight: 800 + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "red" + Rectangle { + width: 50; height: 50; color: "blue" + anchors.centerIn: parent + } + } + } +} |