MaterialModel.py 759 B

1234567891011121314151617181920212223242526272829
  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 MaterialModel(QObject):
  5. def __init__(self, guid, type, color, brand, parent = None):
  6. super().__init__(parent)
  7. self._guid = guid
  8. self._type = type
  9. self._color = color
  10. self._brand = brand
  11. @pyqtProperty(str, constant = True)
  12. def guid(self):
  13. return self._guid
  14. @pyqtProperty(str, constant=True)
  15. def type(self):
  16. return self._type
  17. @pyqtProperty(str, constant=True)
  18. def brand(self):
  19. return self._brand
  20. @pyqtProperty(str, constant=True)
  21. def color(self):
  22. return self._color