18 import Ubuntu.Components 0.1
19 import Unity.Indicators 0.1 as Indicators
24 implicitWidth: childrenRect.width
25 implicitHeight: childrenRect.height
28 property date currentDate
30 Component.onCompleted: {
32 currentDate =
new Date()
36 Indicators.CachedUnityMenuModel {
38 objectName:
"timeModel"
40 busName:
"com.canonical.indicator.datetime"
41 actionsObjectPath:
"/com/canonical/indicator/datetime"
42 menuObjectPath: clock.visible ?
"/com/canonical/indicator/datetime/phone" :
""
44 Indicators.RootActionState {
47 if (timeLabel.text != rightLabel) {
48 timeLabel.text = rightLabel;
49 clock.currentDate =
new Date();
56 spacing: units.gu(0.5)
60 objectName:
"timeLabel"
62 anchors.horizontalCenter: parent.horizontalCenter
63 font.pixelSize: units.gu(7.5)
66 text: Qt.formatTime(clock.currentDate)
67 font.weight: Font.Light
72 objectName:
"dateLabel"
74 anchors.horizontalCenter: parent.horizontalCenter
78 text: Qt.formatDate(clock.currentDate, Qt.DefaultLocaleLongDate)
79 font.weight: Font.Light