mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
Display list of custom quality profiles
If you activate any of them from here though, it'll crash. Contributes to issue CURA-6598.
This commit is contained in:
parent
9a5d45282a
commit
2d0a122c2d
1 changed files with 64 additions and 2 deletions
|
@ -106,9 +106,9 @@ Popup
|
||||||
if(Cura.MachineManager.hasCustomQuality)
|
if(Cura.MachineManager.hasCustomQuality)
|
||||||
{
|
{
|
||||||
// When user created profile is active, no quality tickbox should be active.
|
// When user created profile is active, no quality tickbox should be active.
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
return Cura.MachineManager.activeQualityType == model.quality_type && Cura.MachineManager.activeIntentCategory == model.intent_category
|
return Cura.MachineManager.activeQualityType == model.quality_type && Cura.MachineManager.activeIntentCategory == model.intent_category;
|
||||||
}
|
}
|
||||||
ButtonGroup.group: buttonGroup
|
ButtonGroup.group: buttonGroup
|
||||||
|
|
||||||
|
@ -118,6 +118,68 @@ Popup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Another "intent category" for custom profiles.
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
height: childrenRect.height
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: customProfileHeader
|
||||||
|
text: catalog.i18nc("@label:header", "Custom profiles")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
height: visible ? contentHeight: 0
|
||||||
|
enabled: false
|
||||||
|
visible: profilesList.visibleChildren.length > 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
}
|
||||||
|
|
||||||
|
Column
|
||||||
|
{
|
||||||
|
id: profilesList
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
top: customProfileHeader.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
//We set it by means of a binding, since then we can use the
|
||||||
|
//"when" condition, which we need to prevent a binding loop.
|
||||||
|
Binding
|
||||||
|
{
|
||||||
|
target: parent
|
||||||
|
property: "height"
|
||||||
|
value: parent.childrenRect.height
|
||||||
|
when: parent.visibleChildren.length > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add all the custom profiles.
|
||||||
|
Repeater
|
||||||
|
{
|
||||||
|
visible: false
|
||||||
|
model: Cura.CustomQualityProfilesDropDownMenuModel
|
||||||
|
MenuButton
|
||||||
|
{
|
||||||
|
onClicked: Cura.MachineManager.setQualityChangesGroup(model.quality_changes_group)
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
checkable: true
|
||||||
|
visible: model.available
|
||||||
|
text: model.name + " - " + model.layer_height + " mm"
|
||||||
|
checked: Cura.MachineManager.activeQualityChangesGroup == model.quality_changes_group
|
||||||
|
ButtonGroup.group: buttonGroup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
height: 1
|
height: 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue