Advertisement
Guest User

Untitled

a guest
Jul 5th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. import QtQuick 2.0
  2. import Ubuntu.Components 0.1
  3.  
  4. MainView {
  5. width: units.gu(100)
  6. height: units.gu(75)
  7.  
  8. Page {
  9. id: mpage
  10. title: i18n.tr("BoxInABand")
  11.  
  12. Column {
  13. id: mpane
  14. x: 0
  15. y: 0
  16.  
  17. anchors {
  18. fill: parent
  19. }
  20.  
  21. spacing: units.gu(1)
  22.  
  23.  
  24. Item {
  25.  
  26. anchors.centerIn: parent
  27.  
  28. Action {
  29. id: play
  30. text: "Play!"
  31. onTriggered: mpane.state = "playing"
  32.  
  33. }
  34. Button {
  35. anchors.centerIn: parent
  36. action: play
  37. }
  38. }
  39.  
  40.  
  41.  
  42. states: [
  43. State {
  44. name: "playing"
  45. PropertyChanges {
  46. target: playPane
  47. smooth: false
  48. x: 0
  49. y: 0
  50. color: "orange"
  51.  
  52.  
  53. }
  54. }
  55. ]
  56.  
  57.  
  58.  
  59.  
  60. }
  61. Rectangle {
  62. id: playPane
  63. color: "black"
  64. width: mpage.width
  65. height: mpage.height
  66. x: mpage.width
  67. y: 0
  68. border.color: "white"
  69. border.width: 5
  70. radius: 20
  71. smooth: true
  72. opacity: 0.8
  73.  
  74. transitions: Transition {
  75. ParallelAnimation {
  76. NumberAnimation { properties: x,y; duration: 500; easing.type: Easing.InOutQuad }
  77. ColorAnimation { duration: 500 }
  78. }
  79.  
  80. }
  81. Item {
  82.  
  83. anchors.verticalCenter: parent.verticalCenter
  84. anchors.horizontalCenter: parent.horizontalCenter
  85.  
  86. Action {
  87. id: closePlay
  88. text: "Close Player"
  89. onTriggered: mpane.state = ""
  90.  
  91. }
  92. Button {
  93. anchors.centerIn: parent
  94. action: closePlay
  95. }
  96. }
  97. }
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement