summaryrefslogtreecommitdiff
path: root/metawatch/qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-03-28 19:04:05 +0100
committerJavier S. Pedro <maemo@javispedro.com>2013-03-28 19:04:05 +0100
commit339f143339d4fcef2d961929d21152c3f024b7c2 (patch)
treee969286139e138772df41702934899f2259d9a5d /metawatch/qml
parentdba92fe2ecb6190f4fa645dd2b9aae6323384178 (diff)
downloadsowatch-339f143339d4fcef2d961929d21152c3f024b7c2.tar.gz
sowatch-339f143339d4fcef2d961929d21152c3f024b7c2.zip
update metawatch config dialog
Diffstat (limited to 'metawatch/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
}
}
}