Skip to content

Commit

Permalink
Last work for first release version. Lots of things changed/fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Drescher committed Sep 12, 2017
1 parent c982cad commit fadf555
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 145 deletions.
8 changes: 5 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ Laufhelden
==========

Laufhelden is a sport tracking application for Sailfish OS. Laufhelden is german, meaning run heros.
Planned features are:
Features are:
- recording tracks
- view recorded track and show statistics
- save track as GPX file
- connecting to bluetooth heart rate device
- connecting to a Pebble watch to show data while training
- sending recorded tracks via email
- ...


This application orginates from a fork of Rena by Simoma: https://github.com/Simoma/rena

Credits go to:
- Messagebox: Kimmo Lindholm, https://github.com/kimmoli/paint/blob/master/qml/components/Messagebox.qml

Workout icons are from here: https://de.icons8.com/ They are under this license: https://creativecommons.org/licenses/by-nd/3.0/

Expand Down
26 changes: 17 additions & 9 deletions ToDo.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
ToDo for first release to openrepos:
- detailspage:
- make heartrate invisible if there is no data
- some workouts have no max speed
- texts need general overhaul!
- what is ConfirmClearDialog for? Maybe delete this thing...
- set release date to .changes file
- complete translation to german language
- support all workout types from meerun (is not possible because export function in meerun is broken for many workout types)
- test if a new workout is saved without having the gpx files folder
- sometimes there is a view problem on mainpage after a completed workout.
- GPS starts with app start. Make it start with recordpage.






ToDo on the long run:
- support elevation as new datapoint
- AM/PM mode for recordpage
- on recordpage: enable onRadiusChanged and onCenterChanged in mapcircle.
- sometimes there is a view problem on mainpage after a completed workout.
- GPS starts with app start. Make it start with recordpage.
- support all workout types from meerun (is not possible because export function in meerun is broken for many workout types)
- rename workouts on mainpage
- introduce reward system:
- fastest run 5/10/20/40 km
- longest run (distance/time)
Expand Down Expand Up @@ -56,7 +57,7 @@ ToDo on the long run:
- new workout icons
- voice announcements
- pebble integration (currently waiting for abranson: https://talk.maemo.org/showpost.php?p=1528627&postcount=634)
- use scout server as map tile provider (wait for Jolla dudes introducing QT5.6 to SFOS)
- use scout server as map tile provider (waiting for Jolla: https://talk.maemo.org/showpost.php?p=1528801&postcount=257)
- introduce lap function
- CRC check for Zephyr HxM data packets
- BLE heart rate devices support (currently waiting for kimmoli to bring this to OPX)
Expand All @@ -76,6 +77,13 @@ Bugs:


Completed:
- what is ConfirmClearDialog for? Maybe delete this thing...
- detailspage:
- make heartrate invisible if there is no data
- some workouts have no max speed
- texts need general overhaul!
- workout icon is too small on prerecordpage
- make sorting of workouts from most recent to least recent on mainpage
- Workouts need to be sorted after date on MainPage
- implement add/remove threshold profiles
- put all icons and pictures in the img folder!
Expand Down
6 changes: 1 addition & 5 deletions harbour-laufhelden.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@
# - icon definition filename in desktop file must be changed
TARGET = harbour-laufhelden

# Application version
VERSION = 0.0.1
VERSION_SUFFIX =

# Define the preprocessor macro to get the application version in our application.
DEFINES += APP_VERSION=\\\"$$VERSION\\\" APP_VERSION_SUFFIX=\\\"$$VERSION_SUFFIX\\\"
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"

CONFIG += sailfishapp
QT += positioning location concurrent
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Page
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.secondaryColor
text: qsTr("Date: ") + "16.05.2017";
text: qsTr("Date: ") + "12.09.2017";
}
Label
{
Expand Down
96 changes: 50 additions & 46 deletions qml/pages/DetailedViewPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,25 @@ Page {
}
}

MapPolyline {
MapPolyline
{
id: trackLine
line.color: "red"
line.width: 5
smooth: true
}

BusyIndicator {
BusyIndicator
{
anchors.centerIn: detailPage
running: !trackLoader.loaded
size: BusyIndicatorSize.Large
}

SilicaFlickable {
anchors {
SilicaFlickable
{
anchors
{
top: parent.top
left: parent.left
right: parent.right
Expand All @@ -82,27 +86,32 @@ Page {
clip: true
contentHeight: header.height + gridContainer.height + Theme.paddingLarge
VerticalScrollDecorator {}
Column {
Column
{
width: parent.width
PageHeader {
PageHeader
{
id: header
title: name==="" ? "-" : name
Behavior on opacity {
FadeAnimation {}
}
}
Grid {
Grid
{
id: gridContainer
x: Theme.paddingLarge
width: parent.width
spacing: Theme.paddingMedium
columns: 2
opacity: 0.2
Behavior on opacity {
Behavior on opacity
{
FadeAnimation {}
}

Label {
Label
{
id: descriptionLabel
width: hearRateLabel.width
height:descriptionData.height
Expand All @@ -112,13 +121,15 @@ Page {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Description:")
}
Label {
Label
{
id: descriptionData
width: parent.width - descriptionLabel.width - 2*Theme.paddingLarge
text: trackLoader.description==="" ? "-" : trackLoader.description
wrapMode: Text.WordWrap
}
Label {
Label
{
width: hearRateLabel.width
height:timeData.height
horizontalAlignment: Text.AlignRight
Expand All @@ -127,12 +138,14 @@ Page {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Starting time:")
}
Label {
Label
{
id: timeData
width: descriptionData.width
text: trackLoader.timeStr
}
Label {
Label
{
width: hearRateLabel.width
height:durationData.height
horizontalAlignment: Text.AlignRight
Expand All @@ -141,12 +154,14 @@ Page {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Duration:")
}
Label {
Label
{
id: durationData
width: descriptionData.width
text: trackLoader.durationStr
}
Label {
Label
{
width: hearRateLabel.width
height:distanceData.height
horizontalAlignment: Text.AlignRight
Expand All @@ -155,71 +170,60 @@ Page {
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Distance:")
}
Label {
Label
{
id: distanceData
width: descriptionData.width
text: (trackLoader.distance/1000).toFixed(2) + " km"
}
Label {
Label
{
width: hearRateLabel.width
height:speedData.height
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignBottom
id: avgSpeedLabel
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Average speed:")
text: qsTr("Speed max/⌀:")
}
Label {
Label
{
id: speedData
width: descriptionData.width
text: (trackLoader.speed*3.6).toFixed(1) + " km/h"
}
Label {
width: hearRateLabel.width
height:maxSpeedData.height
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignBottom
id: maxSpeedLabel
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Maximum speed:")
}
Label {
id: maxSpeedData
width: descriptionData.width
text: trackLoader.maxSpeed>0
? (trackLoader.maxSpeed*3.6).toFixed(1) + " km/h"
: "-"
}
Label {
text: (trackLoader.maxSpeed*3.6).toFixed(1) + "/" + (trackLoader.speed*3.6).toFixed(1) + " km/h"
}
Label
{
width: hearRateLabel.width
height:paceData.height
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignBottom
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Average pace:")
text: qsTr("Pace ⌀:")
}
Label {
Label
{
id: paceData
width: descriptionData.width
text: trackLoader.pace.toFixed(2) + " min/km"
}

Label {
Label
{
id: hearRateLabel
height:heartRateData.height
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignBottom
color: Theme.secondaryColor
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Heart rate min/max/Ø:")
text: qsTr("Heart rate min/max/:")
}
Label {
Label
{
id: heartRateData
width: descriptionData.width
text: trackLoader.heartRateMin + "/" + trackLoader.heartRateMax + "/" + trackLoader.heartRate.toFixed(1) + " bpm"
text: (trackLoader.heartRateMin === 9999999 && trackLoader.heartRateMax === 0) ? "-" : trackLoader.heartRateMin + "/" + trackLoader.heartRateMax + "/" + trackLoader.heartRate.toFixed(1) + " bpm"
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions qml/pages/PreRecordPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ Page
//console.log("Drei: " + SharedResources.arrayWorkoutTypes.map(function(e) { return e.name; }));

//This is a crazy thing, but at least it returns the index :-)
console.log("Index of workout type: " + SharedResources.arrayWorkoutTypes.map(function(e) { return e.name; }).indexOf(settings.workoutType));

cmbWorkout.currentIndex = SharedResources.arrayWorkoutTypes.map(function(e) { return e.name; }).indexOf(settings.workoutType);
imgWorkoutImage.source = SharedResources.arrayWorkoutTypes[SharedResources.arrayWorkoutTypes.map(function(e) { return e.name; }).indexOf(settings.workoutType)].icon;

if (sHRMAddress === "")
txtswUseHRMdevice.checked = false;
Expand Down Expand Up @@ -117,21 +120,22 @@ Page
{
color: Theme.highlightColor
width: parent.width
}
}
Row
{
spacing: Theme.paddingSmall
width:parent.width;
Image
{
id: imgWorkoutImage
height: cmbWorkout.height
height: parent.width / 8
width: parent.width / 8
fillMode: Image.PreserveAspectFit
}
ComboBox
{
id: cmbWorkout
width: parent.width - imgWorkoutImage.width
width: (parent.width / 8) * 7
label: qsTr("Workout:")
menu: ContextMenu
{
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/RecordPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Page
height: parent.height
width: parent.width
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
verticalAlignment: bShowMap ? Text.AlignBottom : Text.AlignVCenter
color: cPrimaryTextColor
font.pixelSize: Theme.fontSizeSmall
}
Expand Down
Loading

0 comments on commit fadf555

Please sign in to comment.