Warning, /plasma/plasma-firewall/kcm/ui/ConnectionItemDelegate.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0002 // SPDX-FileCopyrightText: 2018 Alexis Lopes Zubeta <contact@azubieta.net> 0003 0004 import QtQuick 2.12 0005 import QtQuick.Layouts 1.3 0006 import QtQuick.Controls 2.12 as QQC2 0007 0008 import org.kde.kirigami 2.4 as Kirigami 0009 0010 0011 QQC2.ItemDelegate { 0012 id: root 0013 0014 hoverEnabled: true 0015 0016 signal filterConnection(var protocol, var localAddress, var foreignAddres, var status) 0017 0018 contentItem: RowLayout { 0019 spacing: Kirigami.Units.smallSpacing 0020 0021 QQC2.Label { 0022 Layout.preferredWidth: 60 0023 text: model.protocol 0024 } 0025 QQC2.Label { 0026 Layout.preferredWidth: 160 0027 text: model.localAddress 0028 } 0029 QQC2.Label { 0030 Layout.preferredWidth: 160 0031 text: model.foreignAddress 0032 } 0033 QQC2.Label { 0034 Layout.preferredWidth: 100 0035 text: model.status 0036 } 0037 QQC2.Label { 0038 Layout.preferredWidth: 40 0039 text: model.pid 0040 } 0041 QQC2.Label { 0042 Layout.preferredWidth: 120 0043 text: model.program !== "" ? model.program : "" 0044 } 0045 Item { 0046 visible: !root.hovered 0047 implicitHeight: iconButton.height 0048 implicitWidth: iconButton.width 0049 } 0050 QQC2.ToolButton { 0051 id: iconButton 0052 visible: root.hovered 0053 icon.name: "view-filter" 0054 onClicked: root.filterConnection(model.protocol, model.localAddress, 0055 model.foreignAddress, model.status) 0056 } 0057 } 0058 }