DigitalFactorySaveDialog.qml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //Copyright (C) 2022 Ultimaker B.V.
  2. //Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Window 2.2
  5. import QtQuick.Controls 2.3
  6. import UM 1.2 as UM
  7. import Cura 1.6 as Cura
  8. import DigitalFactory 1.0 as DF
  9. Window
  10. {
  11. id: digitalFactorySaveDialogBase
  12. title: "Save Cura project to Library"
  13. modality: Qt.ApplicationModal
  14. width: 800 * screenScaleFactor
  15. height: 600 * screenScaleFactor
  16. minimumWidth: 800 * screenScaleFactor
  17. minimumHeight: 600 * screenScaleFactor
  18. Shortcut
  19. {
  20. sequence: "Esc"
  21. onActivated: digitalFactorySaveDialogBase.close()
  22. }
  23. color: UM.Theme.getColor("main_background")
  24. SelectProjectPage
  25. {
  26. visible: manager.selectedProjectIndex == -1
  27. createNewProjectButtonVisible: true
  28. }
  29. SaveProjectFilesPage
  30. {
  31. visible: manager.selectedProjectIndex >= 0
  32. onSavePressed: digitalFactorySaveDialogBase.close()
  33. onSelectDifferentProjectPressed: manager.clearProjectSelection()
  34. }
  35. BusyIndicator
  36. {
  37. // Shows up while Cura is waiting to receive the user's projects from the digital factory library
  38. id: retrievingProjectsBusyIndicator
  39. anchors {
  40. verticalCenter: parent.verticalCenter
  41. horizontalCenter: parent.horizontalCenter
  42. }
  43. width: parent.width / 4
  44. height: width
  45. visible: manager.retrievingProjectsStatus == DF.RetrievalStatus.InProgress
  46. running: visible
  47. palette.dark: UM.Theme.getColor("text")
  48. }
  49. }