2
* Copyright (C) 2014 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 1.1
19
import "../components"
24
property alias time: digitalTime.text
29
anchors.verticalCenter: parent.verticalCenter
30
anchors.verticalCenterOffset: -parent.height/6
31
anchors.horizontalCenter: parent.horizontalCenter
33
Component.onCompleted: clockOpenAnimation.start()
36
id: clockOpenAnimation
39
id: outerCircleAnimation
48
script: animationTimer.start()
56
anchors.centerIn: parent
62
onTriggered: innerCircleAnimation.start()
66
id: innerCircleAnimation
77
property: "font.pixelSize"
85
anchors.centerIn: parent
86
color: UbuntuColors.midAubergine
87
opacity: font.pixelSize === units.dp(41) ? 1 : 0
88
text: Qt.formatTime(new Date(), "hh:mm")