-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathFastBlurEx.qml
85 lines (78 loc) · 2.13 KB
/
FastBlurEx.qml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import QtQuick 2.2
import QtGraphicalEffects 1.0
import QtQuick.Controls 1.2
Rectangle {
anchors.fill: parent;
Image {
id: opImage;
x: 4;
y: 4;
width: 250;
height: 250;
source: "bug.jpg";
sourceSize: Qt.size(250, 250);
smooth: true;
visible: false;
}
FastBlur {
id: fastblur;
anchors.fill: opImage;
source: opImage;
radius: 8;
}
Rectangle {
anchors.left: opImage.right;
anchors.top: opImage.top;
anchors.right: parent.right;
anchors.bottom: parent.bottom;
anchors.margins: 2;
color: "lightsteelblue";
CheckBox {
id: transparentBorder;
anchors.top: parent.top;
anchors.topMargin: 4;
anchors.left: parent.left;
anchors.leftMargin: 4;
checked: false;
text: "transparentBorder";
}
Text {
id: radiusLabel;
anchors.left: transparentBorder.left;
anchors.top: transparentBorder.bottom;
anchors.topMargin: 8;
text: "radius:";
}
Rectangle {
id: radiusArea;
anchors.left: radiusLabel.right;
anchors.leftMargin: 4;
anchors.top: radiusLabel.top;
height: 30;
width: 160;
color: "lightgray";
border.width: 1;
border.color: "darkgray";
TextInput {
anchors.fill: parent;
anchors.margins: 2;
id: radiusEdit;
font.pointSize: 18;
text: "8.0";
validator: DoubleValidator{bottom: 0;}
}
}
Button {
id: applyBtn;
anchors.left: parent.left;
anchors.leftMargin: 4;
anchors.top: radiusArea.bottom;
anchors.topMargin: 12;
text: "Apply";
onClicked: {
fastblur.transparentBorder = transparentBorder.checked;
fastblur.radius = parseFloat(radiusEdit.text);
}
}
}
}