From c22bb7cc33ba6341a70a3162cf6c4b6dc2c6aaec Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Mon, 29 Sep 2014 20:20:00 +0200 Subject: [PATCH] simple "clock" Plasma Quick currently lacks a way to load a plasmoid. yep. --- shell/contents/views/Desktop.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index e1125900..8876bc74 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -164,6 +164,23 @@ Item { z: 1 height: units.iconSizes.small color: "black" + + PlasmaCore.DataSource { + id: timeSource + engine: "time" + connectedSources: ["Local"] + interval: 500 + } + + Text { + id: clock + anchors.fill: parent + text: Qt.formatDateTime(timeSource.data.Local.DateTime) + color: "white" + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + font.pixelSize: height / 2 + } } ListView {