aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpathview/data/panels.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickpathview/data/panels.qml')
-rw-r--r--tests/auto/quick/qquickpathview/data/panels.qml44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathview/data/panels.qml b/tests/auto/quick/qquickpathview/data/panels.qml
new file mode 100644
index 0000000000..a111e45736
--- /dev/null
+++ b/tests/auto/quick/qquickpathview/data/panels.qml
@@ -0,0 +1,44 @@
+import QtQuick 2.0
+
+Item {
+ id: root
+ property bool snapOne: false
+ property bool enforceRange: false
+ width: 320; height: 480
+
+ VisualItemModel {
+ id: itemModel
+
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: "blue"
+ }
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: "yellow"
+ }
+ Rectangle {
+ width: root.width
+ height: root.height
+ color: "green"
+ }
+ }
+
+ PathView {
+ id: view
+ objectName: "view"
+ anchors.fill: parent
+ model: itemModel
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+ flickDeceleration: 30
+ highlightRangeMode: enforceRange ? PathView.StrictlyEnforceRange : PathView.NoHighlightRange
+ snapMode: root.snapOne ? PathView.SnapOneItem : PathView.SnapToItem
+ path: Path {
+ startX: -root.width; startY: root.height/2
+ PathLine { x: root.width*2; y: root.height/2 }
+ }
+ }
+}