Corrently add, edit and list journey details
[harbour-pedalo.git] / qml / pages / JourneyList.qml
index 8c6998f..0468df0 100644 (file)
@@ -34,11 +34,11 @@ Page {
                 }
                 Label {
                     width: columnwidth / 3.0
                 }
                 Label {
                     width: columnwidth / 3.0
-                    text: parseInt(duration / (60 * 60)) + ":" + (parseInt(duration / 60) % 60)
+                    text: Qt.formatTime(new Date(0, 0, 0, 0, 0, duration), 'hh:mm')
                     color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
                 }
             }
                     color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
                 }
             }
-            onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Edit journey"})
+            onClicked: pageStack.push(Qt.resolvedUrl("AddJourney.qml"), {title: "Edit journey", index: index, start: journeymodel.epochToDateTime(start), duration: duration, overtook: overtook, overtakenby: overtakenby})
         }
         VerticalScrollDecorator {}
     }
         }
         VerticalScrollDecorator {}
     }