-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContactList.qml
executable file
·30 lines (27 loc) · 1.21 KB
/
ContactList.qml
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
import QtQuick 2.12
import QtQml 2.3
ContactListForm {
contactName.text: currentContact >= 0 ? contactView.model.get(currentContact).fullName : ""
// specialty : contactListPage.specialty
// doctor : contactListPage.doctor
// city : contactListPage.city
menuItemCall.onTriggered: {
console.debug("Calling number "+contactView.model.get(currentContact).contactNumber)
Qt.openUrlExternally("tel:%1".arg("+55 "+contactView.model.get(currentContact).contactNumber))
}
menuItemSendMessage.onTriggered: {
console.debug("Sending message to number "+contactView.model.get(currentContact).contactNumber)
Qt.openUrlExternally("sms:%1".arg("+55 "+contactView.model.get(currentContact).contactNumber))
}
menuItemWhatsApp.onTriggered: {
console.debug("Sending message to number "+contactView.model.get(currentContact).contactNumber)
Qt.openUrlExternally("https://api.whatsapp.com/send?l=pt&phone=55%1".arg(contactView.model.get(currentContact).contactNumber))
}
backButton.onClicked: {
searchGuide()
}
contactView.onPressAndHold: {
currentContact = index
contactMenu.open()
}
}