UserAgreement.qml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright (c) 2017 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Controls 1.4
  5. import UM 1.3 as UM
  6. UM.Dialog
  7. {
  8. id: baseDialog
  9. minimumWidth: Math.round(UM.Theme.getSize("modal_window_minimum").width * 0.75)
  10. minimumHeight: Math.round(UM.Theme.getSize("modal_window_minimum").height * 0.5)
  11. width: minimumWidth
  12. height: minimumHeight
  13. title: catalog.i18nc("@title:window", "User Agreement")
  14. TextArea
  15. {
  16. anchors.top: parent.top
  17. width: parent.width
  18. anchors.bottom: buttonRow.top
  19. text: ' <center><h3>DISCLAIMER BY ULTIMAKER</h3></center>
  20. <p>PLEASE READ THIS DISCLAIMER CAREFULLY.</p>
  21. <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>
  22. <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>
  23. '
  24. readOnly: true;
  25. textFormat: TextEdit.RichText
  26. }
  27. Item
  28. {
  29. id: buttonRow
  30. anchors.bottom: parent.bottom
  31. width: parent.width
  32. anchors.bottomMargin: UM.Theme.getSize("default_margin").height
  33. UM.I18nCatalog { id: catalog; name:"cura" }
  34. Button
  35. {
  36. anchors.right: parent.right
  37. text: catalog.i18nc("@action:button", "I understand and agree")
  38. onClicked: {
  39. baseDialog.accepted()
  40. }
  41. }
  42. Button
  43. {
  44. anchors.left: parent.left
  45. text: catalog.i18nc("@action:button", "I don't agree")
  46. onClicked: {
  47. baseDialog.rejected()
  48. }
  49. }
  50. }
  51. onAccepted: manager.didAgree(true)
  52. onRejected: manager.didAgree(false)
  53. onClosing: manager.didAgree(false)
  54. }