UserAgreement.qml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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.floor(UM.Theme.getSize("modal_window_minimum").width * 0.75)
  10. minimumHeight: Math.floor(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. manager.didAgree(true)
  40. }
  41. }
  42. Button
  43. {
  44. anchors.left: parent.left
  45. text: catalog.i18nc("@action:button", "I don't agree")
  46. onClicked: {
  47. manager.didAgree(false)
  48. }
  49. }
  50. }
  51. onClosing: {
  52. manager.didAgree(false)
  53. }
  54. }