SettingsExportGroup.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (c) 2024 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from enum import IntEnum
  4. from PyQt6.QtCore import QObject, pyqtProperty, pyqtEnum
  5. class SettingsExportGroup(QObject):
  6. @pyqtEnum
  7. class Category(IntEnum):
  8. Global = 0
  9. Extruder = 1
  10. Model = 2
  11. def __init__(self, stack, name, category, settings, category_details = '', extruder_index = 0, extruder_color = ''):
  12. super().__init__()
  13. self.stack = stack
  14. self._name = name
  15. self._settings = settings
  16. self._category = category
  17. self._category_details = category_details
  18. self._extruder_index = extruder_index
  19. self._extruder_color = extruder_color
  20. @pyqtProperty(str, constant=True)
  21. def name(self):
  22. return self._name
  23. @pyqtProperty(list, constant=True)
  24. def settings(self):
  25. return self._settings
  26. @pyqtProperty(int, constant=True)
  27. def category(self):
  28. return self._category
  29. @pyqtProperty(str, constant=True)
  30. def category_details(self):
  31. return self._category_details
  32. @pyqtProperty(int, constant=True)
  33. def extruder_index(self):
  34. return self._extruder_index
  35. @pyqtProperty(str, constant=True)
  36. def extruder_color(self):
  37. return self._extruder_color