WelcomeDialog.qml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. title: catalog.i18nc("@title", "Welcome to Ultimaker Cura")
  13. modality: Qt.ApplicationModal
  14. flags: Qt.Window | Qt.FramelessWindowHint
  15. width: 580 // TODO
  16. height: 600 // TODO
  17. color: "transparent"
  18. property int shadowOffset: 1 * screenScaleFactor
  19. property alias currentStep: stepPanel.currentStep
  20. StepPanel
  21. {
  22. id: stepPanel
  23. anchors.fill: parent
  24. currentStep: 0
  25. model: CuraApplication.getWelcomePagesModel()
  26. }
  27. // Drop shadow around the panel
  28. DropShadow
  29. {
  30. id: shadow
  31. radius: UM.Theme.getSize("monitor_shadow_radius").width
  32. anchors.fill: stepPanel
  33. source: stepPanel
  34. horizontalOffset: shadowOffset
  35. verticalOffset: shadowOffset
  36. color: UM.Theme.getColor("monitor_shadow")
  37. transparentBorder: true
  38. }
  39. // Close this dialog when there's no more page to show
  40. Connections
  41. {
  42. target: stepPanel
  43. onPassLastPage: close()
  44. }
  45. }