Warning, /plasma/kdeplasma-addons/applets/diskquota/package/contents/ui/ListDelegateItem.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Dominik Haumann <dhaumann@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 import QtQuick 2.1 0007 import QtQuick.Layouts 1.1 0008 0009 import org.kde.kirigami 2.20 as Kirigami 0010 import org.kde.plasma.plasmoid 2.0 0011 import org.kde.plasma.components 3.0 as PlasmaComponents3 0012 0013 import org.kde.plasma.private.diskquota 1.0 0014 0015 PlasmaComponents3.ItemDelegate { 0016 id: quotaItem 0017 property string mountPoint 0018 property string details 0019 property string iconName 0020 property string usedString 0021 property string freeString 0022 property int usage 0023 0024 onHoveredChanged: { 0025 if (containsMouse) { 0026 ListView.view.currentIndex = index 0027 } else { 0028 ListView.view.currentIndex = -1 0029 } 0030 } 0031 0032 onClicked: { 0033 diskQuota.openCleanUpTool(mountPoint); 0034 } 0035 0036 RowLayout { 0037 id: contents 0038 width: parent.width 0039 spacing: Kirigami.Units.gridUnit 0040 0041 Kirigami.Icon { 0042 source: iconName 0043 Layout.alignment: Qt.AlignTop 0044 width: Kirigami.Units.iconSizes.medium 0045 height: width 0046 } 0047 0048 Column { 0049 Layout.fillWidth: true 0050 Layout.alignment: Qt.AlignTop 0051 0052 RowLayout { 0053 width: parent.width 0054 PlasmaComponents3.Label { 0055 Layout.fillWidth: true 0056 text: details 0057 textFormat: Text.PlainText 0058 } 0059 PlasmaComponents3.Label { 0060 Layout.fillWidth: true 0061 horizontalAlignment: Text.AlignRight 0062 text: freeString 0063 textFormat: Text.PlainText 0064 opacity: 0.6 0065 } 0066 } 0067 PlasmaComponents3.ProgressBar { 0068 width: parent.width 0069 value: usage 0070 from: 0 0071 to: 100 0072 // HACK to make progressbar clickable 0073 MouseArea { 0074 anchors.fill: parent 0075 onClicked: { 0076 quotaItem.clicked() 0077 } 0078 } 0079 } 0080 PlasmaComponents3.Label { 0081 anchors.left: parent.left 0082 text: usedString 0083 textFormat: Text.PlainText 0084 opacity: 0.6 0085 } 0086 } 0087 } 0088 }