UserAgreementContent.qml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright (c) 2022 UltiMaker
  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 UM 1.5 as UM
  6. import Cura 1.1 as Cura
  7. //
  8. // This component contains the content for the "User Agreement" page of the welcome on-boarding process.
  9. //
  10. Item
  11. {
  12. UM.I18nCatalog { id: catalog; name: "cura" }
  13. UM.Label
  14. {
  15. id: titleLabel
  16. anchors.top: parent.top
  17. anchors.horizontalCenter: parent.horizontalCenter
  18. horizontalAlignment: Text.AlignHCenter
  19. text: catalog.i18nc("@label", "User Agreement")
  20. color: UM.Theme.getColor("primary_button")
  21. font: UM.Theme.getFont("huge")
  22. }
  23. UM.Label
  24. {
  25. id: disclaimerLineLabel
  26. anchors
  27. {
  28. top: titleLabel.bottom
  29. topMargin: UM.Theme.getSize("wide_margin").height
  30. left: parent.left
  31. right: parent.right
  32. }
  33. text: "<p><b>Disclaimer by UltiMaker</b></p>"
  34. + "<p>Please read this disclaimer carefully.</p>"
  35. + "<p>Except when otherwise stated in writing, UltiMaker provides any UltiMaker software or third party software \"As is\" without warranty of any kind. The entire risk as to the quality and performance of UltiMaker software is with you.</p>"
  36. + "<p>Unless required by applicable law or agreed to in writing, in no event will UltiMaker be liable to you for damages, including any general, special, incidental, or consequential damages arising out of the use or inability to use any UltiMaker software or third party software.</p>"
  37. textFormat: Text.RichText
  38. wrapMode: Text.WordWrap
  39. font: UM.Theme.getFont("medium")
  40. }
  41. Cura.PrimaryButton
  42. {
  43. id: agreeButton
  44. anchors.right: parent.right
  45. anchors.bottom: parent.bottom
  46. text: catalog.i18nc("@button", "Agree")
  47. onClicked:
  48. {
  49. CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
  50. CuraApplication.setNeedToShowUserAgreement(false)
  51. base.showNextPage()
  52. }
  53. }
  54. Cura.SecondaryButton
  55. {
  56. id: declineButton
  57. anchors.left: parent.left
  58. anchors.bottom: parent.bottom
  59. text: catalog.i18nc("@button", "Decline and close")
  60. onClicked:
  61. {
  62. CuraApplication.writeToLog("i", "User declined the User Agreement.")
  63. CuraApplication.closeApplication() // NOTE: Hard exit, don't use if anything needs to be saved!
  64. }
  65. }
  66. }