dev.qml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. /*
  6. Roles:
  7. DiskName
  8. DiskDevNode
  9. DiskDevType
  10. DiskVendorName
  11. DiskVendorID
  12. DiskProductID
  13. PartFsLabel
  14. PartFsType
  15. PartFsVersion
  16. PartDevNode
  17. PartMountPoint
  18. PartSize
  19. PartFsSize
  20. PartFsFree
  21. PartFsUsed
  22. */
  23. Window {
  24. visible: true
  25. title: qsTr("GfA Storage Device Map")
  26. width: 800
  27. height: 480
  28. Component {
  29. id: imageDelegate
  30. Item {
  31. Image {
  32. anchors.centerIn: parent
  33. fillMode: Image.PreserveAspectFit
  34. height:20
  35. source: (styleData.value) === "usb" ? "qrc:/res/img/usb64.png" : ((styleData.value) === "ata" ? "qrc:/res/img/ata64.png" : "qrc:/res/img/mmc64.png")
  36. }
  37. }
  38. }
  39. TableView {
  40. anchors.fill: parent
  41. TableViewColumn {
  42. role: "DiskDevType"
  43. width: 32
  44. delegate:imageDelegate
  45. }
  46. TableViewColumn {
  47. width: 120
  48. title: "Disk"
  49. role: "DiskName"
  50. }
  51. TableViewColumn {
  52. width: 80
  53. title: "Volume"
  54. role: "PartFsLabel"
  55. }
  56. TableViewColumn {
  57. width: 80
  58. title: "Size"
  59. role: "PartSize"
  60. }
  61. TableViewColumn {
  62. width: 80
  63. title: "Used"
  64. role: "PartFsUsed"
  65. }
  66. TableViewColumn {
  67. width: 80
  68. title: "Free"
  69. role: "PartFsFree"
  70. }
  71. TableViewColumn {
  72. width: 165
  73. title: "Node"
  74. role: "PartDevNode"
  75. }
  76. TableViewColumn {
  77. title: "Mountpoint"
  78. role: "PartMountPoint"
  79. }
  80. model: qGfaAppCtrl.sysInfo.stgDev
  81. }
  82. }