CURA-4461 Add dropdown menu in the UI for selecting the buildplate if

the printer has different buildplates.
This commit is contained in:
Diego Prado Gesto 2018-01-09 15:42:10 +01:00
parent 342bdda641
commit becb0cf7b9
4 changed files with 149 additions and 3 deletions

View file

@ -844,6 +844,11 @@ class MachineManager(QObject):
else:
Logger.log("w", "While trying to set the active variant, no variant was found to replace.")
@pyqtSlot(str)
def setActiveVariantBuildplate(self, variant_buildplate_id: str):
Logger.log("d", "Attempting to change the active buildplate to %s", variant_buildplate_id)
pass
## set the active quality
# \param quality_id The quality_id of either a quality or a quality_changes
@pyqtSlot(str)
@ -1105,6 +1110,15 @@ class MachineManager(QObject):
return ""
@pyqtProperty(str, notify = activeVariantChanged)
def activeVariantBuildplateName(self) -> str:
if self._global_container_stack:
variant = self._global_container_stack.variant
if variant:
return variant.getName()
return ""
@pyqtProperty(str, notify = globalContainerChanged)
def activeDefinitionId(self) -> str:
if self._global_container_stack:
@ -1202,7 +1216,6 @@ class MachineManager(QObject):
def hasMaterials(self) -> bool:
if self._global_container_stack:
return Util.parseBool(self._global_container_stack.getMetaDataEntry("has_materials", False))
return False
@pyqtProperty(bool, notify = globalContainerChanged)
@ -1211,6 +1224,12 @@ class MachineManager(QObject):
return Util.parseBool(self._global_container_stack.getMetaDataEntry("has_variants", False))
return False
@pyqtProperty(bool, notify = globalContainerChanged)
def hasVariantBuildplates(self) -> bool:
if self._global_container_stack:
return Util.parseBool(self._global_container_stack.getMetaDataEntry("has_variant_buildplates", False))
return False
## Property to indicate if a machine has "specialized" material profiles.
# Some machines have their own material profiles that "override" the default catch all profiles.
@pyqtProperty(bool, notify = globalContainerChanged)