Rework container tree structure

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.
This commit is contained in:
Ghostkeeper 2019-08-05 17:39:19 +02:00
parent 037f1967c8
commit 9fda7bd0b9
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
6 changed files with 136 additions and 63 deletions

View file

@ -0,0 +1,19 @@
# 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.MaterialNode import MaterialNode
from cura.Machines.QualityNode import QualityNode
if TYPE_CHECKING:
from typing import Dict
## This class represents an intent category in the container tree.
#
# This class has no more subnodes.
class IntentNode(ContainerNode):
def __init__(self, container_id: str, parent: QualityNode) -> None:
super().__init__(container_id, parent)
self.variants = {} # type: Dict[str, MaterialNode] # mapping variant IDs to their nodes.