51
54
anchors.fill: parent
53
SettingsItemTitle { text: i18n.tr ("Time zone:") }
55
ListItem.SingleValue {
56
objectName: "timeZone"
58
//e.g. America/New_York -> America/New York
59
text: timeDatePanel.timeZone.replace("_", " ")
62
onClicked: pageStack.push(Qt.resolvedUrl("ChooseTimeZone.qml"))
66
text: i18n.tr ("Set the time and date:")
69
ListItem.ItemSelector {
70
id: setTimeAutomatically
71
objectName: "timeItemSelector"
72
model: [ i18n.tr("Automatically") , i18n.tr("Manually")]
74
onSelectedIndexChanged: {
75
var useNTP = (selectedIndex === 0) // 0 = Automatically
76
timeDatePanel.useNTP = useNTP
81
target: setTimeAutomatically
82
property: "selectedIndex"
83
value: timeDatePanel.useNTP ? 0 : 1
87
onTriggered: currentTime.text = Qt.formatDateTime(
89
Qt.DefaultLocaleLongDate)
90
triggeredOnStart: true
102
objectName: "currentTime"
103
progression: setTimeAutomatically.selectedIndex === 1 // Manually
106
Qt.inputMethod.hide()
107
var popupObj = PopupUtils.open(timePicker);
108
popupObj.accepted.connect(
109
function(hour, minute, second,
111
var newDate = new Date(year,
117
// Milliseconds to microseconds
118
timeDatePanel.setTime(newDate.getTime() * 1000)
55
contentHeight: contentItem.childrenRect.height
56
boundsBehavior: (contentHeight > root.height) ? Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
57
flickableDirection: Flickable.VerticalFlick
60
anchors.left: parent.left
61
anchors.right: parent.right
63
SettingsItemTitle { text: i18n.tr ("Time zone:") }
65
ListItem.SingleValue {
66
objectName: "timeZone"
68
//e.g. America/New_York -> America/New York
69
text: timeDatePanel.timeZone.replace("_", " ")
72
onClicked: pageStack.push(Qt.resolvedUrl("ChooseTimeZone.qml"))
76
text: i18n.tr ("Set the time and date:")
79
ListItem.ItemSelector {
80
id: setTimeAutomatically
81
objectName: "timeItemSelector"
82
model: [ i18n.tr("Automatically") , i18n.tr("Manually")]
84
onSelectedIndexChanged: {
85
var useNTP = (selectedIndex === 0) // 0 = Automatically
86
timeDatePanel.useNTP = useNTP
91
target: setTimeAutomatically
92
property: "selectedIndex"
93
value: timeDatePanel.useNTP ? 0 : 1
97
onTriggered: currentTime.text = Qt.formatDateTime(
99
Qt.DefaultLocaleLongDate)
100
triggeredOnStart: true
112
objectName: "currentTime"
113
progression: setTimeAutomatically.selectedIndex === 1 // Manually
116
Qt.inputMethod.hide()
117
var popupObj = PopupUtils.open(timePicker);
118
popupObj.accepted.connect(
119
function(hour, minute, second,
121
var newDate = new Date(year,
127
// Milliseconds to microseconds
128
timeDatePanel.setTime(newDate.getTime() * 1000)