From ce2581dc8e77a9e1e27730a1b22257323a067d97 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 30 Oct 2009 13:55:07 +1000 Subject: change cities in clock example --- examples/declarative/clocks/clocks.qml | 4 ++-- examples/declarative/clocks/content/Clock.qml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/clocks/clocks.qml index 3235153..624748a 100644 --- a/examples/declarative/clocks/clocks.qml +++ b/examples/declarative/clocks/clocks.qml @@ -9,7 +9,7 @@ Rectangle { Grid { columns: 3 Clock { city: "New York"; shift: -4 } - Clock { city: "London" } - Clock { city: "Brisbane"; shift: 10 } + Clock { city: "Mumbai"; shift: 5.5 } + Clock { city: "Tokyo"; shift: 9 } } } diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml index 636c99f..4e9984f 100644 --- a/examples/declarative/clocks/content/Clock.qml +++ b/examples/declarative/clocks/content/Clock.qml @@ -8,12 +8,12 @@ Item { property var hours property var minutes property var seconds - property int shift : 0 + property var shift : 0 function timeChanged() { var date = new Date; - hours = date.getUTCHours() + clock.shift - minutes = date.getUTCMinutes(); + hours = date.getUTCHours() + Math.floor(clock.shift) + minutes = date.getUTCMinutes() + ((clock.shift % 1) * 60); seconds = date.getUTCSeconds(); } -- cgit v0.12