Warning, /pim/itinerary/src/app/ContactCard.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
0002 // SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
0003 // SPDX-License-Identifier: LGPL-2.0-or-later
0004
0005 import QtQuick
0006 import QtQuick.Layouts
0007 import QtQuick.Controls as QQC2
0008 import org.kde.kirigami as Kirigami
0009 import org.kde.kirigamiaddons.formcard as FormCard
0010 import org.kde.kitinerary
0011 import org.kde.itinerary
0012
0013 ColumnLayout {
0014 id: root
0015
0016 required property var contact
0017
0018 spacing: 0
0019 visible: root.contact.telephone || root.contact.email || root.contact.url != ""
0020
0021 FormCard.FormHeader {
0022 title: i18nc("@title:group", "Contact")
0023 }
0024
0025 FormCard.FormCard {
0026 FormCard.FormButtonDelegate {
0027 text: i18n("Telephone")
0028 description: contact.telephone
0029 icon.name: "call-start"
0030 onClicked: Qt.openUrlExternally(Util.telephoneUrl(contact.telephone))
0031 visible: contact.telephone
0032 }
0033
0034 FormCard.FormDelegateSeparator { visible: contact.telephone }
0035
0036 FormCard.FormButtonDelegate {
0037 text: i18n("Email")
0038 description: contact.email
0039 icon.name: "mail-message-new"
0040 onClicked: Qt.openUrlExternally(Util.emailUrl(contact.email))
0041 visible: contact.email
0042 }
0043
0044 FormCard.FormDelegateSeparator { visible: reservationFor.url != "" }
0045
0046 FormCard.FormButtonDelegate {
0047 text: i18n("Website")
0048 description: contact.url
0049 icon.name: "globe"
0050 onClicked: Qt.openUrlExternally(contact.url)
0051 visible: contact.url != ""
0052 }
0053 }
0054 }