mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Added extruder information to workspace summary dialog
CURA-1263
This commit is contained in:
parent
8391a7971b
commit
ff18a314ef
2 changed files with 43 additions and 3 deletions
|
@ -498,6 +498,17 @@ class MachineManager(QObject):
|
|||
|
||||
return ""
|
||||
|
||||
@pyqtProperty("QVariantList", notify=activeVariantChanged)
|
||||
def activeVariantNames(self):
|
||||
result = []
|
||||
if ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() is not None:
|
||||
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||
variant_container = stack.findContainer({"type": "variant"})
|
||||
if variant_container and variant_container != self._empty_variant_container:
|
||||
result.append(variant_container.getName())
|
||||
|
||||
return result
|
||||
|
||||
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||
def activeMaterialNames(self):
|
||||
result = []
|
||||
|
@ -987,7 +998,7 @@ class MachineManager(QObject):
|
|||
if self._global_container_stack:
|
||||
definition = self._global_container_stack.getBottom()
|
||||
if definition:
|
||||
return definition.getMetaDataEntry("name", "")
|
||||
return definition.getName()
|
||||
|
||||
return ""
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ UM.Dialog
|
|||
}
|
||||
Label
|
||||
{
|
||||
text: manager.activeDefinitionName
|
||||
text: Cura.MachineManager.activeDefinitionName
|
||||
width: parent.width / 3
|
||||
}
|
||||
}
|
||||
|
@ -120,8 +120,37 @@ UM.Dialog
|
|||
text: Cura.MachineManager.activeMachineName
|
||||
width: parent.width / 3
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Repeater
|
||||
{
|
||||
model: Cura.MachineManager.activeMaterialNames
|
||||
delegate: Column
|
||||
{
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1)
|
||||
}
|
||||
height: childrenRect.height
|
||||
width: parent.width
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "%1 & material").arg(Cura.MachineManager.activeDefinitionVariantsName)
|
||||
width: parent.width / 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: Cura.MachineManager.activeVariantNames[index] + ", " + modelData
|
||||
width: parent.width / 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item // Spacer
|
||||
{
|
||||
height: spacerHeight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue