From 5ed545a79687095d9a6b2b22d100b08344d61105 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Sat, 4 Jan 2014 15:07:46 +0100 Subject: [PATCH] Add SettingsPage for SailfishOS port This lets the user check enable periodic station updates, and clear the recent station list. Also added an About button here. --- .../resources/sailfish/qml/pages/SettingsPage.qml | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 application/resources/sailfish/qml/pages/SettingsPage.qml diff --git a/application/resources/sailfish/qml/pages/SettingsPage.qml b/application/resources/sailfish/qml/pages/SettingsPage.qml new file mode 100644 index 0000000..b629275 --- /dev/null +++ b/application/resources/sailfish/qml/pages/SettingsPage.qml @@ -0,0 +1,45 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import net.cirulla.quandoparte 1.0 + +Page { + RemorsePopup { + id: remorse + } + SilicaFlickable { + anchors.fill: parent + contentHeight: column.height + contentWidth: parent.width + VerticalScrollDecorator {} + Column { + id: column + width: parent.width + spacing: Theme.paddingLarge + PageHeader { + title: "Settings" + } + TextSwitch { + id: periodicActivation + text: qsTr("Check Periodically") + description: qsTr("Update the situation periodically while the station schedule is shown.") + onCheckedChanged: settings.autoUpdate = checked + } + Button { + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Clear Recent Stations") + onClicked: remorse.execute(qsTr("Clearing Preferred Stations"), function() {settings.recentStations = ""}) + } + SectionHeader { + text: qsTr("Information") + } + Button { + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("About Quando Parte") + onClicked: pageStack.push(Qt.resolvedUrl("AboutPage.qml")) + } + } + } + Component.onCompleted: { + periodicActivation.checked = settings.autoUpdate + } +} -- 1.7.9.5