MessageBox.qml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import QtQuick 1.0
  2. /*!
  3. * \file
  4. * \brief Message box for common use.
  5. *
  6. * Message box for start up and congratulation notifications.
  7. */
  8. Rectangle {
  9. id: myMessageBox
  10. x: 32
  11. y: 60
  12. width: 305
  13. height: 435
  14. anchors.centerIn: parent
  15. visible: true;
  16. border {width: 1; color: "gray"}
  17. radius: 5
  18. opacity: 0.9
  19. anchors.verticalCenterOffset: -2
  20. anchors.horizontalCenterOffset: -7
  21. Text {
  22. id: title
  23. x: 62
  24. y: 26
  25. width: 230
  26. height: 35
  27. text: "NFC peer-to-peer example"
  28. style: Text.Raised
  29. font.italic: false
  30. font.bold: true
  31. verticalAlignment: Text.AlignVCenter
  32. font.family: "Times New Roman"
  33. wrapMode: Text.WordWrap
  34. horizontalAlignment: Text.AlignHCenter
  35. font.pixelSize: 17
  36. }
  37. Image {
  38. id: icon
  39. x: 16
  40. y: 17
  41. width: 53
  42. height: 53
  43. source: "p2p_icon.png"
  44. }
  45. Rectangle {
  46. id: button
  47. x: 64;
  48. y: 380;
  49. width: 168;
  50. height: 36;
  51. color: "#9b98af";
  52. radius: 15;
  53. border.color: "#9b98af";
  54. border.width: 6;
  55. anchors.verticalCenterOffset: 144;
  56. anchors.horizontalCenterOffset: 0
  57. MouseArea {
  58. id: mouseArea
  59. anchors.fill: parent;
  60. onClicked: myMessageBox.visible = false
  61. }
  62. Text {
  63. id: textButton
  64. text: "Start to play"
  65. anchors.centerIn: parent
  66. horizontalAlignment: Text.AlignHCenter
  67. font.family: "Times New Roman"
  68. font.pixelSize: 21
  69. }
  70. }
  71. }