mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Move MaterialOutputModel back
This commit is contained in:
parent
b28fdc2b0b
commit
8780fce7a7
7 changed files with 13 additions and 12 deletions
36
cura/PrinterOutput/Models/MaterialOutputModel.py
Normal file
36
cura/PrinterOutput/Models/MaterialOutputModel.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from PyQt5.QtCore import pyqtProperty, QObject
|
||||
|
||||
|
||||
class MaterialOutputModel(QObject):
|
||||
def __init__(self, guid: Optional[str], type: str, color: str, brand: str, name: str, parent = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._guid = guid
|
||||
self._type = type
|
||||
self._color = color
|
||||
self._brand = brand
|
||||
self._name = name
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def guid(self) -> str:
|
||||
return self._guid if self._guid else ""
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def type(self) -> str:
|
||||
return self._type
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def brand(self) -> str:
|
||||
return self._brand
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def color(self) -> str:
|
||||
return self._color
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
def name(self) -> str:
|
||||
return self._name
|
Loading…
Add table
Add a link
Reference in a new issue