diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-01-08 04:32:41 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-01-08 04:32:41 (GMT) |
commit | 9151c4838ac7428107246abb9c99f296ab395c3d (patch) | |
tree | c677bd3fbe24ab3cdbde2b7a5e9cd608a1c8e27d /examples/declarative/plugins/files | |
parent | 42ab4b839af7d02258bc40389f11ec615cf42f0c (diff) | |
download | Qt-9151c4838ac7428107246abb9c99f296ab395c3d.zip Qt-9151c4838ac7428107246abb9c99f296ab395c3d.tar.gz Qt-9151c4838ac7428107246abb9c99f296ab395c3d.tar.bz2 |
Allow QML types defined in both C++ and QML files to be in the same module.
Diffstat (limited to 'examples/declarative/plugins/files')
-rw-r--r-- | examples/declarative/plugins/files/Clock.qml | 50 | ||||
-rw-r--r-- | examples/declarative/plugins/files/center.png | bin | 0 -> 765 bytes | |||
-rw-r--r-- | examples/declarative/plugins/files/clock.png | bin | 0 -> 20653 bytes | |||
-rw-r--r-- | examples/declarative/plugins/files/hour.png | bin | 0 -> 625 bytes | |||
-rw-r--r-- | examples/declarative/plugins/files/minute.png | bin | 0 -> 625 bytes |
5 files changed, 50 insertions, 0 deletions
diff --git a/examples/declarative/plugins/files/Clock.qml b/examples/declarative/plugins/files/Clock.qml new file mode 100644 index 0000000..01ec686 --- /dev/null +++ b/examples/declarative/plugins/files/Clock.qml @@ -0,0 +1,50 @@ +import Qt 4.6 + +Item { + id: clock + width: 200; height: 200 + + property alias city: cityLabel.text + property var hours + property var minutes + property var shift : 0 + + Image { id: background; source: "clock.png" } + + Image { + x: 92.5; y: 27 + source: "hour.png" + smooth: true + transform: Rotation { + id: hourRotation + origin.x: 7.5; origin.y: 73; angle: 0 + angle: SpringFollow { + spring: 2; damping: 0.2; modulus: 360 + source: (clock.hours * 30) + (clock.minutes * 0.5) + } + } + } + + Image { + x: 93.5; y: 17 + source: "minute.png" + smooth: true + transform: Rotation { + id: minuteRotation + origin.x: 6.5; origin.y: 83; angle: 0 + angle: SpringFollow { + spring: 2; damping: 0.2; modulus: 360 + source: clock.minutes * 6 + } + } + } + + Image { + anchors.centerIn: background; source: "center.png" + } + + Text { + id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white" + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/examples/declarative/plugins/files/center.png b/examples/declarative/plugins/files/center.png Binary files differnew file mode 100644 index 0000000..7fbd802 --- /dev/null +++ b/examples/declarative/plugins/files/center.png diff --git a/examples/declarative/plugins/files/clock.png b/examples/declarative/plugins/files/clock.png Binary files differnew file mode 100644 index 0000000..462edac --- /dev/null +++ b/examples/declarative/plugins/files/clock.png diff --git a/examples/declarative/plugins/files/hour.png b/examples/declarative/plugins/files/hour.png Binary files differnew file mode 100644 index 0000000..f8061a1 --- /dev/null +++ b/examples/declarative/plugins/files/hour.png diff --git a/examples/declarative/plugins/files/minute.png b/examples/declarative/plugins/files/minute.png Binary files differnew file mode 100644 index 0000000..1297ec7 --- /dev/null +++ b/examples/declarative/plugins/files/minute.png |