WizardDialog.qml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 UM 1.3 as UM
  7. import Cura 1.1 as Cura
  8. //
  9. // This is a dialog for showing a set of processes that's defined in a WelcomePagesModel or some other Qt ListModel with
  10. // a compatible interface.
  11. //
  12. Window
  13. {
  14. UM.I18nCatalog { id: catalog; name: "cura" }
  15. id: dialog
  16. flags: Qt.Dialog
  17. modality: Qt.ApplicationModal
  18. minimumWidth: UM.Theme.getSize("modal_window_minimum").width
  19. minimumHeight: UM.Theme.getSize("modal_window_minimum").height
  20. maximumWidth: minimumWidth
  21. maximumHeight: minimumHeight
  22. color: UM.Theme.getColor("main_background")
  23. property var model: null // Needs to be set by whoever is using this dialog.
  24. property alias progressBarVisible: wizardPanel.progressBarVisible
  25. WizardPanel
  26. {
  27. id: wizardPanel
  28. anchors.fill: parent
  29. model: dialog.model
  30. visible: dialog.visible
  31. }
  32. // Close this dialog when there's no more page to show
  33. Connections
  34. {
  35. target: model
  36. function onAllFinished() { dialog.hide() }
  37. }
  38. }