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

26 lines
865 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 {
2021-09-11 20:39:37 +02:00
iconSource: plasmoid.nativeInterface.loadForkAwesomeIcon("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 {
2021-09-11 20:39:37 +02:00
iconSource: plasmoid.nativeInterface.loadForkAwesomeIcon("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 {
2021-09-11 20:39:37 +02:00
iconSource: plasmoid.nativeInterface.loadForkAwesomeIcon("hdd-o")
text: statistics.bytes !== undefined ? plasmoid.nativeInterface.formatFileSize(
statistics.bytes) : "?"
2019-07-21 22:33:52 +02:00
tooltip: context + qsTr(" size")
}
}