import QtQuick 2.0 import Sailfish.Silica 1.0 Page { id: page // The effective value will be restricted by ApplicationWindow.allowedOrientations allowedOrientations: Orientation.All property int columnwidth: page.width - 2 * Theme.horizontalPageMargin SilicaListView { id: listView model: journeymodel anchors.fill: parent header: PageHeader { title: qsTr("Journey list") } delegate: BackgroundItem { id: delegate Row { spacing: Theme.paddingLarge x: Theme.horizontalPageMargin Label { width: columnwidth / 3.0 text: Qt.formatDate(journeymodel.epochToDate(start), "d MMM yyyy") color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor } Label { width: columnwidth / 3.0 text: Qt.formatTime(journeymodel.epochToTime(start), "hh:mm") color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor } Label { width: columnwidth / 3.0 text: parseInt(duration / (60 * 60)) + ":" + (parseInt(duration / 60) % 60) color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor } } onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Edit journey"}) } VerticalScrollDecorator {} } }