projects
/
harbour-pedalo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add journey model and list
[harbour-pedalo.git]
/
qml
/
pages
/
JourneyList.qml
diff --git
a/qml/pages/JourneyList.qml
b/qml/pages/JourneyList.qml
index
9d84129
..
8c6998f
100644
(file)
--- a/
qml/pages/JourneyList.qml
+++ b/
qml/pages/JourneyList.qml
@@
-10,7
+10,7
@@
Page {
SilicaListView {
id: listView
SilicaListView {
id: listView
- model: 20
+ model: journeymodel
anchors.fill: parent
header: PageHeader {
title: qsTr("Journey list")
anchors.fill: parent
header: PageHeader {
title: qsTr("Journey list")
@@
-24,17
+24,17
@@
Page {
Label {
width: columnwidth / 3.0
Label {
width: columnwidth / 3.0
- text: qsTr("Item") + " " + index
+ text: Qt.formatDate(journeymodel.epochToDate(start), "d MMM yyyy")
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
Label {
width: columnwidth / 3.0
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
Label {
width: columnwidth / 3.0
- text: qsTr("1 May 2018")
+ text: Qt.formatTime(journeymodel.epochToTime(start), "hh:mm")
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
Label {
width: columnwidth / 3.0
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
Label {
width: columnwidth / 3.0
- text: qsTr("20 mins")
+ text: parseInt(duration / (60 * 60)) + ":" + (parseInt(duration / 60) % 60)
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
}
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
}