From 72b42113b3ca16e801ae9aea866533912d4f00f0 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 1 Mar 2018 15:19:01 +0100 Subject: [PATCH] Add doc for BrandMaterialsModel --- cura/Machines/Models/BrandMaterialsModel.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index ec1e3c7ebe..f6430b39da 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -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