Commit 8e4df85e authored by Volker Krause's avatar Volker Krause

Add settings page

Nothing functional in there yet though.
parent 38931181
......@@ -47,6 +47,7 @@ if (ANDROID)
edit-delete
go-next-symbolic
map-symbolic
settings-configure
view-calendar-day
view-refresh
)
......@@ -70,6 +71,7 @@ qml_lint(
PlaceDelegate.qml
RestaurantDelegate.qml
RestaurantPage.qml
SettingsPage.qml
TicketTokenDelegate.qml
TimelineDelegate.qml
TimelinePage.qml
......
/*
Copyright (C) 2018 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1 as QQC2
import org.kde.kirigami 2.4 as Kirigami
import org.kde.itinerary 1.0
import "." as App
Kirigami.ScrollablePage {
id: root
title: qsTr("Settings")
GridLayout {
columns: 2
width: root.width
QQC2.Label {
text: qsTr("Home Country")
}
QQC2.ComboBox {
model: [ "TODO", "TODO" ]
}
QQC2.Label {
text: qsTr("Weather Forecast")
}
QQC2.Switch {
id: weatherSwitch
}
QQC2.Label {
Layout.columnSpan: 2
Layout.fillWidth: true
text: qsTr("Showing weather forecasts will query online services.")
visible: !weatherSwitch.checked
}
// ATTENTION do not remove this note, see https://api.met.no/license_data.html
QQC2.Label {
Layout.columnSpan: 2
Layout.fillWidth: true
text: qsTr("Using data from <a href=\"https://www.met.no/\">The Norwegian Meteorological Institute</a> under <a href=\"https://creativecommons.org/licenses/by/4.0\">Creative Commons 4.0 BY International</a> license.")
visible: weatherSwitch.checked
wrapMode: Text.WordWrap
onLinkActivated: Qt.openUrlExternally(link)
}
}
onBackRequested: pageStack.pop()
}
......@@ -69,6 +69,11 @@ Kirigami.ApplicationWindow {
onTriggered: {
_pkpassManager.updatePasses();
}
},
Kirigami.Action {
text: qsTr("Settings...")
iconName: "settings-configure"
onTriggered: pageStack.push(settingsComponent)
}
]
}
......@@ -87,4 +92,8 @@ Kirigami.ApplicationWindow {
pass: _pkpassManager.passObject(passId)
}
}
Component {
id: settingsComponent
App.SettingsPage {}
}
}
......@@ -14,6 +14,7 @@
<file>PlaceDelegate.qml</file>
<file>RestaurantDelegate.qml</file>
<file>RestaurantPage.qml</file>
<file>SettingsPage.qml</file>
<file>TicketTokenDelegate.qml</file>
<file>TimelineDelegate.qml</file>
<file>TimelinePage.qml</file>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment