mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:15:54 +08:00
Add doc for BrandMaterialsModel
This commit is contained in:
parent
d6f6dbe45e
commit
72b42113b3
@ -8,6 +8,9 @@ from UM.Qt.ListModel import ListModel
|
||||
from .BaseMaterialsModel import BaseMaterialsModel
|
||||
|
||||
|
||||
#
|
||||
# This is an intermediate model to group materials with different colours for a same brand and type.
|
||||
#
|
||||
class MaterialsModelGroupedByType(ListModel):
|
||||
NameRole = Qt.UserRole + 1
|
||||
ColorsRole = Qt.UserRole + 2
|
||||
@ -19,7 +22,18 @@ class MaterialsModelGroupedByType(ListModel):
|
||||
self.addRoleName(self.ColorsRole, "colors")
|
||||
|
||||
|
||||
## Brand --> Material Type -> list of materials
|
||||
#
|
||||
# This model is used to show branded materials in the material drop down menu.
|
||||
# The structure of the menu looks like this:
|
||||
# Brand -> Material Type -> list of materials
|
||||
#
|
||||
# To illustrate, a branded material menu may look like this:
|
||||
# Ultimaker -> PLA -> Yellow PLA
|
||||
# -> Black PLA
|
||||
# -> ...
|
||||
# -> ABS -> White ABS
|
||||
# ...
|
||||
#
|
||||
class BrandMaterialsModel(ListModel):
|
||||
NameRole = Qt.UserRole + 1
|
||||
MaterialsRole = Qt.UserRole + 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user