WelcomeDialog.qml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 QtQuick.Window 2.2
  6. import QtGraphicalEffects 1.0 // For the DropShadow
  7. import UM 1.3 as UM
  8. import Cura 1.1 as Cura
  9. Window
  10. {
  11. UM.I18nCatalog { id: catalog; name: "cura" }
  12. id: dialog
  13. title: catalog.i18nc("@title", "Welcome to Ultimaker Cura")
  14. modality: Qt.ApplicationModal
  15. flags: Qt.Window | Qt.FramelessWindowHint
  16. width: 580 * screenScaleFactor
  17. height: 600 * screenScaleFactor
  18. color: "transparent"
  19. property int shadowOffset: 1 * screenScaleFactor
  20. property var model: CuraApplication.getWelcomePagesModel()
  21. onVisibleChanged:
  22. {
  23. if (visible)
  24. {
  25. model.resetState()
  26. }
  27. }
  28. WizardPanel
  29. {
  30. id: stepPanel
  31. anchors.fill: parent
  32. model: dialog.model
  33. }
  34. // Drop shadow around the panel
  35. DropShadow
  36. {
  37. id: shadow
  38. radius: UM.Theme.getSize("monitor_shadow_radius").width
  39. anchors.fill: stepPanel
  40. source: stepPanel
  41. horizontalOffset: shadowOffset
  42. verticalOffset: shadowOffset
  43. color: UM.Theme.getColor("monitor_shadow")
  44. transparentBorder: true
  45. }
  46. // Close this dialog when there's no more page to show
  47. Connections
  48. {
  49. target: model
  50. onAllFinished: close()
  51. }
  52. }