BedLevelMachineAction.qml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Copyright (c) 2016 Ultimaker B.V.
  2. // Cura is released under the terms of the AGPLv3 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", "Bed 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 bed height. The print bed height is right when the paper is slightly gripped by the tip of the nozzle.")
  42. }
  43. Item
  44. {
  45. id: bedlevelingWrapper
  46. anchors.top: bedlevelingText.bottom
  47. anchors.topMargin: UM.Theme.getSize("default_margin").height
  48. anchors.horizontalCenter: parent.horizontalCenter
  49. height: skipBedlevelingButton.height
  50. width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height < bedLevelMachineAction.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.getSize("default_margin").height : bedLevelMachineAction.width
  51. Button
  52. {
  53. id: bedlevelingButton
  54. anchors.top: parent.top
  55. anchors.left: parent.left
  56. text: catalog.i18nc("@action:button","Move to Next Position");
  57. onClicked:
  58. {
  59. manager.moveToNextLevelPosition()
  60. }
  61. }
  62. Button
  63. {
  64. id: skipBedlevelingButton
  65. anchors.top: parent.width < bedLevelMachineAction.width ? parent.top : bedlevelingButton.bottom
  66. anchors.topMargin: parent.width < bedLevelMachineAction.width ? 0 : UM.Theme.getSize("default_margin").height/2
  67. anchors.left: parent.width < bedLevelMachineAction.width ? bedlevelingButton.right : parent.left
  68. anchors.leftMargin: parent.width < bedLevelMachineAction.width ? UM.Theme.getSize("default_margin").width : 0
  69. text: catalog.i18nc("@action:button","Skip bed leveling");
  70. onClicked:
  71. {
  72. manager.setFinished()
  73. }
  74. }
  75. }
  76. }
  77. }