PrepareStage.py 760 B

12345678910111213141516171819
  1. # Copyright (c) 2017 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.Resources import Resources
  6. from cura.Stages.CuraStage import CuraStage
  7. ## Stage for preparing model (slicing).
  8. class PrepareStage(CuraStage):
  9. def __init__(self, parent = None):
  10. super().__init__(parent)
  11. Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
  12. def _engineCreated(self):
  13. sidebar_component_path = os.path.join(Resources.getPath(Application.getInstance().ResourceTypes.QmlFiles),
  14. "PrepareSidebar.qml")
  15. self.addDisplayComponent("sidebar", sidebar_component_path)