summaryrefslogtreecommitdiffstats
path: root/examples/declarative/toys/dial/content
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/toys/dial/content')
-rw-r--r--examples/declarative/toys/dial/content/Dial.qml37
-rw-r--r--examples/declarative/toys/dial/content/background.pngbin0 -> 35876 bytes
-rw-r--r--examples/declarative/toys/dial/content/needle.pngbin0 -> 342 bytes
-rw-r--r--examples/declarative/toys/dial/content/needle_shadow.pngbin0 -> 632 bytes
-rw-r--r--examples/declarative/toys/dial/content/overlay.pngbin0 -> 3564 bytes
5 files changed, 37 insertions, 0 deletions
diff --git a/examples/declarative/toys/dial/content/Dial.qml b/examples/declarative/toys/dial/content/Dial.qml
new file mode 100644
index 0000000..f9ab3e3
--- /dev/null
+++ b/examples/declarative/toys/dial/content/Dial.qml
@@ -0,0 +1,37 @@
+import Qt 4.7
+
+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
+ SpringFollow on angle {
+ spring: 1.4
+ damping: .15
+ to: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ }
+ }
+ }
+ Image { x: 21; y: 18; source: "overlay.png" }
+}
diff --git a/examples/declarative/toys/dial/content/background.png b/examples/declarative/toys/dial/content/background.png
new file mode 100644
index 0000000..75d555d
--- /dev/null
+++ b/examples/declarative/toys/dial/content/background.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/needle.png b/examples/declarative/toys/dial/content/needle.png
new file mode 100644
index 0000000..2d19f75
--- /dev/null
+++ b/examples/declarative/toys/dial/content/needle.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/needle_shadow.png b/examples/declarative/toys/dial/content/needle_shadow.png
new file mode 100644
index 0000000..8d8a928
--- /dev/null
+++ b/examples/declarative/toys/dial/content/needle_shadow.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/overlay.png b/examples/declarative/toys/dial/content/overlay.png
new file mode 100644
index 0000000..3860a7b
--- /dev/null
+++ b/examples/declarative/toys/dial/content/overlay.png
Binary files differ