examples/declarative/ui-components/flipable/content/Card.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    47     property bool flipped: true
    47     property bool flipped: true
    48     property int xAxis: 0
    48     property int xAxis: 0
    49     property int yAxis: 0
    49     property int yAxis: 0
    50     property int angle: 0
    50     property int angle: 0
    51 
    51 
    52     width: front.width; height: front.height; state: "back"
    52     width: front.width; height: front.height 
    53 
    53 
    54     front: Image { id: frontImage; smooth: true }
    54     front: Image { id: frontImage; smooth: true }
    55     back: Image { source: "back.png"; smooth: true }
    55     back: Image { source: "back.png"; smooth: true }
       
    56 
       
    57     state: "back"
    56 
    58 
    57     MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
    59     MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
    58 
    60 
    59     transform: Rotation {
    61     transform: Rotation {
    60         id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
    62         id: rotation; origin.x: container.width / 2; origin.y: container.height / 2