summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dial/content/Dial.qml
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-14 23:08:01 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-14 23:08:01 (GMT)
commit2d23e45c94b6115db2b1efadfe77841f481545ca (patch)
tree0e6ff89dbcc410dd2ef5b0e873473971f3dd1b07 /examples/declarative/dial/content/Dial.qml
parent65e0628bd0cdcb43226dad05582a97a6ef218124 (diff)
parent42dda19d82ceea48f19d356cfaf2b26acb763df8 (diff)
downloadQt-2d23e45c94b6115db2b1efadfe77841f481545ca.zip
Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.gz
Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.bz2
Merge remote branch 'origin/master' into bearermanagement/integration
Conflicts: tests/auto/qlineedit/tst_qlineedit.cpp
Diffstat (limited to 'examples/declarative/dial/content/Dial.qml')
-rw-r--r--examples/declarative/dial/content/Dial.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml
new file mode 100644
index 0000000..6fd0f39
--- /dev/null
+++ b/examples/declarative/dial/content/Dial.qml
@@ -0,0 +1,37 @@
+import Qt 4.6
+
+Item {
+ id: root
+ property real value : 0
+
+ width: 210; height: 210
+
+ Image { source: "background.png" }
+
+ Image {
+ x: 93
+ y: 35
+ source: "needle_shadow.png"
+ transform: Rotation {
+ origin.x: 11; origin.y: 67
+ angle: needleRotation.angle
+ }
+ }
+ Image {
+ id: needle
+ x: 95; y: 33
+ smooth: true
+ source: "needle.png"
+ transform: Rotation {
+ id: needleRotation
+ origin.x: 7; origin.y: 65
+ angle: -130
+ angle: SpringFollow {
+ spring: 1.4
+ damping: .15
+ source: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ }
+ }
+ }
+ Image { x: 21; y: 18; source: "overlay.png" }
+}