Warning, /plasma/plasma-firewall/kcm/ui/RuleListItem.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 // SPDX-FileCopyrightText: 2020 Tomaz Canabrava <tcanabrava@kde.org> 0004 0005 import QtQuick 2.0 0006 import QtQuick.Layouts 1.3 0007 import QtQuick.Controls 2.12 as QQC2 0008 0009 QQC2.ItemDelegate { 0010 id: itemRoot 0011 0012 property bool dropAreasVisible: false 0013 0014 signal edit(int index) 0015 signal remove(int index) 0016 0017 height: 42 0018 0019 onClicked: edit(index) 0020 0021 contentItem: RowLayout { 0022 QQC2.Label { 0023 Layout.fillHeight: true 0024 Layout.leftMargin: 4 0025 text: model.action 0026 } 0027 QQC2.Label { 0028 text: model.from 0029 } 0030 QQC2.Label { 0031 text: model.to 0032 } 0033 QQC2.Label { 0034 text: model.logging 0035 } 0036 Item { 0037 visible: !eraseButton.visible 0038 width: eraseButton.width 0039 height: eraseButton.height 0040 } 0041 QQC2.ToolButton { 0042 id: eraseButton 0043 visible: itemRoot.hovered 0044 0045 icon.name: "user-trash" 0046 onClicked: itemRoot.remove(index) 0047 } 0048 Item { 0049 Layout.fillWidth: true 0050 } 0051 } 0052 }