mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:39:04 +08:00
Change to "name" property
CURA-6599
This commit is contained in:
parent
f5639192ee
commit
e5d94fd2e4
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
from PyQt5.QtCore import QObject, pyqtSlot
|
from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty
|
||||||
|
|
||||||
|
|
||||||
## Data struct to group several quality changes instance containers together.
|
## Data struct to group several quality changes instance containers together.
|
||||||
@ -23,16 +23,16 @@ class QualityChangesGroup(QObject):
|
|||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
self.setParent(CuraApplication.getInstance())
|
self.setParent(CuraApplication.getInstance())
|
||||||
|
|
||||||
self.name = name
|
self._name = name
|
||||||
self.quality_type = quality_type
|
self.quality_type = quality_type
|
||||||
self.intent_category = intent_category
|
self.intent_category = intent_category
|
||||||
self.is_available = False
|
self.is_available = False
|
||||||
self.metadata_for_global = {} # type: Dict[str, Any]
|
self.metadata_for_global = {} # type: Dict[str, Any]
|
||||||
self.metadata_per_extruder = {} # type: Dict[int, Dict[str, Any]]
|
self.metadata_per_extruder = {} # type: Dict[int, Dict[str, Any]]
|
||||||
|
|
||||||
@pyqtSlot(result = str)
|
@pyqtProperty(str, constant = True)
|
||||||
def getName(self) -> str:
|
def name(self) -> str:
|
||||||
return self.name
|
return self._name
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return "{class_name}[{name}, available = {is_available}]".format(class_name = self.__class__.__name__, name = self.name, is_available = self.is_available)
|
return "{class_name}[{name}, available = {is_available}]".format(class_name = self.__class__.__name__, name = self.name, is_available = self.is_available)
|
||||||
|
@ -177,7 +177,7 @@ Popup
|
|||||||
|
|
||||||
if (active_quality_group != null)
|
if (active_quality_group != null)
|
||||||
{
|
{
|
||||||
return active_quality_group.getName() == model.quality_changes_group.getName()
|
return active_quality_group.name == model.quality_changes_group.name
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user