dev.qml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import QtQuick 2.7
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4
  4. import com.gfa.ipc.appctrl 1.0
  5. Window {
  6. visible: true
  7. title: qsTr("GfA Storage Device Map")
  8. width: 800
  9. height: 480
  10. Component {
  11. id: imageDelegate
  12. Item {
  13. Image {
  14. anchors.centerIn: parent
  15. fillMode: Image.PreserveAspectFit
  16. height:20
  17. source: (styleData.value) === "usb" ? "qrc:/res/img/usb64.png" : ((styleData.value) === "ata" ? "qrc:/res/img/ata64.png" : "qrc:/res/img/mmc64.png")
  18. }
  19. }
  20. }
  21. TableView {
  22. anchors.fill: parent
  23. TableViewColumn {
  24. role: "DiskBusType"
  25. width: 32
  26. delegate:imageDelegate
  27. }
  28. TableViewColumn {
  29. width: 120
  30. title: "Disk"
  31. role: "DiskName"
  32. }
  33. TableViewColumn {
  34. width: 80
  35. title: "Volume"
  36. role: "PartFsLabel"
  37. }
  38. /* TableViewColumn {
  39. width: 60
  40. title: "Type"
  41. role: "DiskBusType"
  42. }*/
  43. TableViewColumn {
  44. width: 80
  45. title: "Size"
  46. role: "PartSize"
  47. }
  48. TableViewColumn {
  49. width: 80
  50. title: "Used"
  51. role: "PartFsUsed"
  52. }
  53. TableViewColumn {
  54. width: 80
  55. title: "Free"
  56. role: "PartFsFree"
  57. }
  58. TableViewColumn {
  59. width: 165
  60. title: "Node"
  61. role: "PartDevNode"
  62. }
  63. TableViewColumn {
  64. title: "Mountpoint"
  65. role: "PartMountPoint"
  66. }
  67. model: qGfaAppCtrl.sysInfo.stgDev
  68. }
  69. }