summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeflipable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeflipable.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 69dd66a..4ecf87b 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -71,31 +71,40 @@ public:
\qmlclass Flipable QDeclarativeFlipable
\since 4.7
\ingroup qml-basic-interaction-elements
-
\brief The Flipable item provides a surface that can be flipped.
\inherits Item
Flipable is an item that can be visibly "flipped" between its front and
- back sides. It is used together with \l Rotation and \l {State}/\l {Transition} to
- produce a flipping effect.
+ back sides, like a card. It is used together with \l Rotation, \l State
+ and \l Transition elements to produce a flipping effect.
+
+ The \l front and \l back properties are used to hold the items that are
+ shown respectively on the front and back sides of the flipable item.
- Here is a Flipable that flips whenever it is clicked:
+ \section1 Example Usage
- \snippet doc/src/snippets/declarative/flipable.qml 0
+ \beginfloatright
+ \inlineimage flipable.gif
+ \endfloat
- \image flipable.gif
+ The following example shows a Flipable item that flips whenever it is
+ clicked, rotating about the y-axis.
The \l Rotation element is used to specify the angle and axis of the flip.
- When \c flipped is \c true, the item changes to the "back" state, where
+ When \c flipped is true, the item changes to the "back" state, where
the angle is changed to 180 degrees to produce the flipping effect.
- Finally, the \l Transition creates the animation that changes the
- angle over one second: when the item changes between its "back" and
+
+ \clearfloat
+ \snippet doc/src/snippets/declarative/flipable/flipable-snippet.qml 0
+
+ The \l Transition creates the animation that changes the angle over the
+ duration of one second. When the item changes between its "back" and
default states, the NumberAnimation animates the angle between
its old and new values.
See the \l {QML States} and \l {QML Animation} documentation for more
details on state changes and how animations work within transitions.
-
+
\sa {declarative/ui-components/flipable}{Flipable example}
*/