summaryrefslogtreecommitdiff
path: root/metawatch/qml/metawatch-digital-config.qml
diff options
context:
space:
mode:
Diffstat (limited to 'metawatch/qml/metawatch-digital-config.qml')
-rw-r--r--metawatch/qml/metawatch-digital-config.qml105
1 files changed, 91 insertions, 14 deletions
diff --git a/metawatch/qml/metawatch-digital-config.qml b/metawatch/qml/metawatch-digital-config.qml
index af1ef9b..72912f4 100644
--- a/metawatch/qml/metawatch-digital-config.qml
+++ b/metawatch/qml/metawatch-digital-config.qml
@@ -14,18 +14,40 @@ Column {
id: hourModeKey
key: configKey + "/24h-mode"
}
- Label {
- text: qsTr("24-hour clock mode")
- font: UiConstants.TitleFont
+ MouseArea {
+ id: hourModeArea
+ anchors.fill: parent
+ onClicked: hourModeSelect.open();
+ }
+ SelectionDialog {
+ id: hourModeSelect
+ titleText: qsTr("Time format")
+ selectedIndex: hourModeKey.value ? 1 : 0
+ model: ListModel {
+ ListElement { name: QT_TR_NOOP("12 hour") }
+ ListElement { name: QT_TR_NOOP("24 hour") }
+ }
+ onSelectedIndexChanged: hourModeKey.value = selectedIndex == 1
+ }
+ Column {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
+
+ Label {
+ text: qsTr("Time format")
+ font: UiConstants.TitleFont
+ }
+
+ Label {
+ text: qsTr(hourModeSelect.model.get(hourModeSelect.selectedIndex).name)
+ font: UiConstants.FieldLabelFont
+ color: UiConstants.FieldLabelColor
+ }
}
- Switch {
- id: hourModeSwitch
+ Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
- checked: hourModeKey.value
- onCheckedChanged: hourModeKey.value = checked
+ source: "image://theme/meegotouch-combobox-indicator" + (theme.inverted ? "-inverted" : "")
}
}
@@ -38,18 +60,73 @@ Column {
id: dayMonthOrderKey
key: configKey + "/day-month-order"
}
- Label {
- text: qsTr("Use DD/MM instead of MM/DD")
- font: UiConstants.TitleFont
+ MouseArea {
+ id: dayMonthOrderArea
+ anchors.fill: parent
+ onClicked: dayMonthOrderSelect.open();
+ }
+ SelectionDialog {
+ id: dayMonthOrderSelect
+ titleText: qsTr("Date format")
+ selectedIndex: dayMonthOrderKey.value ? 1 : 0
+ model: ListModel {
+ ListElement { name: QT_TR_NOOP("Month/Day") }
+ ListElement { name: QT_TR_NOOP("Day/Month") }
+ }
+ onSelectedIndexChanged: dayMonthOrderKey.value = selectedIndex == 1
+ }
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+
+ Label {
+ text: qsTr("Date format")
+ font: UiConstants.TitleFont
+ }
+
+ Label {
+ text: qsTr(dayMonthOrderSelect.model.get(dayMonthOrderSelect.selectedIndex).name)
+ font: UiConstants.FieldLabelFont
+ color: UiConstants.FieldLabelColor
+ }
+ }
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ source: "image://theme/meegotouch-combobox-indicator" + (theme.inverted ? "-inverted" : "")
+ }
+ }
+
+ Item {
+ id: autoBacklightItem
+ width: parent.width
+ height: UiConstants.ListItemHeightDefault
+
+ GConfKey {
+ id: autoBacklightKey
+ key: configKey + "/auto-backlight"
+ }
+ Column {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
+
+ Label {
+ text: qsTr("Automatic backlight")
+ font: UiConstants.TitleFont
+ }
+
+ Label {
+ text: qsTr("Turn backlight on during notifications")
+ font: UiConstants.SubtitleFont
+ color: UiConstants.FieldLabelColor
+ }
}
- Switch {
- id: dayMonthOrderSwitch
+ CheckBox {
+ id: autoBacklightSwitch
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
- checked: dayMonthOrderKey.value
- onCheckedChanged: dayMonthOrderKey.value = checked
+ checked: autoBacklightKey.value
+ onCheckedChanged: autoBacklightKey.value = checked
}
}
}