CuraStage.py 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from PyQt6.QtCore import pyqtProperty, QUrl
  4. from UM.Stage import Stage
  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. # * The StageMenuComponent is the horizontal area below the stage bar. This should be used to show stage specific
  8. # buttons and elements. This component will be drawn over the bar & main component.
  9. # * The MainComponent is the component that will be drawn starting from the bottom of the stageBar and fills the rest
  10. # of the screen.
  11. class CuraStage(Stage):
  12. def __init__(self, parent = None) -> None:
  13. super().__init__(parent)
  14. @pyqtProperty(str, constant = True)
  15. def stageId(self) -> str:
  16. return self.getPluginId()
  17. @pyqtProperty(QUrl, constant = True)
  18. def mainComponent(self) -> QUrl:
  19. return self.getDisplayComponent("main")
  20. @pyqtProperty(QUrl, constant = True)
  21. def stageMenuComponent(self) -> QUrl:
  22. return self.getDisplayComponent("menu")
  23. __all__ = ["CuraStage"]