summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-30 02:24:15 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-30 02:24:15 (GMT)
commitaccd6aafb042c1081d975c9b284139494b056a4b (patch)
treecb6a3f32b532c0978e890148a8e0072379247b52
parent77fee8c28157186837807b53776fd93a94130cfa (diff)
parent72932c6683729071c1acb3f4832c5dc53a561bdd (diff)
downloadQt-accd6aafb042c1081d975c9b284139494b056a4b.zip
Qt-accd6aafb042c1081d975c9b284139494b056a4b.tar.gz
Qt-accd6aafb042c1081d975c9b284139494b056a4b.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--examples/declarative/border-image/animated.qml17
-rw-r--r--examples/declarative/border-image/borders.qml4
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml (renamed from examples/declarative/border-image/MyBorderImage.qml)0
-rw-r--r--examples/declarative/border-image/content/bw.png (renamed from examples/declarative/border-image/bw.png)bin1357 -> 1357 bytes
-rw-r--r--examples/declarative/border-image/content/colors-round.sci (renamed from examples/declarative/border-image/colors-round.sci)0
-rw-r--r--examples/declarative/border-image/content/colors-stretch.sci (renamed from examples/declarative/border-image/colors-stretch.sci)0
-rw-r--r--examples/declarative/border-image/content/colors.png (renamed from examples/declarative/border-image/colors.png)bin1655 -> 1655 bytes
-rw-r--r--examples/declarative/border-image/example.qml31
-rw-r--r--examples/declarative/clock/Clock.qml80
-rw-r--r--examples/declarative/clock/display.qml7
-rw-r--r--examples/declarative/clock/hour.pngbin391 -> 0 bytes
-rw-r--r--examples/declarative/clock/minute.pngbin445 -> 0 bytes
-rw-r--r--examples/declarative/clock/second.pngbin345 -> 0 bytes
-rw-r--r--examples/declarative/clocks/clocks.qml15
-rw-r--r--examples/declarative/clocks/content/Clock.qml77
-rw-r--r--examples/declarative/clocks/content/background.png (renamed from examples/declarative/clock/background.png)bin46895 -> 46895 bytes
-rwxr-xr-xexamples/declarative/clocks/content/center.pngbin0 -> 765 bytes
-rwxr-xr-xexamples/declarative/clocks/content/clock.pngbin0 -> 21780 bytes
-rwxr-xr-xexamples/declarative/clocks/content/hour.pngbin0 -> 625 bytes
-rwxr-xr-xexamples/declarative/clocks/content/minute.pngbin0 -> 625 bytes
-rwxr-xr-xexamples/declarative/clocks/content/second.pngbin0 -> 303 bytes
21 files changed, 103 insertions, 128 deletions
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
index aaaf495..29c02b3 100644
--- a/examples/declarative/border-image/animated.qml
+++ b/examples/declarative/border-image/animated.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import "content"
Rectangle {
id: page
@@ -8,47 +9,47 @@ Rectangle {
MyBorderImage {
x: 20; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
- source: "colors.png"; margin: 30
+ source: "content/colors.png"; margin: 30
}
MyBorderImage {
x: 270; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
- source: "colors.png"; margin: 30
+ source: "content/colors.png"; margin: 30
horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 520; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
- source: "colors.png"; margin: 30
+ source: "content/colors.png"; margin: 30
horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 770; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
- source: "colors.png"; margin: 30
+ source: "content/colors.png"; margin: 30
horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
MyBorderImage {
x: 20; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
- source: "bw.png"; margin: 10
+ source: "content/bw.png"; margin: 10
}
MyBorderImage {
x: 270; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
- source: "bw.png"; margin: 10
+ source: "content/bw.png"; margin: 10
horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 520; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
- source: "bw.png"; margin: 10
+ source: "content/bw.png"; margin: 10
horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 770; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
- source: "bw.png"; margin: 10
+ source: "content/bw.png"; margin: 10
horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
}
diff --git a/examples/declarative/border-image/borders.qml b/examples/declarative/border-image/borders.qml
index e90abe6..9879416 100644
--- a/examples/declarative/border-image/borders.qml
+++ b/examples/declarative/border-image/borders.qml
@@ -8,11 +8,11 @@ Rectangle {
BorderImage {
x: 20; y: 20; width: 230; height: 240
smooth: true
- source: "colors-stretch.sci"
+ source: "content/colors-stretch.sci"
}
BorderImage {
x: 270; y: 20; width: 230; height: 240
smooth: true
- source: "colors-round.sci"
+ source: "content/colors-round.sci"
}
}
diff --git a/examples/declarative/border-image/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
index 9eb1270..9eb1270 100644
--- a/examples/declarative/border-image/MyBorderImage.qml
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
diff --git a/examples/declarative/border-image/bw.png b/examples/declarative/border-image/content/bw.png
index 486eaae..486eaae 100644
--- a/examples/declarative/border-image/bw.png
+++ b/examples/declarative/border-image/content/bw.png
Binary files differ
diff --git a/examples/declarative/border-image/colors-round.sci b/examples/declarative/border-image/content/colors-round.sci
index 506f6f5..506f6f5 100644
--- a/examples/declarative/border-image/colors-round.sci
+++ b/examples/declarative/border-image/content/colors-round.sci
diff --git a/examples/declarative/border-image/colors-stretch.sci b/examples/declarative/border-image/content/colors-stretch.sci
index e4989a7..e4989a7 100644
--- a/examples/declarative/border-image/colors-stretch.sci
+++ b/examples/declarative/border-image/content/colors-stretch.sci
diff --git a/examples/declarative/border-image/colors.png b/examples/declarative/border-image/content/colors.png
index dfb62f3..dfb62f3 100644
--- a/examples/declarative/border-image/colors.png
+++ b/examples/declarative/border-image/content/colors.png
Binary files differ
diff --git a/examples/declarative/border-image/example.qml b/examples/declarative/border-image/example.qml
deleted file mode 100644
index 25c19d9..0000000
--- a/examples/declarative/border-image/example.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- id: page
- color: "white"
- width: 520; height: 280
-
- Row {
- anchors.centerIn: parent
- spacing: 50
-//! [0]
- BorderImage {
- width: 180; height: 180
- border.left: 30; border.top: 30
- border.right: 30; border.bottom: 30
- horizontalTileMode: BorderImage.Stretch
- verticalTileMode: BorderImage.Stretch
- source: "colors.png"
- }
-
- BorderImage {
- width: 180; height: 180
- border.left: 30; border.top: 30
- border.right: 30; border.bottom: 30
- horizontalTileMode: BorderImage.Round
- verticalTileMode: BorderImage.Round
- source: "colors.png"
- }
-//! [0]
- }
-}
diff --git a/examples/declarative/clock/Clock.qml b/examples/declarative/clock/Clock.qml
deleted file mode 100644
index a061488..0000000
--- a/examples/declarative/clock/Clock.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-import Qt 4.6
-
-Item {
- id: clock
- width: 200; height: 200
- property var time
- property var hours
- property var minutes
- property var seconds
- onTimeChanged: {
- var date = new Date;
- hours = date.getHours();
- minutes = date.getMinutes();
- seconds = date.getSeconds();
- }
- Timer {
- interval: 100; running: true; repeat: true; triggeredOnStart: true
- onTriggered: clock.time = new Date()
- }
-
- Image { source: "background.png" }
- Image {
- x: 95
- y: 54
- source: "hour.png"
- smooth: true
- transform: Rotation {
- id: hourRotation
- origin.x: 4; origin.y: 45
- angle: 0
- angle: SpringFollow {
- spring: 2
- damping: .2
- source: clock.hours * 50 * 3 + clock.minutes / 2
- }
- }
- }
- Image {
- x: 95
- y: 30
- source: "minute.png"
- smooth: true
- transform: Rotation {
- id: minuteRotation
- origin.x: 4; origin.y: 70
- angle: 0
- angle: SpringFollow {
- spring: 2
- damping: .2
- source: clock.minutes * 6
- }
- }
- }
- Image {
- x: 96
- y: 40
- source: "second.png"
- smooth: true
- transform: Rotation {
- id: secondRotation
- origin.x: 2; origin.y: 60
- angle: 0
- angle: SpringFollow {
- spring: 5
- damping: .25
- modulus: 360
- source: clock.seconds * 6
- }
- }
- }
-
- Rectangle {
- x: 93
- y: 94
- width: 11
- height: 11
- radius: 5
- color: "black"
- }
-}
diff --git a/examples/declarative/clock/display.qml b/examples/declarative/clock/display.qml
deleted file mode 100644
index 20e254d..0000000
--- a/examples/declarative/clock/display.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- width: childrenRect.width
- height: childrenRect.height
- Clock { id: clock }
-}
diff --git a/examples/declarative/clock/hour.png b/examples/declarative/clock/hour.png
deleted file mode 100644
index 603466b..0000000
--- a/examples/declarative/clock/hour.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/clock/minute.png b/examples/declarative/clock/minute.png
deleted file mode 100644
index 0207405..0000000
--- a/examples/declarative/clock/minute.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/clock/second.png b/examples/declarative/clock/second.png
deleted file mode 100644
index bfcef68..0000000
--- a/examples/declarative/clock/second.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/clocks/clocks.qml
new file mode 100644
index 0000000..3235153
--- /dev/null
+++ b/examples/declarative/clocks/clocks.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ width: childrenRect.width
+ height: childrenRect.height
+ color: "#646464"
+
+ Grid {
+ columns: 3
+ Clock { city: "New York"; shift: -4 }
+ Clock { city: "London" }
+ Clock { city: "Brisbane"; shift: 10 }
+ }
+}
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
new file mode 100644
index 0000000..636c99f
--- /dev/null
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -0,0 +1,77 @@
+import Qt 4.6
+
+Item {
+ id: clock
+ width: 200; height: 230
+
+ property alias city: cityLabel.text
+ property var hours
+ property var minutes
+ property var seconds
+ property int shift : 0
+
+ function timeChanged() {
+ var date = new Date;
+ hours = date.getUTCHours() + clock.shift
+ minutes = date.getUTCMinutes();
+ seconds = date.getUTCSeconds();
+ }
+
+ Timer {
+ interval: 1000; running: true; repeat: true; triggeredOnStart: true
+ onTriggered: clock.timeChanged()
+ }
+
+ 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 {
+ x: 97.5; y: 20
+ source: "second.png"
+ smooth: true
+ transform: Rotation {
+ id: secondRotation
+ origin.x: 2.5; origin.y: 80; angle: 0
+ angle: SpringFollow {
+ spring: 5; damping: 0.25; modulus: 360
+ source: clock.seconds * 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/clock/background.png b/examples/declarative/clocks/content/background.png
index a885950..a885950 100644
--- a/examples/declarative/clock/background.png
+++ b/examples/declarative/clocks/content/background.png
Binary files differ
diff --git a/examples/declarative/clocks/content/center.png b/examples/declarative/clocks/content/center.png
new file mode 100755
index 0000000..7fbd802
--- /dev/null
+++ b/examples/declarative/clocks/content/center.png
Binary files differ
diff --git a/examples/declarative/clocks/content/clock.png b/examples/declarative/clocks/content/clock.png
new file mode 100755
index 0000000..30bc577
--- /dev/null
+++ b/examples/declarative/clocks/content/clock.png
Binary files differ
diff --git a/examples/declarative/clocks/content/hour.png b/examples/declarative/clocks/content/hour.png
new file mode 100755
index 0000000..f8061a1
--- /dev/null
+++ b/examples/declarative/clocks/content/hour.png
Binary files differ
diff --git a/examples/declarative/clocks/content/minute.png b/examples/declarative/clocks/content/minute.png
new file mode 100755
index 0000000..1297ec7
--- /dev/null
+++ b/examples/declarative/clocks/content/minute.png
Binary files differ
diff --git a/examples/declarative/clocks/content/second.png b/examples/declarative/clocks/content/second.png
new file mode 100755
index 0000000..4aa9fb5
--- /dev/null
+++ b/examples/declarative/clocks/content/second.png
Binary files differ