Warning, /plasma/xdg-desktop-portal-kde/src/PipeWireDelegate.qml is written in an unsupported language. File is not indexed.

0001 /*  This file is part of the KDE project
0002     SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 import QtQuick 2.15
0008 import QtQuick.Controls 2.15
0009 import QtQuick.Layouts 1.15
0010 import org.kde.kirigami 2.15 as Kirigami
0011 import org.kde.pipewire 0.1 as PipeWire
0012 
0013 Kirigami.Card
0014 {
0015     id: card
0016     property alias nodeId: pipeWireSourceItem.nodeId
0017     signal toggled()
0018 
0019     contentItem: PipeWire.PipeWireSourceItem {
0020         id: pipeWireSourceItem
0021         Layout.preferredHeight: Kirigami.Units.gridUnit * 7
0022         Layout.preferredWidth: Kirigami.Units.gridUnit * 7
0023         Layout.fillWidth: true
0024         Layout.fillHeight: true
0025 
0026         Kirigami.Icon {
0027             anchors.fill: parent
0028             visible: pipeWireSourceItem.nodeId === 0
0029             source: card.banner.titleIcon
0030         }
0031 
0032     }
0033     onClicked: {
0034         toggled()
0035     }
0036 }