ToolboxInstalledPage.qml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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. renderType: Text.NativeRendering
  68. }
  69. }
  70. Label
  71. {
  72. anchors
  73. {
  74. left: parent.left
  75. right: parent.right
  76. margins: parent.padding
  77. }
  78. text: catalog.i18nc("@title:tab", "Installed materials")
  79. color: UM.Theme.getColor("text_medium")
  80. font: UM.Theme.getFont("medium")
  81. renderType: Text.NativeRendering
  82. }
  83. Rectangle
  84. {
  85. anchors
  86. {
  87. left: parent.left
  88. right: parent.right
  89. margins: parent.padding
  90. }
  91. id: installedMaterials
  92. color: "transparent"
  93. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  94. border.color: UM.Theme.getColor("lining")
  95. border.width: UM.Theme.getSize("default_lining").width
  96. Column
  97. {
  98. anchors
  99. {
  100. top: parent.top
  101. right: parent.right
  102. left: parent.left
  103. margins: UM.Theme.getSize("default_margin").width
  104. }
  105. Repeater
  106. {
  107. id: installedMaterialsList
  108. model: toolbox.materialsInstalledModel
  109. delegate: ToolboxInstalledTile { }
  110. }
  111. }
  112. Label
  113. {
  114. visible: toolbox.materialsInstalledModel.count < 1
  115. padding: UM.Theme.getSize("default_margin").width
  116. text: catalog.i18nc("@info", "No material has been installed.")
  117. font: UM.Theme.getFont("medium")
  118. renderType: Text.NativeRendering
  119. }
  120. }
  121. Label
  122. {
  123. anchors
  124. {
  125. left: parent.left
  126. right: parent.right
  127. margins: parent.padding
  128. }
  129. text: catalog.i18nc("@title:tab", "Bundled plugins")
  130. color: UM.Theme.getColor("text_medium")
  131. font: UM.Theme.getFont("medium")
  132. renderType: Text.NativeRendering
  133. }
  134. Rectangle
  135. {
  136. anchors
  137. {
  138. left: parent.left
  139. right: parent.right
  140. margins: parent.padding
  141. }
  142. id: bundledPlugins
  143. color: "transparent"
  144. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  145. border.color: UM.Theme.getColor("lining")
  146. border.width: UM.Theme.getSize("default_lining").width
  147. Column
  148. {
  149. anchors
  150. {
  151. top: parent.top
  152. right: parent.right
  153. left: parent.left
  154. margins: UM.Theme.getSize("default_margin").width
  155. }
  156. Repeater
  157. {
  158. id: bundledPluginsList
  159. model: toolbox.pluginsBundledModel
  160. delegate: ToolboxInstalledTile { }
  161. }
  162. }
  163. }
  164. Label
  165. {
  166. anchors
  167. {
  168. left: parent.left
  169. right: parent.right
  170. margins: parent.padding
  171. }
  172. text: catalog.i18nc("@title:tab", "Bundled materials")
  173. color: UM.Theme.getColor("text_medium")
  174. font: UM.Theme.getFont("medium")
  175. renderType: Text.NativeRendering
  176. }
  177. Rectangle
  178. {
  179. anchors
  180. {
  181. left: parent.left
  182. right: parent.right
  183. margins: parent.padding
  184. }
  185. id: bundledMaterials
  186. color: "transparent"
  187. height: childrenRect.height + UM.Theme.getSize("default_margin").width
  188. border.color: UM.Theme.getColor("lining")
  189. border.width: UM.Theme.getSize("default_lining").width
  190. Column
  191. {
  192. anchors
  193. {
  194. top: parent.top
  195. right: parent.right
  196. left: parent.left
  197. margins: UM.Theme.getSize("default_margin").width
  198. }
  199. Repeater
  200. {
  201. id: bundledMaterialsList
  202. model: toolbox.materialsBundledModel
  203. delegate: ToolboxInstalledTile {}
  204. }
  205. }
  206. }
  207. }
  208. }