blob: f6c84b0dea1b94210d83a5ba41340b4fd6370a90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
import QtQuick 1.1
import com.nokia.meego 1.1
import com.javispedro.sowatch 1.0
Column {
property string configKey;
Item {
id: hourModeItem
width: parent.width
height: UiConstants.ListItemHeightDefault
GConfKey {
id: hourModeKey
key: configKey + "/24h-mode"
}
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
}
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
source: "image://theme/meegotouch-combobox-indicator" + (theme.inverted ? "-inverted" : "")
}
}
}
|