UserAgreementContent.qml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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.topMargin: UM.Theme.getSize("welcome_pages_default_margin").height
  18. anchors.horizontalCenter: parent.horizontalCenter
  19. horizontalAlignment: Text.AlignHCenter
  20. text: catalog.i18nc("@label", "User Agreement")
  21. color: UM.Theme.getColor("primary_button")
  22. font: UM.Theme.getFont("large_bold")
  23. renderType: Text.NativeRendering
  24. }
  25. Item // Area for pictures and texts
  26. {
  27. anchors.top: titleLabel.bottom
  28. anchors.bottom: agreeButton.top
  29. anchors.left: parent.left
  30. anchors.right: parent.right
  31. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  32. Label
  33. {
  34. id: disclaimerLineLabel
  35. anchors.centerIn: parent
  36. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  37. width: (parent.width * 2 / 3) | 0
  38. text: "<p><b>Disclaimer by Ultimaker</b></p>"
  39. + "<p>Please read this disclaimer carefully.</p>"
  40. + "<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 perfoemance of Ultimaker software is with you.</p>"
  41. + "<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>"
  42. textFormat: Text.RichText
  43. wrapMode: Text.WordWrap
  44. font: UM.Theme.getFont("default")
  45. renderType: Text.NativeRendering
  46. }
  47. }
  48. Cura.PrimaryButton
  49. {
  50. id: agreeButton
  51. anchors.right: parent.right
  52. anchors.bottom: parent.bottom
  53. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  54. text: catalog.i18nc("@button", "Agree")
  55. width: UM.Theme.getSize("welcome_pages_button").width
  56. fixedWidthMode: true
  57. onClicked:
  58. {
  59. CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
  60. CuraApplication.setNeedToShowUserAgreement(false)
  61. base.showNextPage()
  62. }
  63. }
  64. Cura.SecondaryButton
  65. {
  66. id: declineButton
  67. anchors.left: parent.left
  68. anchors.bottom: parent.bottom
  69. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  70. text: catalog.i18nc("@button", "Decline and close")
  71. width: UM.Theme.getSize("welcome_pages_button").width
  72. fixedWidthMode: true
  73. onClicked:
  74. {
  75. CuraApplication.writeToLog("i", "User declined the User Agreement.")
  76. base.passLastPage()
  77. CuraApplication.closeApplication() // NOTE: Hard exit, don't use if anything needs to be saved!
  78. }
  79. }
  80. }