mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00

This sets up a few new classes, subclasses of ContainerNode. This is intended to simplify the current structure in the QualityManager. Contributes to issue CURA-6600.
19 lines
No EOL
681 B
Python
19 lines
No EOL
681 B
Python
# Copyright (c) 2019 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from cura.Machines.ContainerNode import ContainerNode
|
|
from cura.Machines.QualityNode import QualityNode
|
|
from cura.Machines.VariantNode import VariantNode
|
|
|
|
if TYPE_CHECKING:
|
|
from typing import Dict
|
|
|
|
## Represents a material in the container tree.
|
|
#
|
|
# Its subcontainers are quality profiles.
|
|
class MaterialNode(ContainerNode):
|
|
def __init__(self, container_id, parent: VariantNode) -> None:
|
|
super().__init__(container_id, parent)
|
|
self.qualities = {} # type: Dict[str, QualityNode] # Mapping container IDs to quality profiles. |