1import QtQuick 2.0 2import "." as QML 3 4Rectangle { 5 id: root 6 width: 800; height: 600 7 color: "#646464" 8 9 ListView { 10 id: clockview 11 anchors.fill: parent 12 orientation: ListView.Horizontal 13 cacheBuffer: 2000 14 snapMode: ListView.SnapOneItem 15 highlightRangeMode: ListView.ApplyRange 16 17 delegate: QML.Clock { city: cityName; shift: timeShift } 18 model: ListModel { 19 ListElement { cityName: "New York"; timeShift: -4 } 20 ListElement { cityName: "London"; timeShift: 0 } 21 ListElement { cityName: "Oslo"; timeShift: 1 } 22 ListElement { cityName: "Mumbai"; timeShift: 5.5 } 23 ListElement { cityName: "Tokyo"; timeShift: 9 } 24 ListElement { cityName: "Brisbane"; timeShift: 10 } 25 ListElement { cityName: "Los Angeles"; timeShift: -8 } 26 } 27 } 28 29 Image { 30 anchors.left: parent.left 31 anchors.bottom: parent.bottom 32 anchors.margins: 10 33 source: "content/arrow.png" 34 rotation: -90 35 opacity: clockview.atXBeginning ? 0 : 0.5 36 Behavior on opacity { NumberAnimation { duration: 500 } } 37 } 38 39 Image { 40 anchors.right: parent.right 41 anchors.bottom: parent.bottom 42 anchors.margins: 10 43 source: "content/arrow.png" 44 rotation: 90 45 opacity: clockview.atXEnd ? 0 : 0.5 46 Behavior on opacity { NumberAnimation { duration: 500 } } 47 } 48} 49