import QtQuick 2.7 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 import com.gfa.ipc.appctrl 1.0 /* Roles: DiskName DiskDevNode DiskDevType DiskVendorName DiskVendorID DiskProductID PartFsLabel PartFsType PartFsVersion PartDevNode PartMountPoint PartSize PartFsSize PartFsFree PartFsUsed */ Window { visible: true title: qsTr("GfA Storage Device Map") width: 800 height: 480 Component { id: imageDelegate Item { Image { anchors.centerIn: parent fillMode: Image.PreserveAspectFit height:20 source: (styleData.value) === "usb" ? "qrc:/res/img/usb64.png" : ((styleData.value) === "ata" ? "qrc:/res/img/ata64.png" : "qrc:/res/img/mmc64.png") } } } TableView { anchors.fill: parent TableViewColumn { role: "DiskDevType" width: 32 delegate:imageDelegate } TableViewColumn { width: 120 title: "Disk" role: "DiskName" } TableViewColumn { width: 80 title: "Volume" role: "PartFsLabel" } TableViewColumn { width: 80 title: "Size" role: "PartSize" } TableViewColumn { width: 80 title: "Used" role: "PartFsUsed" } TableViewColumn { width: 80 title: "Free" role: "PartFsFree" } TableViewColumn { width: 165 title: "Node" role: "PartDevNode" } TableViewColumn { title: "Mountpoint" role: "PartMountPoint" } model: qGfaAppCtrl.sysInfo.stgDev } }