BedLevelMachineAction.qml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 QtQuick.Layouts 1.3
  6. import UM 1.3 as UM
  7. import Cura 1.1 as Cura
  8. Cura.MachineAction
  9. {
  10. UM.I18nCatalog { id: catalog; name: "cura"; }
  11. anchors.fill: parent
  12. Item
  13. {
  14. id: bedLevelMachineAction
  15. anchors.top: parent.top
  16. anchors.topMargin: UM.Theme.getSize("default_margin").height * 3
  17. anchors.horizontalCenter: parent.horizontalCenter
  18. width: parent.width * 3 / 4
  19. Label
  20. {
  21. id: pageTitle
  22. width: parent.width
  23. text: catalog.i18nc("@title", "Build Plate Leveling")
  24. wrapMode: Text.WordWrap
  25. font: UM.Theme.getFont("medium")
  26. color: UM.Theme.getColor("text")
  27. renderType: Text.NativeRendering
  28. }
  29. Label
  30. {
  31. id: pageDescription
  32. anchors.top: pageTitle.bottom
  33. anchors.topMargin: UM.Theme.getSize("default_margin").height * 3
  34. width: parent.width
  35. wrapMode: Text.WordWrap
  36. text: catalog.i18nc("@label", "To make sure your prints will come out great, you can now adjust your buildplate. When you click 'Move to Next Position' the nozzle will move to the different positions that can be adjusted.")
  37. font: UM.Theme.getFont("default")
  38. color: UM.Theme.getColor("text")
  39. renderType: Text.NativeRendering
  40. }
  41. Label
  42. {
  43. id: bedlevelingText
  44. anchors.top: pageDescription.bottom
  45. anchors.topMargin: UM.Theme.getSize("default_margin").height
  46. width: parent.width
  47. wrapMode: Text.WordWrap
  48. text: catalog.i18nc("@label", "For every position; insert a piece of paper under the nozzle and adjust the print build plate height. The print build plate height is right when the paper is slightly gripped by the tip of the nozzle.")
  49. font: UM.Theme.getFont("default")
  50. color: UM.Theme.getColor("text")
  51. renderType: Text.NativeRendering
  52. }
  53. Row
  54. {
  55. id: bedlevelingWrapper
  56. anchors.top: bedlevelingText.bottom
  57. anchors.topMargin: UM.Theme.getSize("default_margin").height * 3
  58. anchors.horizontalCenter: parent.horizontalCenter
  59. width: childrenRect.width
  60. spacing: UM.Theme.getSize("default_margin").width
  61. Cura.ActionButton
  62. {
  63. id: startBedLevelingButton
  64. text: catalog.i18nc("@action:button", "Start Build Plate Leveling")
  65. onClicked:
  66. {
  67. startBedLevelingButton.visible = false
  68. bedlevelingButton.visible = true
  69. manager.startBedLeveling()
  70. }
  71. }
  72. Cura.ActionButton
  73. {
  74. id: bedlevelingButton
  75. text: catalog.i18nc("@action:button", "Move to Next Position")
  76. visible: false
  77. onClicked:
  78. {
  79. manager.moveToNextLevelPosition()
  80. }
  81. }
  82. }
  83. }
  84. }