DigitalFactoryOpenDialog.qml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: digitalFactoryOpenDialogBase
  12. title: "Open file from 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: digitalFactoryOpenDialogBase.close()
  22. }
  23. color: UM.Theme.getColor("main_background")
  24. SelectProjectPage
  25. {
  26. visible: manager.selectedProjectIndex == -1
  27. createNewProjectButtonVisible: false
  28. }
  29. OpenProjectFilesPage
  30. {
  31. visible: manager.selectedProjectIndex >= 0
  32. onOpenFilePressed: digitalFactoryOpenDialogBase.close()
  33. }
  34. BusyIndicator
  35. {
  36. // Shows up while Cura is waiting to receive the user's projects from the digital factory library
  37. id: retrievingProjectsBusyIndicator
  38. anchors {
  39. verticalCenter: parent.verticalCenter
  40. horizontalCenter: parent.horizontalCenter
  41. }
  42. width: parent.width / 4
  43. height: width
  44. visible: manager.retrievingProjectsStatus == DF.RetrievalStatus.InProgress
  45. running: visible
  46. palette.dark: UM.Theme.getColor("text")
  47. }
  48. }