Advertisement
faenil

Untitled

Jul 8th, 2011
119
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 1.0
  2.  
  3. Rectangle{
  4. id: confirmbox
  5. z: 120
  6. width: 260
  7. height: 240
  8.  
  9. property alias title: confirmtitletxt.text
  10. property alias msg: confirmtxt.text
  11. property alias disableMouseBackground: page.disableMouseBack
  12. opacity:0
  13. border.color: "black"
  14. Image{
  15. id: confirmbackground
  16. anchors.fill : parent
  17. source: "images/popup.png"
  18. }
  19.  
  20. Text{
  21. id: confirmtxt
  22. wrapMode: Text.WordWrap
  23. text: "You really want to exit?"
  24. anchors {verticalCenter:parent.verticalCenter; horizontalCenter:parent.horizontalCenter}
  25. }
  26.  
  27. Behavior on opacity {PropertyAnimation {duration: 400}}
  28.  
  29. Rectangle{
  30. id: confirmtitle
  31. anchors { top: parent.top; left: parent.left; right: parent.right }
  32. height: 65
  33. border.color: "black"
  34. border.width: 1
  35. color: "transparent"
  36. Text{
  37. id: confirmtitletxt
  38. wrapMode: Text.WordWrap
  39. text: "CONFIRM"
  40. anchors { verticalCenter: parent.verticalCenter ; left: parent.left; leftMargin: 80}
  41. }
  42. }
  43.  
  44.  
  45. Image{
  46. id: noimg
  47. source: "images/close.png"
  48. width: 64
  49. height: width
  50. anchors { bottom: parent.bottom; right: parent.right; bottomMargin: 10; rightMargin: 15 }
  51. MouseArea{
  52. anchors.fill: parent
  53.  
  54. onClicked: {confirmbox.opacity = 0; disableMouseBackground = false}
  55. }
  56. }
  57.  
  58. Image{
  59. id: yesimg
  60. source: "images/close.png"
  61. width: 64
  62. height: width
  63. anchors { bottom: parent.bottom; left: parent.left; bottomMargin: 10; leftMargin: 15 }
  64. MouseArea{
  65. id: yesarea
  66. anchors.fill: parent
  67. onClicked: confirmAction()
  68. }
  69. }
  70.  
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement