mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
Show quality and intent a custom profile is based on
CURA-6846
This commit is contained in:
parent
027768f151
commit
bd84c4d98d
3 changed files with 41 additions and 8 deletions
|
@ -629,6 +629,16 @@ class MachineManager(QObject):
|
|||
intent_category = category
|
||||
return intent_category
|
||||
|
||||
# Returns the human-readable name of the active intent category. If the intent category is "default", returns an
|
||||
# empty string.
|
||||
@pyqtProperty(str, notify = activeIntentChanged)
|
||||
def activeIntentName(self) -> str:
|
||||
intent_category = self.activeIntentCategory
|
||||
if intent_category == "default":
|
||||
intent_category = ""
|
||||
intent_name = intent_category.capitalize()
|
||||
return intent_name
|
||||
|
||||
# Provies a list of extruder positions that have a different intent from the active one.
|
||||
@pyqtProperty("QStringList", notify=activeIntentChanged)
|
||||
def extruderPositionsWithNonActiveIntent(self):
|
||||
|
@ -1663,11 +1673,25 @@ class MachineManager(QObject):
|
|||
return global_container_stack.qualityChanges.getName()
|
||||
return global_container_stack.quality.getName()
|
||||
|
||||
@pyqtProperty(str, notify = activeQualityChanged)
|
||||
def activeQualityName(self) -> str:
|
||||
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_stack is None:
|
||||
return empty_quality_container.getName()
|
||||
return global_stack.quality.getName()
|
||||
|
||||
@pyqtProperty(bool, notify = activeQualityGroupChanged)
|
||||
def hasNotSupportedQuality(self) -> bool:
|
||||
global_container_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||
return (not global_container_stack is None) and global_container_stack.quality == empty_quality_container and global_container_stack.qualityChanges == empty_quality_changes_container
|
||||
|
||||
@pyqtProperty(bool, notify = activeQualityGroupChanged)
|
||||
def isActiveQualityCustom(self) -> bool:
|
||||
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_stack is None:
|
||||
return False
|
||||
return global_stack.qualityChanges != empty_quality_changes_container
|
||||
|
||||
def _updateUponMaterialMetadataChange(self) -> None:
|
||||
if self._global_container_stack is None:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue