PrepareStage.py 874 B

123456789101112131415161718192021
  1. # Copyright (c) 2019 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. import os.path
  4. from UM.Application import Application
  5. from UM.PluginRegistry import PluginRegistry
  6. from cura.Stages.CuraStage import CuraStage
  7. class PrepareStage(CuraStage):
  8. """Stage for preparing model (slicing)."""
  9. def __init__(self, parent = None):
  10. super().__init__(parent)
  11. Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
  12. def _engineCreated(self):
  13. menu_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMenu.qml")
  14. main_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMain.qml")
  15. self.addDisplayComponent("menu", menu_component_path)
  16. self.addDisplayComponent("main", main_component_path)