Debian Codegraph @

src/app/qml/components/About.qml

raw
1 /*
2 * Copyright (C) 2020 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: aboutPage
24
25 header: PageHeader {
26 id: header
27 title: i18n.tr("Help")
28
29 extension: Sections {
30 id: headerSections
31 width: parent.width // needed, otherwise the sections are not horizontally swipeable
32 StyleHints {sectionColor: theme.palette.normal.baseText; }
33 model: [i18n.ctr("about page, section header, usage instructions","Usage"), i18n.ctr("about page, section header, troubleshooting","Troubleshooting")]
34 }
35 }
36
37 Flickable {
38 id: aboutFlickable
39 clip: true
40 flickableDirection: Flickable.AutoFlickIfNeeded
41 boundsBehavior: Flickable.StopAtBounds
42
43 anchors {
44 top: header.bottom
45 left: parent.left
46 right: parent.right
47 bottom: parent.bottom
48 }
49
50 Loader {
51 anchors {
52 fill: parent
53 }
54 asynchronous: true
55 source: "../components/AboutUsage.qml"
56 visible: headerSections.selectedIndex === 0
57 }
58 Loader {
59 anchors {
60 fill: parent
61 }
62 asynchronous: true
63 source: "../components/AboutTroubleshooting.qml"
64 visible: headerSections.selectedIndex === 1
65 }
66 }
67 }