BedLevelMachineAction.qml 2.8 KB

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