Warning, /libraries/pulseaudio-qt/tests/painspector/CardDelegate.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
0003
0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 import QtQuick 2.7
0007 import QtQuick.Layouts 1.3
0008 import QtQuick.Controls 2.2
0009
0010 import org.kde.kirigami 2.10 as Kirigami
0011
0012 Kirigami.FormLayout {
0013
0014 Label {
0015 Kirigami.FormData.label: "Name:"
0016 text: Name
0017 }
0018
0019 Row {
0020 Kirigami.FormData.label: "Icon:"
0021 spacing: 5
0022 Label {
0023 id: iconNameLabel
0024 text: IconName
0025 }
0026 Kirigami.Icon {
0027 height: iconNameLabel.height
0028 width: height
0029 source: IconName
0030 }
0031 }
0032
0033 PropertiesItem {}
0034
0035 PortsItem {}
0036
0037 function availabilityToString(availability) {
0038 if (availability === 0) {
0039 return "Unknown"
0040 }
0041 if (availability === 1) {
0042 return "Available"
0043 }
0044 if (availability === 2) {
0045 return "Unavailable"
0046 }
0047 }
0048
0049 Column {
0050 Kirigami.FormData.label: "Profiles:"
0051 Repeater {
0052 model: Profiles
0053 delegate: Label {
0054 text: modelData.name + ": " + modelData.description + ", Priority: " + modelData.priority + ", Availability: " + availabilityToString(modelData.availability)
0055 }
0056 }
0057 }
0058 }