summaryrefslogtreecommitdiffstats
path: root/examples/declarative/flipable/flipable-example.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/flipable/flipable-example.qml')
-rw-r--r--examples/declarative/flipable/flipable-example.qml40
1 files changed, 8 insertions, 32 deletions
diff --git a/examples/declarative/flipable/flipable-example.qml b/examples/declarative/flipable/flipable-example.qml
index c837ebc..eebc721 100644
--- a/examples/declarative/flipable/flipable-example.qml
+++ b/examples/declarative/flipable/flipable-example.qml
@@ -1,37 +1,13 @@
-//! [0]
import Qt 4.6
+import "content"
-Flipable {
- id: flipable
- width: 240
- height: 240
+Rectangle {
+ id: window; width: 480; height: 320
+ color: "darkgreen"
- property int angle: 0
- property bool flipped: false
-
- front: Image { source: "front.png" }
- back: Image { source: "back.png" }
-
- transform: Rotation {
- origin.x: flipable.width/2; origin.y: flipable.height/2
- axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
- angle: flipable.angle
- }
-
- states: State {
- name: "back"
- PropertyChanges { target: flipable; angle: 180 }
- when: flipable.flipped
- }
-
- transitions: Transition {
- NumberAnimation { properties: "angle"; duration: 1000 }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: flipable.flipped = !flipable.flipped
+ Row {
+ anchors.centerIn: parent; spacing: 30
+ Card { image: "content/9_club.png"; angle: 180; yAxis: 1 }
+ Card { image: "content/5_heart.png"; angle: 540; xAxis: 1 }
}
}
-//! [0]
-