TopPanel.qml 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
  2. import QtQuick 1.1
  3. Rectangle {
  4. z: 10
  5. id: topPanel
  6. property int pauseHide: 500
  7. function showPanel() {
  8. animShowPanel.running = true
  9. }
  10. function hidePanel() {
  11. animHidePanel.running = true
  12. }
  13. x: 0; y: -topPanel.height
  14. height: 40
  15. width: parent.width
  16. color: "black"
  17. opacity: 0.7
  18. SequentialAnimation {
  19. id: animHidePanel
  20. running: false
  21. PauseAnimation { duration: pauseHide }
  22. NumberAnimation {
  23. target: topPanel;
  24. property: "y";
  25. from: 0; to: -topPanel.height
  26. duration: 700;
  27. easing.type: Easing.InOutQuad
  28. }
  29. }
  30. NumberAnimation {
  31. running: false
  32. id: animShowPanel
  33. target: topPanel;
  34. property: "y";
  35. from: -topPanel.height; to: 0
  36. duration: 300;
  37. easing.type: Easing.InOutQuad
  38. }
  39. }