mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
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:
parent
037f1967c8
commit
9fda7bd0b9
6 changed files with 136 additions and 63 deletions
19
cura/Machines/MachineNode.py
Normal file
19
cura/Machines/MachineNode.py
Normal 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.ContainerTree import ContainerTree
|
||||
from cura.Machines.VariantNode import VariantNode
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Dict
|
||||
|
||||
## This class represents a machine in the container tree.
|
||||
#
|
||||
# The subnodes of these nodes are variants.
|
||||
class MachineNode(ContainerNode):
|
||||
def __init__(self, container_id: str) -> None:
|
||||
super().__init__(container_id, None)
|
||||
self.variants = {} # type: Dict[str, VariantNode] # mapping variant IDs to their nodes.
|
Loading…
Add table
Add a link
Reference in a new issue