GCodeListDecorator.py 830 B

1234567891011121314151617181920212223242526
  1. from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
  2. from typing import List, Optional
  3. class GCodeListDecorator(SceneNodeDecorator):
  4. def __init__(self) -> None:
  5. super().__init__()
  6. self._gcode_list = [] # type: List[str]
  7. self._filename = None # type: Optional[str]
  8. def getGcodeFileName(self) -> Optional[str]:
  9. return self._filename
  10. def setGcodeFileName(self, filename: str) -> None:
  11. self._filename = filename
  12. def getGCodeList(self) -> List[str]:
  13. return self._gcode_list
  14. def setGCodeList(self, list: List[str]) -> None:
  15. self._gcode_list = list
  16. def __deepcopy__(self, memo) -> "GCodeListDecorator":
  17. copied_decorator = GCodeListDecorator()
  18. copied_decorator.setGCodeList(self.getGCodeList())
  19. return copied_decorator