1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
GroupBox {
id: grpBox
title: "Add Invitees"
height: parent.height - 10
property alias nextButton: nextButton
property alias dateAndTime: dateAndTime
property string inviteesNameEmail
ColumnLayout {
id: columnLayout
anchors.fill: parent
anchors.rightMargin: 10
anchors.leftMargin: 10
spacing: 10
Text {
id: dateAndTime
width: 500
height: 50
text: "Select Date & Time from Chrono Menu"
font.pixelSize: 14
Accessible.role: Accessible.StaticText
Accessible.name: text
Accessible.description: "This is time and date label"
}
RowLayout {
id: rLayout
spacing: 6
Text {
text: "Name:"
font.pixelSize: 14
Accessible.role: Accessible.StaticText
Accessible.name: text
Accessible.description: "Provide invitee's name"
}
Rectangle {
width: 250
height: 22
color: "grey"
border.width: 1
border.color: "black"
Layout.fillWidth: true
Layout.minimumWidth: 50
Layout.preferredWidth: 200
Layout.maximumWidth: 300
TextEdit {
id: textEdit
clip: true
anchors.fill: parent
anchors.leftMargin: 6
anchors.centerIn: parent
Accessible.role: Accessible.EditableText
Accessible.name: text
Accessible.description: "Write invitee's name"
}
}
Text {
text: "Email:"
font.pixelSize: 14
Accessible.role: Accessible.StaticText
Accessible.name: text
Accessible.description: "Provide invitee's Email"
}
Rectangle {
width: 250
height: 22
color: "grey"
border.width: 1
border.color: "black"
Layout.fillWidth: true
Layout.minimumWidth: 50
Layout.preferredWidth: 200
Layout.maximumWidth: 300
TextEdit {
id: textEmail
clip: true
width: 250
height: 20
anchors.leftMargin: 6
anchors.centerIn: parent
anchors.fill: parent
Accessible.role: Accessible.EditableText
Accessible.name: text
Accessible.description: "Write invitee's Email"
}
}
}
Button {
id: addButton
text: "Add"
Layout.alignment: Qt.AlignRight
anchors.rightMargin: 10
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: "Press Button to add invitee's in the list"
onClicked: {
var name = textEdit.text
var email = textEmail.text
if (inviteesNameEmail == "") {
inviteesNameEmail += name + "<" + email + ">"
} else {
inviteesNameEmail += ", " + name + "<" + email + ">"
}
meetingInviteesModel.append({
"name": name,
"email": email
})
textEdit.text = ""
textEmail.text = ""
}
}
MeetingInviteesModel {
id: meetingInviteesModel
}
WasmListView {
Layout.fillWidth: true
height: 200
listModel: meetingInviteesModel
}
Button {
id: nextButton
text: "Next"
Layout.alignment: Qt.AlignRight
Accessible.role: Accessible.Button
Accessible.name: text
Accessible.description: "Press Button to go to next meeting Scheduler"
}
}
}
|