~nicohman/signal-rs

ref: ad7bba6ed316afe281e38a8327baf7c1bbf824da signal-rs/qml/contacts/CreateContact.qml -rw-r--r-- 1.5 KiB
ad7bba6e — nicohman Basic attachments 4 months ago
                                                                                
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
import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.13 as Kirigami

Kirigami.Page {
    title: "Create a New Contact"
    ColumnLayout {
        x: 20
        y: 10
        //anchors.fill: parent
        anchors.right: parent.right
        anchors.left: parent.left
        spacing: 10
        Label {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 

            font.pixelSize: Qt.application.font.pixelSize * 1.3
            text: "Contact Name"
            height: 20
        }
        TextField {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 
        	id: contactNameInput
        	placeholderText: "Contact Name"
        }

        Label {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop  
            font.pixelSize: Qt.application.font.pixelSize * 1.3
            text: "Contact Phone"
        }
        Label {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop  
            font.pixelSize: Qt.application.font.pixelSize
            text: "(Must include + and country code)"
        }
        TextField {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 
        	id:contactPhoneInput
        	placeholderText: "+1234567890"
        }

        Button {
            Layout.alignment: Qt.AlignHCenter | Qt.AlignTop 
        	id: addContactButton
        	text: "Add Contact"
        	onClicked: {
        		signal.add_contact(contactNameInput.text, contactPhoneInput.text);
        		window.pageStack.layers.pop();
        	}
        }
    
    }
}