UM2UpgradeSelectionMachineAction.qml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura 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.3 as UM
  6. import Cura 1.1 as Cura
  7. Cura.MachineAction
  8. {
  9. UM.I18nCatalog { id: catalog; name: "cura"; }
  10. anchors.fill: parent
  11. Item
  12. {
  13. id: upgradeSelectionMachineAction
  14. anchors.fill: parent
  15. anchors.topMargin: UM.Theme.getSize("default_margin").width * 5
  16. anchors.leftMargin: UM.Theme.getSize("default_margin").width * 4
  17. Label
  18. {
  19. id: pageDescription
  20. anchors.top: parent.top
  21. anchors.topMargin: UM.Theme.getSize("default_margin").height
  22. width: parent.width
  23. wrapMode: Text.WordWrap
  24. text: catalog.i18nc("@label", "Please select any upgrades made to this Ultimaker 2.")
  25. font: UM.Theme.getFont("medium")
  26. color: UM.Theme.getColor("text")
  27. renderType: Text.NativeRendering
  28. }
  29. Cura.CheckBox
  30. {
  31. id: olssonBlockCheckBox
  32. anchors.top: pageDescription.bottom
  33. anchors.topMargin: UM.Theme.getSize("default_margin").height
  34. height: UM.Theme.getSize("setting_control").height
  35. text: catalog.i18nc("@label", "Olsson Block")
  36. checked: manager.hasVariants
  37. onClicked: manager.hasVariants = checked
  38. Connections
  39. {
  40. target: manager
  41. onHasVariantsChanged: olssonBlockCheckBox.checked = manager.hasVariants
  42. }
  43. }
  44. }
  45. }