diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-10-02 07:10:05 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-10-02 07:12:18 (GMT) |
commit | c76bb1dcda7b0339d9de427d155b593b3779bea7 (patch) | |
tree | f5be1c9c8e35dca1b30071038f2321dc2f971bb9 | |
parent | 4795821108fa49c728cca7f575629def23e68df6 (diff) | |
download | Qt-c76bb1dcda7b0339d9de427d155b593b3779bea7.zip Qt-c76bb1dcda7b0339d9de427d155b593b3779bea7.tar.gz Qt-c76bb1dcda7b0339d9de427d155b593b3779bea7.tar.bz2 |
Enable QGraphicsBloomEffect in QML.
Also add this to the effect example.
Reviewed-by: Aaron Kennedy
-rw-r--r-- | examples/declarative/effects/test.qml | 18 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 4 |
2 files changed, 21 insertions, 1 deletions
diff --git a/examples/declarative/effects/test.qml b/examples/declarative/effects/test.qml index 4cc8746..ad03ef9 100644 --- a/examples/declarative/effects/test.qml +++ b/examples/declarative/effects/test.qml @@ -66,8 +66,24 @@ Rectangle { } + Image { + source: "pic.jpg" + + x: 400 + y: 300 + effect: Bloom { + blurRadius: 3 + brightness: 128 + strength: NumberAnimation { id: BLS; from: 0; to: 1; duration: 200; repeat: true; } + } + + MouseRegion { anchors.fill: parent; onClicked: BLS.running = !BLS.running } + + Text { color: "white"; text: "Bloom" } + } + Text { - x: 400; y: 300 + x: 100; y: 250 text: "Clicking Blur, Pixelize or DropShadow will \ntoggle animation." color: "black" } diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 7f4e6b1..4d31aaa 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -96,6 +96,10 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DropShadow,QGraphicsDropShadowEf QML_DECLARE_TYPE(QGraphicsOpacityEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Opacity,QGraphicsOpacityEffect) + +QML_DECLARE_TYPE(QGraphicsBloomEffect) +QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Bloom,QGraphicsBloomEffect) + /*! \qmlclass Transform \brief A transformation. |