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
26
Property to store the state of an application (active or suspended)
28
property bool applicationState: Qt.application.active
31
objectName for functional testing purposes (autopilot-qt5)
36
applicationName for click packages (used as an unique app identifier)
38
applicationName: "com.ubuntu.clock"
41
This property enables the application to change orientation when the
42
device is rotated. This has been set to false since we are currently
43
only focussing on the phone interface.
45
automaticOrientation: false
48
The width and height defined below are the same dimension used by the
49
designers in the clock visual spec.
51
#NOTE: Do not change without a compelling reason.
56
backgroundColor: "#F5F5F5"
58
useDeprecatedToolbar: false
60
onApplicationStateChanged: {
61
// Update Clock time immediately when the clock app is brought from suspend
62
// instead of waiting for the next minute to update.
67
function updateTime() {
68
clock.time = Qt.formatTime(new Date(), "hh:mm")
78
onTriggered: updateTime()