syncthingtray/plasmoid/package/contents/ui/StatisticsView.qml

29 lines
983 B
QML
Raw Normal View History

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
property var statistics
2019-07-21 22:33:52 +02:00
property string context: "?"
2019-07-21 22:33:52 +02:00
IconLabel {
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("file", false)
text: statistics.files !== undefined ? statistics.files : "?"
2019-07-21 22:33:52 +02:00
tooltip: context + qsTr(" files")
}
2019-07-21 22:33:52 +02:00
IconLabel {
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("folder", false)
text: statistics.dirs !== undefined ? statistics.dirs : "?"
2019-07-21 22:33:52 +02:00
tooltip: context + qsTr(" directories")
}
2019-07-21 22:33:52 +02:00
IconLabel {
iconSource: plasmoid.nativeInterface.loadFontAwesomeIcon("hdd", false)
text: statistics.bytes !== undefined ? plasmoid.nativeInterface.formatFileSize(
statistics.bytes) : "?"
2019-07-21 22:33:52 +02:00
tooltip: context + qsTr(" size")
}
}