| 1 |
/* |
| 2 |
* Copyright (C) 2021 UBports Foundation |
| 3 |
* |
| 4 |
* This file is part of Lomiri Weather App |
| 5 |
* |
| 6 |
* Lomiri Weather App is free software: you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License version 3 as |
| 8 |
* published by the Free Software Foundation. |
| 9 |
* |
| 10 |
* Lomiri Weather App is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
import QtQuick 2.12 |
| 20 |
import Lomiri.Components 1.3 |
| 21 |
|
| 22 |
Page { |
| 23 |
id: aboutUsagePage |
| 24 |
|
| 25 |
Flickable { |
| 26 |
id: usageFlickable |
| 27 |
clip: true |
| 28 |
flickableDirection: Flickable.AutoFlickIfNeeded |
| 29 |
boundsBehavior: Flickable.StopAtBounds |
| 30 |
|
| 31 |
anchors { |
| 32 |
topMargin: units.gu(2) |
| 33 |
fill: parent |
| 34 |
} |
| 35 |
|
| 36 |
contentHeight: usageColumn.childrenRect.height |
| 37 |
|
| 38 |
Column { |
| 39 |
id: usageColumn |
| 40 |
|
| 41 |
anchors { |
| 42 |
top: parent.top |
| 43 |
left: parent.left |
| 44 |
right: parent.right |
| 45 |
} |
| 46 |
|
| 47 |
Repeater { |
| 48 |
id: listViewUsage |
| 49 |
|
| 50 |
model: [ |
| 51 |
{ |
| 52 |
title: i18n.tr("Access weather information"), |
| 53 |
description: i18n.ctr("usage, access weather information","You can swipe through locations or pick one by tapping on the indicator dots. Tap on current information or a daily forecast for additional weather details. Swipe the 3 hour forecast for more weather information.") |
| 54 |
}, |
| 55 |
{ |
| 56 |
title: i18n.tr("Manage locations"), |
| 57 |
description: i18n.ctr("usage, manage locations","Add multiple locations via bottom edge or enable live GPS location in settings. Manage locations via bottom edge locations page by swiping or press & hold to remove and reorder.") |
| 58 |
}, |
| 59 |
{ |
| 60 |
title: i18n.tr("Locations page list actions"), |
| 61 |
description: i18n.ctr("usage, manage locations","To add new locations you need to have internet access!") + "\n" + "1. " + i18n.tr("single tap a location to view its weather") + "\n" + "2. " + i18n.tr("tap and hold on a location to") + "\n" + i18n.tr("a) enable sorting mode (drag the icon to reorder)") + "\n" + i18n.tr("b) multiselect locations to delete") |
| 62 |
}, |
| 63 |
{ |
| 64 |
title: i18n.tr("Rainradar"), |
| 65 |
description: i18n.ctr("usage, rainradar","You can view live rainradar by tapping the satellite icon in the header.") |
| 66 |
}, |
| 67 |
{ |
| 68 |
title: i18n.tr("GPS live location"), |
| 69 |
description: i18n.ctr("usage, GPS live location","When GPS for current location is enabled, an additional 'live' location is added to the list. This locations updates it's position on the move according to GPS location.") |
| 70 |
}, |
| 71 |
{ |
| 72 |
title: i18n.tr("Updating data"), |
| 73 |
description: i18n.ctr("usage, Updating data","Weather station data is updated on app start and at the interval specified in the app settings. This does only work while the app is active.") |
| 74 |
} |
| 75 |
] |
| 76 |
|
| 77 |
delegate: Column { |
| 78 |
id: delegateColumn |
| 79 |
height: childrenRect.height |
| 80 |
width: parent.width - units.gu(4) |
| 81 |
spacing: units.gu(1) |
| 82 |
anchors { |
| 83 |
left: parent.left |
| 84 |
leftMargin: units.gu(2) |
| 85 |
right: parent.right |
| 86 |
rightMargin: units.gu(2) |
| 87 |
} |
| 88 |
Label { |
| 89 |
id: titleLabel |
| 90 |
text: modelData.title |
| 91 |
font.bold: true |
| 92 |
} |
| 93 |
Label { |
| 94 |
id: descriptionLabel |
| 95 |
width: parent.width |
| 96 |
text: modelData.description |
| 97 |
wrapMode: Text.WordWrap |
| 98 |
horizontalAlignment: Text.AlignJustify |
| 99 |
} |
| 100 |
Rectangle { |
| 101 |
id: delegateSpacer |
| 102 |
width: parent.width |
| 103 |
height: units.gu(2) |
| 104 |
color: "transparent" |
| 105 |
} |
| 106 |
} |
| 107 |
} |
| 108 |
} |
| 109 |
} |
| 110 |
} |