QuiaStartMe.qml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import Qt 4.7
  2. Rectangle {
  3. width: 800
  4. height: 480
  5. gradient: Gradient {
  6. GradientStop {
  7. position: 0
  8. color: "#000000"
  9. }
  10. GradientStop {
  11. position: 0.45
  12. color: "#807c7c"
  13. }
  14. GradientStop {
  15. position: 1
  16. color: "#000000"
  17. }
  18. }
  19. Flipable {
  20. id: flipable
  21. x: 0
  22. y: 0
  23. property bool flipped: false
  24. width: parent.width
  25. height: parent.height
  26. front: QuiaLoginScreen { id: loginScreen }
  27. back: QuiaMainView { id: mainView }
  28. transform: Rotation {
  29. id: rotation
  30. origin.x: flipable.width/2
  31. origin.y: flipable.height/2
  32. axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis
  33. angle: 0 // the default angle
  34. }
  35. states: State {
  36. name: "back"
  37. PropertyChanges { target: rotation; angle: 180 }
  38. when: flipable.flipped
  39. }
  40. transitions: Transition {
  41. NumberAnimation { target: rotation; property: "angle"; duration: 1000 }
  42. }
  43. /*MouseArea {
  44. anchors.fill: parent
  45. onClicked: flipable.flipped = !flipable.flipped
  46. }*/
  47. }
  48. }