Warning, /plasma/plasma-mobile/components/mobileshell/qml/volumeosd/StreamListItem.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org> 0003 SPDX-FileCopyrightText: 2021 Devin Lin <espidev@gmail.com> 0004 0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 import QtQuick 2.0 0009 0010 import org.kde.plasma.private.volume 0.1 0011 0012 // adapted from https://invent.kde.org/plasma/plasma-pa/-/blob/master/applet/contents/ui/StreamListItem.qml 0013 ListItemBase { 0014 id: item 0015 0016 property QtObject devicesModel 0017 readonly property bool isEventStream: Name == "sink-input-by-media-role:event" 0018 0019 label: { 0020 if (isEventStream) { 0021 return i18n("Notification Sounds"); 0022 } 0023 if (Client && Client.name) { 0024 return i18nc("label of stream items", "%1: %2", Client.name, Name); 0025 } 0026 if (Name) { 0027 return Name; 0028 } 0029 return i18n("Stream name not found"); 0030 } 0031 0032 listIcon: { 0033 if (IconName.length !== 0) { 0034 return IconName 0035 } 0036 0037 if (item.type === "source-output") { 0038 return "audio-input-microphone" 0039 } 0040 0041 return "audio-volume-high" 0042 } 0043 }