ApplicationDelegate.qml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import Qt 4.7
  2. Rectangle {
  3. id: self
  4. width: 450
  5. height: 114
  6. radius: 10
  7. clip: true
  8. signal clicked()
  9. gradient: Gradient {
  10. GradientStop { position: 0.0; color: "#427AB8" }
  11. GradientStop { position: 1.0; color: "#618AB8" }
  12. }
  13. Rectangle {
  14. anchors.fill: parent
  15. color: "black"
  16. opacity: mouseArea.pressed?0.2:0.0
  17. Behavior on opacity {
  18. NumberAnimation {
  19. duration: 150
  20. }
  21. }
  22. }
  23. Image {
  24. id: img
  25. height: 94
  26. width: 90
  27. asynchronous: true
  28. fillMode: Image.PreserveAspectCrop
  29. clip: true
  30. source: screenshot
  31. anchors {
  32. left: parent.left
  33. leftMargin: 9
  34. verticalCenter: parent.verticalCenter
  35. }
  36. }
  37. Text {
  38. id: nameText
  39. anchors {
  40. top: img.top
  41. left: img.right
  42. leftMargin: 9
  43. }
  44. font.pixelSize: 24
  45. font.family: "Nokia Standard"
  46. text: name
  47. }
  48. Text {
  49. anchors {
  50. top: nameText.bottom
  51. topMargin: 6
  52. bottom: img.bottom
  53. left: img.right
  54. leftMargin: 9
  55. right: parent.right
  56. rightMargin: 9
  57. }
  58. clip: true
  59. wrapMode: Text.WordWrap
  60. font.pixelSize: 16
  61. font.family: "Nokia Standard"
  62. text: desc
  63. }
  64. MouseArea {
  65. id: mouseArea
  66. anchors.fill: parent
  67. onClicked: {
  68. starter.start(binary);
  69. }
  70. }
  71. }