CuraView.py 905 B

123456789101112131415161718192021222324
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from PyQt5.QtCore import pyqtProperty, QUrl
  4. from UM.View.View import View
  5. # Since Cura has a few pre-defined "space claims" for the locations of certain components, we've provided some structure
  6. # to indicate this.
  7. # MainComponent works in the same way the MainComponent of a stage.
  8. # the stageMenuComponent returns an item that should be used somehwere in the stage menu. It's up to the active stage
  9. # to actually do something with this.
  10. class CuraView(View):
  11. def __init__(self, parent = None) -> None:
  12. super().__init__(parent)
  13. @pyqtProperty(QUrl, constant = True)
  14. def mainComponent(self) -> QUrl:
  15. return self.getDisplayComponent("main")
  16. @pyqtProperty(QUrl, constant = True)
  17. def stageMenuComponent(self) -> QUrl:
  18. return self.getDisplayComponent("menu")