UserAgreementContent.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright (c) 2019 Ultimaker B.V.
  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.3 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. 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. renderType: Text.NativeRendering
  23. }
  24. Label
  25. {
  26. id: disclaimerLineLabel
  27. anchors
  28. {
  29. top: titleLabel.bottom
  30. topMargin: UM.Theme.getSize("wide_margin").height
  31. left: parent.left
  32. right: parent.right
  33. }
  34. text: "<p><b>Disclaimer by Ultimaker</b></p>"
  35. + "<p>Please read this disclaimer carefully.</p>"
  36. + "<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>"
  37. + "<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>"
  38. textFormat: Text.RichText
  39. wrapMode: Text.WordWrap
  40. font: UM.Theme.getFont("medium")
  41. color: UM.Theme.getColor("text")
  42. renderType: Text.NativeRendering
  43. }
  44. Cura.PrimaryButton
  45. {
  46. id: agreeButton
  47. anchors.right: parent.right
  48. anchors.bottom: parent.bottom
  49. text: catalog.i18nc("@button", "Agree")
  50. onClicked:
  51. {
  52. CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
  53. CuraApplication.setNeedToShowUserAgreement(false)
  54. base.showNextPage()
  55. }
  56. }
  57. Cura.SecondaryButton
  58. {
  59. id: declineButton
  60. anchors.left: parent.left
  61. anchors.bottom: parent.bottom
  62. text: catalog.i18nc("@button", "Decline and close")
  63. onClicked:
  64. {
  65. CuraApplication.writeToLog("i", "User declined the User Agreement.")
  66. CuraApplication.closeApplication() // NOTE: Hard exit, don't use if anything needs to be saved!
  67. }
  68. }
  69. }