diff options
Diffstat (limited to 'tests/auto/quick/qquickflickable/data')
10 files changed, 195 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/data/disabled.qml b/tests/auto/quick/qquickflickable/data/disabled.qml new file mode 100644 index 0000000000..9b679827c7 --- /dev/null +++ b/tests/auto/quick/qquickflickable/data/disabled.qml @@ -0,0 +1,30 @@ +import QtQuick 2.0 + +Rectangle { + id: root + width: 100; height: 100 + property bool clicked: false + + Flickable { + objectName: "flickable" + width: 100; height: 100 + contentWidth: column.width; contentHeight: column.height + enabled: false + + Column { + id: column + Repeater { + model: 4 + Rectangle { + width: 200; height: 300; color: "blue" + MouseArea { anchors.fill: parent; onClicked: { } } + } + } + } + } + + MouseArea { + width: 100; height: 30 + onClicked: root.clicked = true + } +} diff --git a/tests/auto/quick/qquickflickable/data/flickable01.qml b/tests/auto/quick/qquickflickable/data/flickable01.qml new file mode 100644 index 0000000000..cbec44bb4f --- /dev/null +++ b/tests/auto/quick/qquickflickable/data/flickable01.qml @@ -0,0 +1,4 @@ +import QtQuick 2.0 + +Flickable { +} diff --git a/tests/auto/quick/qquickflickable/data/flickable02.qml b/tests/auto/quick/qquickflickable/data/flickable02.qml new file mode 100644 index 0000000000..80caa32da5 --- /dev/null +++ b/tests/auto/quick/qquickflickable/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/quick/qquickflickable/data/flickable03.qml b/tests/auto/quick/qquickflickable/data/flickable03.qml new file mode 100644 index 0000000000..719c682ee6 --- /dev/null +++ b/tests/auto/quick/qquickflickable/data/flickable03.qml @@ -0,0 +1,14 @@ +import QtQuick 2.0 + +Flickable { + width: 100; height: 400 + contentWidth: column.width; contentHeight: column.height + + Column { + id: column + Repeater { + model: 20 + Rectangle { width: 200; height: 300; color: "blue" } + } + } +} diff --git a/tests/auto/quick/qquickflickable/data/flickable04.qml b/tests/auto/quick/qquickflickable/data/flickable04.qml new file mode 100644 index 0000000000..b2f30b84ec --- /dev/null +++ b/tests/auto/quick/qquickflickable/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/quick/qquickflickable/data/flickableqgraphicswidget.qml b/tests/auto/quick/qquickflickable/data/flickableqgraphicswidget.qml new file mode 100644 index 0000000000..bb8f1eefc6 --- /dev/null +++ b/tests/auto/quick/qquickflickable/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/quick/qquickflickable/data/margins.qml b/tests/auto/quick/qquickflickable/data/margins.qml new file mode 100644 index 0000000000..4866bd8301 --- /dev/null +++ b/tests/auto/quick/qquickflickable/data/margins.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 + +Flickable { + width: 200; height: 200 + contentWidth: row.width; contentHeight: row.height + + topMargin: 20 + bottomMargin: 30 + leftMargin: 40 + rightMargin: 50 + + Row { + id: row + Repeater { + model: 4 + Rectangle { width: 400; height: 600; color: "blue" } + } + } +} diff --git a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml new file mode 100644 index 0000000000..60dadcc73c --- /dev/null +++ b/tests/auto/quick/qquickflickable/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/quick/qquickflickable/data/resize.qml b/tests/auto/quick/qquickflickable/data/resize.qml new file mode 100644 index 0000000000..1a9ef54107 --- /dev/null +++ b/tests/auto/quick/qquickflickable/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/quick/qquickflickable/data/wheel.qml b/tests/auto/quick/qquickflickable/data/wheel.qml new file mode 100644 index 0000000000..2928bbcd72 --- /dev/null +++ b/tests/auto/quick/qquickflickable/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 + } + } + } +} |