WIP: Create MaterialManager

This commit is contained in:
Lipu Fei 2018-02-07 14:49:46 +01:00
parent 55bdc0c853
commit f0d9fba2f5
7 changed files with 504 additions and 130 deletions

View file

@ -1237,6 +1237,14 @@ class MachineManager(QObject):
return self.getQualityVariantId(self._global_container_stack.definition, variant)
return ""
@pyqtProperty(str, notify = activeVariantChanged)
def activeQualityVariantName(self) -> str:
if self._active_container_stack:
variant = self._active_container_stack.variant
if variant.getId() != "empty_variant":
return variant.getName()
return ""
## Get the Variant ID to use to select quality profiles for variants of the specified definitions
# This is normally the id of the variant itself, but machines can specify a different definition
# to inherit qualities from, which has consequences for the variant to use as well