Skip to content

Commit

Permalink
Update ClockSpinner.qml
Browse files Browse the repository at this point in the history
  • Loading branch information
majidkamali1370 committed Jun 19, 2017
1 parent 2dd66f1 commit e083ed6
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Loaders/ClockSpinner.qml
Original file line number Diff line number Diff line change
@@ -1 +1,63 @@
import QtQuick 2.7

Item {

// ----- Public Properties ----- //

property int lineThickness: 2
property color color: "white"

id: root
Component.onCompleted: {
rotationAnimation.start()
hourAnimation.start()
}

Rectangle {
id: line
color: root.color
width: root.lineThickness
height: root.width / 2
x: root.width / 2
y: root.height / 2
transformOrigin: Item.Top
rotation: 180
antialiasing: true
}

Rectangle {
id: hourLine
color: root.color
width: root.lineThickness
height: root.width / 3
x: root.width / 2
y: root.height / 2
transformOrigin: Item.Top
rotation: 180
antialiasing: true
}

NumberAnimation {
id: rotationAnimation
target: line
property: "rotation"
duration: 500
from: 180
to: 540
easing.type: Easing.Linear
loops: Animation.Infinite
}

NumberAnimation {
id: hourAnimation
target: hourLine
property: "rotation"
duration: 6000
from: 180
to: 540
easing.type: Easing.Linear
loops: Animation.Infinite
}
}


0 comments on commit e083ed6

Please sign in to comment.