Advertisement
Guest User

Untitled

a guest
Aug 10th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import QtQuick 2.1
  2. import QtQuick.Controls 1.0
  3.  
  4. Rectangle {
  5.     signal clicked
  6.     property string title
  7.     property string message1
  8.     property string message2
  9.     id: dialog
  10.     anchors.fill: parent
  11.     color: Qt.rgba(0, 0, 0, 0.5);
  12.  
  13.     function show()
  14.     {
  15.         dialog.visible = true;
  16.     }
  17.  
  18.     function hide()
  19.     {
  20.         dialog.visible = false;
  21.     }
  22.  
  23.     MouseArea {
  24.         anchors.fill: dialog
  25.         onClicked: {
  26.             dialog.clicked();
  27.         }
  28.     }
  29.  
  30.     Rectangle {
  31.         color: "#4fa46b"
  32.         height: parent.height/2
  33.         width: parent.width/2
  34.         anchors.centerIn: parent
  35.         border.width: 5
  36.         border.color: "#2e5f3e"
  37.  
  38.         ScrollView {
  39.             id: scroll
  40.             anchors.fill: parent
  41.             anchors.margins: 24
  42.  
  43.             Column  {
  44.                 spacing: 20
  45.  
  46.                 Text {
  47.                     color: 'white'
  48.                     text: dialog.title
  49.                     width: scroll.width
  50.                     wrapMode: Text.WordWrap
  51.                     font {
  52.                         pointSize: 22
  53.                         bold: true
  54.                     }
  55.                 }
  56.  
  57.                 Text {
  58.                     color: 'white'
  59.                     text: dialog.message1
  60.                     width: scroll.width
  61.                     wrapMode: Text.WordWrap
  62.                     font.pointSize: 12
  63.                 }
  64.  
  65.                 Text {
  66.                     color: 'white'
  67.                     text: dialog.message2
  68.                     width: scroll.width
  69.                     wrapMode: Text.WordWrap
  70.                     font.pointSize: 12
  71.                 }
  72.             }
  73.         }
  74.     }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement