mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-30 07:44:22 +08: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
703 B
Python
19 lines
703 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.MachineNode import MachineNode
|
|
from cura.Machines.MaterialNode import MaterialNode
|
|
|
|
if TYPE_CHECKING:
|
|
from typing import Dict
|
|
|
|
## This class represents an extruder variant in the container tree.
|
|
#
|
|
# The subnodes of these nodes are materials.
|
|
class VariantNode(ContainerNode):
|
|
def __init__(self, container_id: str, parent: MachineNode) -> None:
|
|
super().__init__(container_id, parent)
|
|
self.variants = {} # type: Dict[str, MaterialNode] # mapping variant IDs to their nodes. |