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

26 lines
760 B
QML
Raw Normal View History

import QtQuick 2.7
import QtQuick.Layouts 1.1
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: "image://fa/file-o"
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: "image://fa/folder-o"
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: "image://fa/hdd-o"
text: statistics.bytes !== undefined ? plasmoid.nativeInterface.formatFileSize(
statistics.bytes) : "?"
2019-07-21 22:33:52 +02:00
tooltip: context + qsTr(" size")
}
}