mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -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 ""
|
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)
|
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||||
def activeMaterialNames(self):
|
def activeMaterialNames(self):
|
||||||
result = []
|
result = []
|
||||||
|
@ -987,7 +998,7 @@ class MachineManager(QObject):
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
definition = self._global_container_stack.getBottom()
|
definition = self._global_container_stack.getBottom()
|
||||||
if definition:
|
if definition:
|
||||||
return definition.getMetaDataEntry("name", "")
|
return definition.getName()
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ UM.Dialog
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: manager.activeDefinitionName
|
text: Cura.MachineManager.activeDefinitionName
|
||||||
width: parent.width / 3
|
width: parent.width / 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,8 +120,37 @@ UM.Dialog
|
||||||
text: Cura.MachineManager.activeMachineName
|
text: Cura.MachineManager.activeMachineName
|
||||||
width: parent.width / 3
|
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
|
Item // Spacer
|
||||||
{
|
{
|
||||||
height: spacerHeight
|
height: spacerHeight
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue