summaryrefslogtreecommitdiff
path: root/rockwork/qml/SettingsPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'rockwork/qml/SettingsPage.qml')
-rw-r--r--rockwork/qml/SettingsPage.qml80
1 files changed, 80 insertions, 0 deletions
diff --git a/rockwork/qml/SettingsPage.qml b/rockwork/qml/SettingsPage.qml
new file mode 100644
index 0000000..153aaf4
--- /dev/null
+++ b/rockwork/qml/SettingsPage.qml
@@ -0,0 +1,80 @@
+import QtQuick 2.4
+import QtQuick.Layouts 1.1
+import Ubuntu.Components 1.3
+import Ubuntu.Components.ListItems 1.3
+
+Page {
+ id: root
+ title: i18n.tr("Settings")
+
+ property var pebble: null
+
+ ColumnLayout {
+ anchors.fill: parent
+ anchors.margins: units.gu(1)
+ spacing: units.gu(1)
+
+ Label {
+ Layout.fillWidth: true
+ text: i18n.tr("Distance Units")
+ font.bold: true
+ }
+
+ RowLayout {
+ Layout.fillWidth: true
+ CheckBox {
+ id: metricUnitsCheckbox
+ checked: !root.pebble.imperialUnits
+ onClicked: {
+ checked = true
+ root.pebble.imperialUnits = false;
+ imperialUnitsCheckBox.checked = false;
+ }
+ }
+ Label {
+ text: i18n.tr("Metric")
+ Layout.fillWidth: true
+ }
+ CheckBox {
+ id: imperialUnitsCheckBox
+ checked: root.pebble.imperialUnits
+ onClicked: {
+ checked = true
+ root.pebble.imperialUnits = true;
+ metricUnitsCheckbox.checked = false;
+ }
+ }
+ Label {
+ text: i18n.tr("Imperial")
+ Layout.fillWidth: true
+ }
+ }
+ ThinDivider {}
+
+ Label {
+ text: i18n.tr("Calendar")
+ Layout.fillWidth: true
+ font.bold: true
+ }
+ RowLayout {
+ Layout.fillWidth: true
+ Label {
+ text: i18n.tr("Sync calendar to timeline")
+ Layout.fillWidth: true
+ }
+ Switch {
+ checked: root.pebble.calendarSyncEnabled
+ onClicked: {
+ root.pebble.calendarSyncEnabled = checked;
+ }
+ }
+ }
+ ThinDivider {}
+
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+}
+