Warning, /pim/merkuro/src/contacts/qml/private/PhoneNumberDialog.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
0002 // SPDX-License-Identifier: LGPL-2.0-or-later
0003 
0004 import QtQuick 2.6
0005 import QtQuick.Controls 2.13
0006 import QtQuick.Layouts 1.2
0007 import org.kde.kirigami 2.10 as Kirigami
0008 import org.kde.kirigamiaddons.delegates 1 as Delegates
0009 
0010 Kirigami.OverlaySheet {
0011 
0012     id: root
0013 
0014     property alias numbers: list.model
0015     property alias title: heading.text
0016 
0017     signal numberSelected(string number)
0018 
0019     header: Kirigami.Heading {
0020         id: heading
0021     }
0022 
0023     ListView {
0024         id: list
0025         implicitWidth: Kirigami.Units.gridUnit * 20
0026         model: 4
0027         delegate: Delegates.RoundedItemDelegate {
0028             id: contactDelegate
0029 
0030             required property var modelData
0031 
0032             text: modelData.typeLabel
0033             contentItem: Delegates.SubtitleContentItem {
0034                 itemDelegate: contactDelegate
0035                 subtitle: contactDelegate.modelData.number
0036             }
0037 
0038             onClicked: {
0039                 close();
0040                 root.numberSelected(modelData.normalizedNumber);
0041             }
0042         }
0043     }
0044 }