ToolboxInstalledPage.qml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Toolbox is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 2.3
  5. import UM 1.1 as UM
  6. import "../components"
  7. ScrollView
  8. {
  9. id: page
  10. clip: true
  11. width: parent.width
  12. height: parent.height
  13. Column
  14. {
  15. width: page.width
  16. spacing: UM.Theme.getSize("default_margin").height
  17. padding: UM.Theme.getSize("wide_margin").width
  18. height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
  19. Label
  20. {
  21. anchors
  22. {
  23. left: parent.left
  24. right: parent.right
  25. margins: parent.padding
  26. }
  27. text: catalog.i18nc("@title:tab", "Installed plugins")
  28. color: UM.Theme.getColor("text_medium")
  29. font: UM.Theme.getFont("medium")
  30. renderType: Text.NativeRendering
  31. }
  32. Rectangle
  33. {
  34. anchors
  35. {
  36. left: parent.left
  37. right: parent.right
  38. margins: parent.padding
  39. }
  40. id: installedPlugins
  41. color: "transparent"
  42. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  43. border.color: UM.Theme.getColor("lining")
  44. border.width: UM.Theme.getSize("default_lining").width
  45. Column
  46. {
  47. anchors
  48. {
  49. top: parent.top
  50. right: parent.right
  51. left: parent.left
  52. margins: UM.Theme.getSize("default_margin").width
  53. }
  54. Repeater
  55. {
  56. id: pluginList
  57. model: toolbox.pluginsInstalledModel
  58. delegate: ToolboxInstalledTile { }
  59. }
  60. }
  61. Label
  62. {
  63. visible: toolbox.pluginsInstalledModel.count < 1
  64. padding: UM.Theme.getSize("default_margin").width
  65. text: catalog.i18nc("@info", "No plugin has been installed.")
  66. font: UM.Theme.getFont("medium")
  67. color: UM.Theme.getColor("lining")
  68. renderType: Text.NativeRendering
  69. }
  70. }
  71. Label
  72. {
  73. anchors
  74. {
  75. left: parent.left
  76. right: parent.right
  77. margins: parent.padding
  78. }
  79. text: catalog.i18nc("@title:tab", "Installed materials")
  80. color: UM.Theme.getColor("text_medium")
  81. font: UM.Theme.getFont("medium")
  82. renderType: Text.NativeRendering
  83. }
  84. Rectangle
  85. {
  86. anchors
  87. {
  88. left: parent.left
  89. right: parent.right
  90. margins: parent.padding
  91. }
  92. id: installedMaterials
  93. color: "transparent"
  94. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  95. border.color: UM.Theme.getColor("lining")
  96. border.width: UM.Theme.getSize("default_lining").width
  97. Column
  98. {
  99. anchors
  100. {
  101. top: parent.top
  102. right: parent.right
  103. left: parent.left
  104. margins: UM.Theme.getSize("default_margin").width
  105. }
  106. Repeater
  107. {
  108. id: installedMaterialsList
  109. model: toolbox.materialsInstalledModel
  110. delegate: ToolboxInstalledTile { }
  111. }
  112. }
  113. Label
  114. {
  115. visible: toolbox.materialsInstalledModel.count < 1
  116. padding: UM.Theme.getSize("default_margin").width
  117. text: catalog.i18nc("@info", "No material has been installed.")
  118. color: UM.Theme.getColor("lining")
  119. font: UM.Theme.getFont("medium")
  120. renderType: Text.NativeRendering
  121. }
  122. }
  123. Label
  124. {
  125. anchors
  126. {
  127. left: parent.left
  128. right: parent.right
  129. margins: parent.padding
  130. }
  131. text: catalog.i18nc("@title:tab", "Bundled plugins")
  132. color: UM.Theme.getColor("text_medium")
  133. font: UM.Theme.getFont("medium")
  134. renderType: Text.NativeRendering
  135. }
  136. Rectangle
  137. {
  138. anchors
  139. {
  140. left: parent.left
  141. right: parent.right
  142. margins: parent.padding
  143. }
  144. id: bundledPlugins
  145. color: "transparent"
  146. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  147. border.color: UM.Theme.getColor("lining")
  148. border.width: UM.Theme.getSize("default_lining").width
  149. Column
  150. {
  151. anchors
  152. {
  153. top: parent.top
  154. right: parent.right
  155. left: parent.left
  156. margins: UM.Theme.getSize("default_margin").width
  157. }
  158. Repeater
  159. {
  160. id: bundledPluginsList
  161. model: toolbox.pluginsBundledModel
  162. delegate: ToolboxInstalledTile { }
  163. }
  164. }
  165. }
  166. Label
  167. {
  168. anchors
  169. {
  170. left: parent.left
  171. right: parent.right
  172. margins: parent.padding
  173. }
  174. text: catalog.i18nc("@title:tab", "Bundled materials")
  175. color: UM.Theme.getColor("text_medium")
  176. font: UM.Theme.getFont("medium")
  177. renderType: Text.NativeRendering
  178. }
  179. Rectangle
  180. {
  181. anchors
  182. {
  183. left: parent.left
  184. right: parent.right
  185. margins: parent.padding
  186. }
  187. id: bundledMaterials
  188. color: "transparent"
  189. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  190. border.color: UM.Theme.getColor("lining")
  191. border.width: UM.Theme.getSize("default_lining").width
  192. Column
  193. {
  194. anchors
  195. {
  196. top: parent.top
  197. right: parent.right
  198. left: parent.left
  199. margins: UM.Theme.getSize("default_margin").width
  200. }
  201. Repeater
  202. {
  203. id: bundledMaterialsList
  204. model: toolbox.materialsBundledModel
  205. delegate: ToolboxInstalledTile {}
  206. }
  207. }
  208. }
  209. }
  210. }