stgdev.qml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import QtQuick 2.6
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4 as Ctrl14
  4. import QtQuick.Controls 2.0
  5. //import QtQuick.Controls 1.5
  6. import QtQuick.Controls.Styles 1.4
  7. import com.gfa.ipc.appctrl 1.0
  8. import "globals.js" as Globals
  9. /*
  10. Available Roles (Columns):
  11. DiskName
  12. DiskDevNode
  13. DiskDevType
  14. DiskVendorName
  15. DiskVendorID
  16. DiskProductID
  17. PartFsLabel
  18. PartFsType
  19. PartFsVersion
  20. PartDevNode
  21. PartMountPoint
  22. PartSize
  23. PartFsSize
  24. PartFsFree
  25. PartFsUsed
  26. */
  27. Rectangle {
  28. width: Screen.width
  29. height: Screen.height
  30. /////////////////////////////////////////////////////////////////////////////////////////////////
  31. TabBar {
  32. id: idTabBar
  33. width: parent.width
  34. currentIndex: 3
  35. Repeater {
  36. id: idRep
  37. model: Globals.tabBarModel
  38. NavButton {
  39. text: modelData[0]
  40. onClicked: { idPageLoader.source = modelData[1]; }
  41. width: idTabBar.width / idRep.count
  42. }
  43. }
  44. }
  45. /////////////////////////////////////////////////////////////////////////////////////////////////
  46. Ctrl14.TableView {
  47. x: 10
  48. y: 50
  49. width: parent.width - 20
  50. height: 420
  51. style: TableViewStyle {
  52. itemDelegate: idTableViewItemStyle
  53. headerDelegate: idTableViewHeaderStyle
  54. }
  55. Ctrl14.TableViewColumn {
  56. role: "DiskDevType"
  57. width: 32
  58. delegate:imageDelegate
  59. }
  60. Ctrl14.TableViewColumn {
  61. width: 120
  62. title: "Disk"
  63. role: "DiskName"
  64. }
  65. Ctrl14.TableViewColumn {
  66. width: 80
  67. title: "Volume"
  68. role: "PartFsLabel"
  69. }
  70. Ctrl14.TableViewColumn {
  71. width: 80
  72. title: "Size"
  73. role: "PartSize"
  74. }
  75. Ctrl14.TableViewColumn {
  76. width: 80
  77. title: "Used"
  78. role: "PartFsUsed"
  79. }
  80. Ctrl14.TableViewColumn {
  81. width: 80
  82. title: "Free"
  83. role: "PartFsFree"
  84. }
  85. Ctrl14.TableViewColumn {
  86. width: 145
  87. title: "Node"
  88. role: "PartDevNode"
  89. }
  90. Ctrl14.TableViewColumn {
  91. title: "Mountpoint"
  92. role: "PartMountPoint"
  93. }
  94. model: qGfaAppCtrl.sysInfo.stgDev
  95. }
  96. }