2019-02-27 20:42:41 +01:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
|
|
|
|
|
|
|
RowLayout {
|
2019-07-21 22:33:52 +02:00
|
|
|
id: rowLayout
|
2019-02-27 20:42:41 +01:00
|
|
|
property var statistics
|
2019-07-21 22:33:52 +02:00
|
|
|
property string context: "?"
|
2019-02-27 20:42:41 +01:00
|
|
|
|
2019-07-21 22:33:52 +02:00
|
|
|
IconLabel {
|
|
|
|
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("file", false)
|
2019-02-27 20:42:41 +01:00
|
|
|
text: statistics.files !== undefined ? statistics.files : "?"
|
2019-07-21 22:33:52 +02:00
|
|
|
tooltip: context + qsTr(" files")
|
2019-02-27 20:42:41 +01:00
|
|
|
}
|
2019-07-21 22:33:52 +02:00
|
|
|
IconLabel {
|
|
|
|
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("folder", false)
|
2019-02-27 20:42:41 +01:00
|
|
|
text: statistics.dirs !== undefined ? statistics.dirs : "?"
|
2019-07-21 22:33:52 +02:00
|
|
|
tooltip: context + qsTr(" directories")
|
2019-02-27 20:42:41 +01:00
|
|
|
}
|
2019-07-21 22:33:52 +02:00
|
|
|
IconLabel {
|
|
|
|
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("hdd", false)
|
2019-02-27 20:42:41 +01:00
|
|
|
text: statistics.bytes !== undefined ? plasmoid.nativeInterface.formatFileSize(
|
|
|
|
statistics.bytes) : "?"
|
2019-07-21 22:33:52 +02:00
|
|
|
tooltip: context + qsTr(" size")
|
2019-02-27 20:42:41 +01:00
|
|
|
}
|
|
|
|
}
|