Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 3.64 KB | None | 0 0
  1. import QtQuick 2.12
  2. import QtQuick.Window 2.12
  3. import QtQuick.Controls 2.5
  4. import QtQuick.Layouts 1.3
  5. import QtQuick.Dialogs 1.2
  6. import br.com.ultimatec.convidadodata 1.0
  7.  
  8. Window {
  9.     id: window
  10.     visible: true
  11.     width: 640
  12.     height: 480
  13.     title: qsTr("Tela Inicial")
  14.  
  15.     Rectangle {
  16.         id: rectangle
  17.         x: 166
  18.         y: 212
  19.         width: 294
  20.         height: 172
  21.         color: "#ffffff"
  22.         radius: 25
  23.         anchors.horizontalCenterOffset: 0
  24.         border.width: 5
  25.         anchors.horizontalCenter: parent.horizontalCenter
  26.  
  27.         ConvidadoData {
  28.             id: convidadodata
  29.  
  30.         }
  31.  
  32.         Rectangle {
  33.             id: rectangle1
  34.             x: 41
  35.             y: 41
  36.             width: 246
  37.             height: 45
  38.             color: "#ffffff"
  39.             radius: 20
  40.             border.width: 2
  41.             border.color: "#000000"
  42.             anchors.horizontalCenter: parent.horizontalCenter
  43.  
  44.             TextInput {
  45.                 id: textInput
  46.                 text: ""
  47.                 padding: 0
  48.                 anchors.bottom: parent.bottom
  49.                 anchors.bottomMargin: 6
  50.                 anchors.top: parent.top
  51.                 anchors.topMargin: 10
  52.                 anchors.left: parent.left
  53.                 anchors.leftMargin: 20
  54.                 anchors.right: parent.right
  55.                 anchors.rightMargin: 20
  56.                 passwordCharacter: "\u25cf"
  57.                 inputMask: qsTr("")
  58.                 smooth: true
  59.                 visible: true
  60.                 clip: true
  61.                 renderType: Text.QtRendering
  62.                 cursorVisible: false
  63.                 autoScroll: false
  64.                 echoMode: TextInput.Password
  65.                 horizontalAlignment: Text.AlignHCenter
  66.                 font.family: "Arial"
  67.                 font.pixelSize: 16
  68.                 focus: true
  69.                 onEditingFinished: convidadodata.code = text
  70.             }
  71.         }
  72.  
  73.         Text {
  74.             id: element1
  75.             x: 135
  76.             y: 116
  77.             color: "#000000"
  78.             text: qsTr("QR Code")
  79.             anchors.horizontalCenterOffset: 0
  80.             font.weight: Font.Bold
  81.             font.capitalization: Font.MixedCase
  82.             font.pointSize: 14
  83.             font.family: "Arial"
  84.             horizontalAlignment: Text.AlignHCenter
  85.             verticalAlignment: Text.AlignVCenter
  86.             anchors.horizontalCenter: parent.horizontalCenter
  87.         }
  88.     }
  89.  
  90.     MessageDialog {
  91.         id: testDialog
  92.         title: "Bem-Vindo!"
  93.         text: "Nome: "+convidadodata.nome +"\nIdade: "+convidadodata.idade
  94.         icon: "Information"        
  95.         onAccepted: {
  96.             text: "OK"
  97.             Qt.quit()
  98.         }
  99.         //Component.onCompleted: visible = true
  100.     }
  101.  
  102.     Image {
  103.         id: image
  104.         x: 262
  105.         y: 55
  106.         width: 100
  107.         height: 100
  108.         anchors.horizontalCenter: parent.horizontalCenter
  109.         source: "uopatch-MCE.png"
  110.         fillMode: Image.PreserveAspectCrop
  111.     }
  112.  
  113.     Text {
  114.         id: element
  115.         x: 288
  116.         y: 437
  117.         color: "#000000"
  118.         text: qsTr("Ultima Tecβ„’")
  119.         anchors.bottom: parent.bottom
  120.         anchors.bottomMargin: 15
  121.         anchors.horizontalCenter: parent.horizontalCenter
  122.         verticalAlignment: Text.AlignVCenter
  123.         font.weight: Font.Bold
  124.         font.family: "Arial"
  125.         styleColor: "#067600"
  126.         font.pixelSize: 14
  127.     }
  128.  
  129.     Connections {
  130.         target: textInput
  131.         onEditingFinished: {
  132.             testDialog.open()
  133.             convidadodata.getFindUser(textInput.text)
  134.         }
  135.  
  136.     }
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement