MaterialOutputModel.py 882 B

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from PyQt5.QtCore import pyqtSignal, pyqtProperty, QObject, QVariant, pyqtSlot
  4. class MaterialOutputModel(QObject):
  5. def __init__(self, guid, type, color, brand, name, parent = None):
  6. super().__init__(parent)
  7. self._guid = guid
  8. self._type = type
  9. self._color = color
  10. self._brand = brand
  11. self._name = name
  12. @pyqtProperty(str, constant = True)
  13. def guid(self):
  14. return self._guid
  15. @pyqtProperty(str, constant=True)
  16. def type(self):
  17. return self._type
  18. @pyqtProperty(str, constant=True)
  19. def brand(self):
  20. return self._brand
  21. @pyqtProperty(str, constant=True)
  22. def color(self):
  23. return self._color
  24. @pyqtProperty(str, constant=True)
  25. def name(self):
  26. return self._name