6 property alias interactive: path.interactive
8 property bool moving: false
9 property ListModel model
10 property Component delegate
11 property int itemsShown: 4
12 property bool autoClose: true
13 property alias closingDelay: clippingTimer.interval
14 property int closingTimeout: 800
16 function open() { focus = true; clip = false }
17 function close() { clip = true }
18 function toggle() { clip ? open() : close() }
19 function shiftZ(obj, delta) {
20 if (typeof obj.z != 'undefined') obj.z += delta
21 if (obj.parent) shiftZ(obj.parent, delta) // Set z recursively to parent
28 // Close reel when the focus is lost
29 onFocusChanged: if (!focus) close()
30 // Bring to front if not clipped
31 onClipChanged: { clip ? shiftZ(reel, -500) : shiftZ(reel, 500) }
33 onIndexChanged: path.currentIndex = reel.index
38 height: (pathItemCount-1)*parent.height
39 pathItemCount: parent.itemsShown+1
41 anchors.centerIn: parent
43 delegate: reel.delegate
45 preferredHighlightBegin: 0.5
46 preferredHighlightEnd: 0.5
47 highlightRangeMode: PathView.StrictlyEnforceRange
51 startX: path.x+path.width/2; startY: 1-reel.height/2
52 PathLine {x: path.x+path.width/2; y: path.height+reel.height/2-1}
56 reel.index = path.currentIndex;
62 repeat: false; interval: reel.closingTimeout;
63 triggeredOnStart: false; onTriggered: reel.close()