summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-04 05:34:26 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-04 05:34:26 (GMT)
commit0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c (patch)
treee0112b3ddefa71824e45d55f44517904e3c9680c /examples/declarative
parenta59291393cc70a1f922e4796efbb72b29920da27 (diff)
parentec502c9e9a26f984023e4f08126e033a504970b2 (diff)
downloadQt-0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c.zip
Qt-0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c.tar.gz
Qt-0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/effects/effects.qml75
1 files changed, 12 insertions, 63 deletions
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
index 851b2fe..e6efc75 100644
--- a/examples/declarative/effects/effects.qml
+++ b/examples/declarative/effects/effects.qml
@@ -2,11 +2,12 @@ import Qt 4.6
Rectangle {
color: "white"
- width: 600
- height: 600
+ width: 400
+ height: 200
Image {
id: blur
+ x: 5
source: "pic.png"
effect: Blur {
@@ -24,49 +25,9 @@ Rectangle {
Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
Image {
- id: grayscale
- source: "pic.png"
- x: 200
-
- effect: Grayscale {}
- }
-
- Text { text: "Grayscale"; anchors.top: grayscale.bottom; anchors.horizontalCenter: grayscale.horizontalCenter }
-
- Image {
- id: colorize
- source: "pic.png"
- x: 400
-
- effect: Colorize { color: "blue" }
- }
-
- Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
-
- Image {
- id: pixelize
- source: "pic.png"
- y: 300
-
- effect: Pixelize {
- pixelSize: NumberAnimation {
- id: pixelizeEffect
- from: 0; to: 10
- duration: 1000
- repeat: true
- }
- }
-
- MouseRegion { anchors.fill: parent; onClicked: pixelizeEffect.running = !pixelizeEffect.running }
- }
-
- Text { text: "Pixelize"; anchors.top: pixelize.bottom; anchors.horizontalCenter: pixelize.horizontalCenter }
-
- Image {
id: dropShadow
source: "pic.png"
- x: 200
- y: 300
+ x: 135
effect: DropShadow {
blurRadius: 3
@@ -77,33 +38,21 @@ Rectangle {
MouseRegion { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
}
- Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
-
Image {
- id: bloom
+ id: colorize
source: "pic.png"
- x: 400
- y: 300
+ x: 265
- effect: Bloom {
- blurRadius: 3
- brightness: 128
- strength: NumberAnimation {
- id: bloomEffect
- from: 0; to: 1
- duration: 1000
- repeat: true
- }
- }
-
- MouseRegion { anchors.fill: parent; onClicked: bloomEffect.running = !bloomEffect.running }
+ effect: Colorize { color: "blue" }
}
- Text { text: "Bloom"; anchors.top: bloom.bottom; anchors.horizontalCenter: bloom.horizontalCenter }
+ Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
+
+ Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
Text {
- x: 100; y: 250
- text: "Clicking Blur, Pixelize, Drop Shadow or Bloom will \ntoggle animation."
+ y: 155; anchors.horizontalCenter: parent.horizontalCenter
+ text: "Clicking Blur or Drop Shadow will \ntoggle animation."
color: "black"
}