UserAgreementContent.qml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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
  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. /*
  36. anchors.top: titleLabel.bottom
  37. anchors.bottom: agreeButton.top
  38. anchors.horizontalCenter: parent.horizontalCenter
  39. */
  40. anchors.centerIn: parent
  41. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  42. width: (parent.width * 2 / 3) | 0
  43. text: "<p><b>Disclaimer by Ultimaker</b></p>"
  44. + "<p>Please read this disclaimer carefully.</p>"
  45. + "<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>"
  46. + "<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>"
  47. textFormat: Text.RichText
  48. wrapMode: Text.WordWrap
  49. font: UM.Theme.getFont("default")
  50. renderType: Text.NativeRendering
  51. }
  52. }
  53. Cura.PrimaryButton
  54. {
  55. id: agreeButton
  56. anchors.right: parent.right
  57. anchors.bottom: parent.bottom
  58. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  59. text: catalog.i18nc("@button", "Agree")
  60. width: 140
  61. fixedWidthMode: true
  62. onClicked:
  63. {
  64. CuraApplication.writeToLog("i", "User accepted the User-Agreement.")
  65. CuraApplication.setNeedToShowUserAgreement(false)
  66. base.showNextPage()
  67. }
  68. }
  69. Cura.SecondaryButton
  70. {
  71. id: declineButton
  72. anchors.left: parent.left
  73. anchors.bottom: parent.bottom
  74. anchors.margins: UM.Theme.getSize("welcome_pages_default_margin").width
  75. text: catalog.i18nc("@button", "Decline and close")
  76. width: 140
  77. fixedWidthMode: true
  78. onClicked:
  79. {
  80. CuraApplication.writeToLog("i", "User declined the User Agreement.")
  81. base.passLastPage()
  82. CuraApplication.closeApplication() // NOTE: Hard exit, don't use if anything needs to be saved!
  83. }
  84. }
  85. }