Merge lp:~nik90/ubuntu-clock-app/stopwatch-add-blips into lp:ubuntu-clock-app/saucy

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 28
Merged at revision: 28
Proposed branch: lp:~nik90/ubuntu-clock-app/stopwatch-add-blips
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 65 lines (+43/-0)
2 files modified
stopwatch/Blip.qml (+37/-0)
stopwatch/StopwatchPage.qml (+6/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/stopwatch-add-blips
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Clock Developers Pending
Review via email: mp+158675@code.launchpad.net

Commit message

Add blips to stopwatch

Description of the change

This MP adds blip support to the stopwatch page. For more information refer to screenshot at http://design.canonical.com/wp-content/uploads/clock_recording_laps.png

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'stopwatch/Blip.qml'
--- stopwatch/Blip.qml 1970-01-01 00:00:00 +0000
+++ stopwatch/Blip.qml 2013-04-12 16:39:24 +0000
@@ -0,0 +1,37 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "../common/Constants.js" as Constants
4
5Rectangle {
6 id: stopwatchBlip
7
8 property int number: 0
9 property real radAngle: ((number % 60 * -6) * Math.PI / 180) - Math.PI
10 property real distance: 0.50
11 property real size: 2
12
13 z: parent.z - 1
14 width: units.gu(size); height: units.gu(size)
15 radius: width / 2
16 anchors.centerIn: parent
17 color: Constants.ubuntuOrange
18 antialiasing: true
19 visible: false
20
21 // Position the blip at the correct position
22 transform: Translate {
23 x: parent.width * distance * Math.sin(radAngle)
24 y: parent.height * distance * Math.cos(radAngle)
25 }
26
27 // Increase the radius and decrease the opacity gradually
28 Behavior on number {
29 ParallelAnimation {
30 running: false
31 NumberAnimation { target: stopwatchBlip; property: "size"; from: 1; to: 7; duration: 3500; easing.type: Easing.OutQuad}
32 NumberAnimation { target: stopwatchBlip; property: "opacity"; from: 1; to: 0; duration: 3500; easing.type: Easing.OutQuad}
33 }
34 }
35
36}
37
038
=== modified file 'stopwatch/StopwatchPage.qml'
--- stopwatch/StopwatchPage.qml 2013-04-12 12:19:07 +0000
+++ stopwatch/StopwatchPage.qml 2013-04-12 16:39:24 +0000
@@ -69,6 +69,10 @@
69 AnalogFaceBase {69 AnalogFaceBase {
70 id: clockOuterCircle70 id: clockOuterCircle
7171
72 Blip {
73 id: blipFist
74 }
75
72 HandGradient {76 HandGradient {
73 id: gradientSecond77 id: gradientSecond
74 rotationAngle: parseInt(stopwatchPage.secondHandValue) * perRadius78 rotationAngle: parseInt(stopwatchPage.secondHandValue) * perRadius
@@ -450,6 +454,8 @@
450 labelNumberLap1.text = countlap - 1454 labelNumberLap1.text = countlap - 1
451 move.start()455 move.start()
452 move2.start()456 move2.start()
457 blipFist.number = stopwatchPage.seconds
458 blipFist.visible = true
453 }459 }
454 }460 }
455 }461 }

Subscribers

People subscribed via source and target branches