blob: 51658ff6e605bc39ba490847361b69e006cae5c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
import Qt 4.6
Rectangle {
color: "white"
width: 400
height: 200
Image {
id: blur
x: 5
source: "pic.png"
effect: Blur {
blurRadius: NumberAnimation {
id: blurEffect
running: false
from: 0; to: 10
duration: 1000
repeat: true
}
}
MouseRegion { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
}
Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
Image {
id: dropShadow
source: "pic.png"
x: 135
effect: DropShadow {
blurRadius: 3
offset.x: 3
offset.y: NumberAnimation { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; }
}
MouseRegion { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
}
Image {
id: colorize
source: "pic.png"
x: 265
effect: Colorize { color: "blue" }
}
Text { text: "Colorize"; anchors.top: colorize.bottom; anchors.horizontalCenter: colorize.horizontalCenter }
Text { text: "Drop Shadow"; anchors.top: dropShadow.bottom; anchors.horizontalCenter: dropShadow.horizontalCenter }
Text {
y: 155; anchors.horizontalCenter: parent.horizontalCenter
text: "Clicking Blur or Drop Shadow will \ntoggle animation."
color: "black"
}
}
|