ViewOrientationControls.qml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import UM 1.4 as UM
  5. import Cura 1.1 as Cura
  6. // A row of buttons that control the view direction
  7. Row
  8. {
  9. id: viewOrientationControl
  10. spacing: UM.Theme.getSize("narrow_margin").width
  11. height: childrenRect.height
  12. width: childrenRect.width
  13. ViewOrientationButton
  14. {
  15. iconSource: UM.Theme.getIcon("View3D")
  16. onClicked: Cura.Actions.view3DCamera.trigger()
  17. UM.TooltipArea
  18. {
  19. anchors.fill: parent
  20. text: catalog.i18nc("@info:tooltip", "3D View")
  21. acceptedButtons: Qt.NoButton
  22. }
  23. }
  24. ViewOrientationButton
  25. {
  26. iconSource: UM.Theme.getIcon("ViewFront")
  27. onClicked: Cura.Actions.viewFrontCamera.trigger()
  28. UM.TooltipArea
  29. {
  30. anchors.fill: parent
  31. text: catalog.i18nc("@info:tooltip", "Front View")
  32. acceptedButtons: Qt.NoButton
  33. }
  34. }
  35. ViewOrientationButton
  36. {
  37. iconSource: UM.Theme.getIcon("ViewTop")
  38. onClicked: Cura.Actions.viewTopCamera.trigger()
  39. UM.TooltipArea
  40. {
  41. anchors.fill: parent
  42. text: catalog.i18nc("@info:tooltip", "Top View")
  43. acceptedButtons: Qt.NoButton
  44. }
  45. }
  46. ViewOrientationButton
  47. {
  48. iconSource: UM.Theme.getIcon("ViewLeft")
  49. onClicked: Cura.Actions.viewLeftSideCamera.trigger()
  50. UM.TooltipArea
  51. {
  52. anchors.fill: parent
  53. text: catalog.i18nc("@info:tooltip", "Left View")
  54. acceptedButtons: Qt.NoButton
  55. }
  56. }
  57. ViewOrientationButton
  58. {
  59. iconSource: UM.Theme.getIcon("ViewRight")
  60. onClicked: Cura.Actions.viewRightSideCamera.trigger()
  61. UM.TooltipArea
  62. {
  63. anchors.fill: parent
  64. text: catalog.i18nc("@info:tooltip", "Right View")
  65. acceptedButtons: Qt.NoButton
  66. }
  67. }
  68. }