BedLevelMachineAction.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // Copyright (c) 2016 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Controls 1.1
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Window 2.1
  7. import UM 1.2 as UM
  8. import Cura 1.0 as Cura
  9. Cura.MachineAction
  10. {
  11. anchors.fill: parent;
  12. Item
  13. {
  14. id: bedLevelMachineAction
  15. anchors.fill: parent;
  16. UM.I18nCatalog { id: catalog; name: "cura"; }
  17. Label
  18. {
  19. id: pageTitle
  20. width: parent.width
  21. text: catalog.i18nc("@title", "Build Plate Leveling")
  22. wrapMode: Text.WordWrap
  23. font.pointSize: 18;
  24. }
  25. Label
  26. {
  27. id: pageDescription
  28. anchors.top: pageTitle.bottom
  29. anchors.topMargin: UM.Theme.getSize("default_margin").height
  30. width: parent.width
  31. wrapMode: Text.WordWrap
  32. 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.")
  33. }
  34. Label
  35. {
  36. id: bedlevelingText
  37. anchors.top: pageDescription.bottom
  38. anchors.topMargin: UM.Theme.getSize("default_margin").height
  39. width: parent.width
  40. wrapMode: Text.WordWrap
  41. 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.")
  42. }
  43. Row
  44. {
  45. id: bedlevelingWrapper
  46. anchors.top: bedlevelingText.bottom
  47. anchors.topMargin: UM.Theme.getSize("default_margin").height
  48. anchors.horizontalCenter: parent.horizontalCenter
  49. width: childrenRect.width
  50. spacing: UM.Theme.getSize("default_margin").width
  51. Button
  52. {
  53. id: startBedLevelingButton
  54. text: catalog.i18nc("@action:button","Start Build Plate Leveling")
  55. onClicked:
  56. {
  57. startBedLevelingButton.visible = false;
  58. bedlevelingButton.visible = true;
  59. manager.startBedLeveling();
  60. }
  61. }
  62. Button
  63. {
  64. id: bedlevelingButton
  65. text: catalog.i18nc("@action:button","Move to Next Position")
  66. visible: false
  67. onClicked:
  68. {
  69. manager.moveToNextLevelPosition();
  70. }
  71. }
  72. }
  73. }
  74. }