diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-11-09 03:48:03 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-11-09 03:48:03 (GMT) |
commit | 2f055c0140cce1b258316b0ec5dadda6e9e10228 (patch) | |
tree | f0d4b654c602954ef3cb3b15b121cfd42c7d398d /src/declarative/graphicsitems/qmlgraphicsflipable.cpp | |
parent | 7620586aa79c027e5dfd246d53232826333ce715 (diff) | |
download | Qt-2f055c0140cce1b258316b0ec5dadda6e9e10228.zip Qt-2f055c0140cce1b258316b0ec5dadda6e9e10228.tar.gz Qt-2f055c0140cce1b258316b0ec5dadda6e9e10228.tar.bz2 |
fix Flipable doc + update visual test.
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicsflipable.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsflipable.cpp | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp index 37929fa..862f414 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp @@ -69,36 +69,27 @@ public: Flipable allows you to specify a front and a back and then flip between those sides. \qml - Flipable { - id: flipable - width: 40 - height: 40 - axis: Axis { - startX: 20 - startY: 0 - endX: 20 - endY: 40 +Flipable { + width: 40; height: 40 + + transform: Rotation { + id: rotation + origin.x: 20; origin.y: 120 + axis.x: 0; axis.y: 1; axis.z: 0 + angle: 0 } + front: Image { source: "front.png" } back: Image { source: "back.png" } - states: [ - State { - name: "back" - SetProperty { - target: flipable - property: "rotation" - value: 180 - } - } - ] - transitions: [ - Transition { - NumberAnimation { - easing: "easeInOutQuad" - properties: "rotation" - } - } - ] + + states: State { + name: "back" + SetProperties { target: rotation; angle: 180 } + } + + transitions: Transition { + NumberAnimation { easing: "easeInOutQuad"; matchProperties: "rotation" } + } } \endqml |