From: David Llewellyn-Jones Date: Tue, 17 Jul 2018 20:38:42 +0000 (+0100) Subject: Add Pedalo Rules for viewing in the app X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=commitdiff_plain;h=ac8b7885c6787ad72b5cf8d422c8e5c8ec0e18fb Add Pedalo Rules for viewing in the app --- diff --git a/harbour-pedalo.pro b/harbour-pedalo.pro index ce9b2c7..327a46e 100644 --- a/harbour-pedalo.pro +++ b/harbour-pedalo.pro @@ -52,7 +52,8 @@ DISTFILES += qml/harbour-pedalo.qml \ qml/pages/JourneyInfo.qml \ qml/components/BarButton.qml \ qml/cover/ClockView.qml \ - qml/cover/LargeItem.qml + qml/cover/LargeItem.qml \ + qml/pages/TheRules.qml SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172 256x256 diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml index 8190afc..f5c0397 100644 --- a/qml/pages/MainPage.qml +++ b/qml/pages/MainPage.qml @@ -20,6 +20,11 @@ Page { text: qsTr("About") onClicked: pageStack.push(Qt.resolvedUrl("About.qml")) } + + MenuItem { + text: qsTr("The Pedalo Rules") + onClicked: pageStack.push(Qt.resolvedUrl("TheRules.qml")) + } } // Tell SilicaFlickable the height of its content. @@ -51,7 +56,7 @@ Page { BarButton { source: "image://pedalo/button-journey-add?" + (pressed ? Theme.primaryColor : Theme.highlightColor) - text: "Add a journey" + text: qsTr("Add a journey") onClicked: pageStack.push(Qt.resolvedUrl("JourneyEdit.qml")) } } @@ -67,13 +72,13 @@ Page { BarButton { source: "image://pedalo/button-stats?" + (pressed ? Theme.primaryColor : Theme.highlightColor) - text: "View latest stats" + text: qsTr("View latest stats") onClicked: pageStack.push(Qt.resolvedUrl("Stats.qml")) } BarButton { source: "image://pedalo/button-list?" + (pressed ? Theme.primaryColor : Theme.highlightColor) - text: "Previous journeys" + text: qsTr("Previous journeys") onClicked: pageStack.push(Qt.resolvedUrl("JourneyList.qml")) } } diff --git a/qml/pages/TheRules.qml b/qml/pages/TheRules.qml new file mode 100644 index 0000000..8a5cdc2 --- /dev/null +++ b/qml/pages/TheRules.qml @@ -0,0 +1,63 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Page { + id: rulesPage + + // The effective value will be restricted by ApplicationWindow.allowedOrientations + allowedOrientations: Orientation.All + + VerticalScrollDecorator {} + + SilicaFlickable { + anchors.fill: parent + contentHeight: rulesColumn.height + Theme.paddingLarge + flickableDirection: Flickable.VerticalFlick + + Column { + id: rulesColumn + width: parent.width - 2 * Theme.horizontalPageMargin + anchors.horizontalCenter: parent.horizontalCenter + + PageHeader { + id: headerItem + title: qsTr("The Pedalo Rules") + } + + Label { + id: rulestext + width: parent.width + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + textFormat: TextEdit.RichText + horizontalAlignment: Text.AlignLeft + font.pixelSize: Theme.fontSizeSmall + text: " +To get an accurate reflection of your relative speed, it's important to follow some common-sense rules. +
+
+On each journey keep a mental note of how many pedalos you overtake (overtakees), and how many other pedalos overtake you (overtakers). Enter these numbers in the app at the end of your journey. +
+
+To keep track of these numbers in a sensible way: +
+
    +
  1. Remember two numbers: how many pedalos you overtake, and how many pedalos overtake you.
  2. +
  3. Don't count any overtakes that happen when you're at a junction, or slowing down for a junction.
  4. +
  5. Only count overtakes with pedalos that are travelling on the same route and in the same direction as you.
  6. +
  7. If you overtake a pedalo and add one to your overtakees value, but they then overtake you back, subtract it from your overtakees value, rather than adding it to your overtakers value.
  8. +
  9. Similarly if it happens the other way around.
  10. +
+
+The master rule is that, whatever approach you use, be consistent and apply the same rules in the same way for people you overtake as you do for people who overtake you. +
+
+Stay safe and cycle considerately! +" + } + } + } + + +} + + diff --git a/translations/harbour-pedalo-de.ts b/translations/harbour-pedalo-de.ts index c974b69..9bd0677 100644 --- a/translations/harbour-pedalo-de.ts +++ b/translations/harbour-pedalo-de.ts @@ -157,6 +157,10 @@ Finish your journey + + Rules + + Stats @@ -181,4 +185,11 @@ + + TheRules + + The Pedalo Rules + + + diff --git a/translations/harbour-pedalo.ts b/translations/harbour-pedalo.ts index c974b69..9bd0677 100644 --- a/translations/harbour-pedalo.ts +++ b/translations/harbour-pedalo.ts @@ -157,6 +157,10 @@ Finish your journey + + Rules + + Stats @@ -181,4 +185,11 @@ + + TheRules + + The Pedalo Rules + + +