summaryrefslogtreecommitdiffstats
path: root/examples/declarative/dial/DialLibrary/Dial.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/dial/DialLibrary/Dial.qml')
-rw-r--r--examples/declarative/dial/DialLibrary/Dial.qml13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml
new file mode 100644
index 0000000..acff119
--- /dev/null
+++ b/examples/declarative/dial/DialLibrary/Dial.qml
@@ -0,0 +1,13 @@
+<Item width="210" height="210">
+ <properties><Property name="value" type="real" value="0"/></properties>
+ <Image id="Background" src="background.svg"/>
+ <Item x="102" y="98" rotation="-130">
+ <rotation><Follow spring="1.4" damping=".15" source="{Math.min(Math.max(-130, value*2.2 - 130), 133)}"/></rotation>
+ <Image src="needle.svg" x="-102" y="-98"/>
+ </Item>
+ <Item x="104" y="102" rotation="-130">
+ <rotation><Follow spring="1.4" damping=".15" source="{Math.min(Math.max(-130, value*2.2 - 130), 133)}"/></rotation>
+ <Image src="needle_shadow.svg" x="-104" y="-102"/>
+ </Item>
+ <Image src="overlay.svg"/>
+</Item>