diff options
Diffstat (limited to 'cura/Machines/QualityGroup.py')
-rw-r--r-- | cura/Machines/QualityGroup.py | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/cura/Machines/QualityGroup.py b/cura/Machines/QualityGroup.py index 58ba3acc63..2e5e8db905 100644 --- a/cura/Machines/QualityGroup.py +++ b/cura/Machines/QualityGroup.py @@ -3,36 +3,40 @@ from typing import Dict, Optional, List, Set -from PyQt5.QtCore import QObject, pyqtSlot - from UM.Logger import Logger from UM.Util import parseBool from cura.Machines.ContainerNode import ContainerNode -## A QualityGroup represents a group of quality containers that must be applied -# to each ContainerStack when it's used. -# -# A concrete example: When there are two extruders and the user selects the -# quality type "normal", this quality type must be applied to all stacks in a -# machine, although each stack can have different containers. So one global -# profile gets put on the global stack and one extruder profile gets put on -# each extruder stack. This quality group then contains the following -# profiles (for instance): -# GlobalStack ExtruderStack 1 ExtruderStack 2 -# quality container: um3_global_normal um3_aa04_pla_normal um3_aa04_abs_normal -# -# The purpose of these quality groups is to group the containers that can be -# applied to a configuration, so that when a quality level is selected, the -# container can directly be applied to each stack instead of looking them up -# again. class QualityGroup: - ## Constructs a new group. - # \param name The user-visible name for the group. - # \param quality_type The quality level that each profile in this group - # has. + """A QualityGroup represents a group of quality containers that must be applied to each ContainerStack when it's + used. + + A concrete example: When there are two extruders and the user selects the quality type "normal", this quality + type must be applied to all stacks in a machine, although each stack can have different containers. So one global + profile gets put on the global stack and one extruder profile gets put on each extruder stack. This quality group + then contains the following profiles (for instance): + - GlobalStack + - ExtruderStack 1 + - ExtruderStack 2 + quality container: + - um3_global_normal + - um3_aa04_pla_normal + - um3_aa04_abs_normal + + The purpose of these quality groups is to group the containers that can be applied to a configuration, + so that when a quality level is selected, the container can directly be applied to each stack instead of looking + them up again. + """ + def __init__(self, name: str, quality_type: str) -> None: + """Constructs a new group. + + :param name: The user-visible name for the group. + :param quality_type: The quality level that each profile in this group has. + """ + self.name = name self.node_for_global = None # type: Optional[ContainerNode] self.nodes_for_extruders = {} # type: Dict[int, ContainerNode] |