ViewPage.qml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright (c) 2015 Ultimaker B.V.
  2. // Cura is released under the terms of the AGPLv3 or higher.
  3. import QtQuick 2.1
  4. import QtQuick.Controls 1.1
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Controls.Styles 1.1
  7. import UM 1.0 as UM
  8. UM.PreferencesPage {
  9. id: preferencesPage
  10. //: View configuration page title
  11. title: qsTr("View");
  12. function reset()
  13. {
  14. UM.Preferences.resetPreference("view/show_overhang");
  15. }
  16. GridLayout {
  17. columns: 2;
  18. CheckBox {
  19. id: viewCheckbox
  20. checked: UM.Preferences.getValue("view/show_overhang")
  21. onCheckedChanged: UM.Preferences.setValue("view/show_overhang", checked)
  22. }
  23. Button {
  24. id: viewText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox
  25. //: Display Overhang preference checkbox
  26. text: qsTr("Display Overhang");
  27. onClicked: viewCheckbox.checked = !viewCheckbox.checked
  28. //: Display Overhang preference tooltip
  29. tooltip: "Highlight unsupported areas of the model in red. Without support these areas will nog print properly."
  30. style: ButtonStyle {
  31. background: Rectangle {
  32. border.width: 0
  33. color: "transparent"
  34. }
  35. label: Text {
  36. renderType: Text.NativeRendering
  37. horizontalAlignment: Text.AlignLeft
  38. text: control.text
  39. }
  40. }
  41. }
  42. Item { Layout.fillHeight: true; Layout.columnSpan: 2 }
  43. }
  44. }