BedLevelMachineAction.qml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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.pointSize: 18
  26. renderType: Text.NativeRendering
  27. }
  28. Label
  29. {
  30. id: pageDescription
  31. anchors.top: pageTitle.bottom
  32. anchors.topMargin: UM.Theme.getSize("default_margin").height * 3
  33. width: parent.width
  34. wrapMode: Text.WordWrap
  35. 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.")
  36. renderType: Text.NativeRendering
  37. }
  38. Label
  39. {
  40. id: bedlevelingText
  41. anchors.top: pageDescription.bottom
  42. anchors.topMargin: UM.Theme.getSize("default_margin").height
  43. width: parent.width
  44. wrapMode: Text.WordWrap
  45. 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.")
  46. renderType: Text.NativeRendering
  47. }
  48. Row
  49. {
  50. id: bedlevelingWrapper
  51. anchors.top: bedlevelingText.bottom
  52. anchors.topMargin: UM.Theme.getSize("default_margin").height * 3
  53. anchors.horizontalCenter: parent.horizontalCenter
  54. width: childrenRect.width
  55. spacing: UM.Theme.getSize("default_margin").width
  56. Cura.ActionButton
  57. {
  58. id: startBedLevelingButton
  59. text: catalog.i18nc("@action:button", "Start Build Plate Leveling")
  60. onClicked:
  61. {
  62. startBedLevelingButton.visible = false
  63. bedlevelingButton.visible = true
  64. manager.startBedLeveling()
  65. }
  66. }
  67. Cura.ActionButton
  68. {
  69. id: bedlevelingButton
  70. text: catalog.i18nc("@action:button", "Move to Next Position")
  71. visible: false
  72. onClicked:
  73. {
  74. manager.moveToNextLevelPosition()
  75. }
  76. }
  77. }
  78. }
  79. }