Allow setting build plate shape

This commit is contained in:
fieldOfView 2016-09-05 10:50:48 +02:00
parent a8547ed8be
commit b9280fef12
2 changed files with 50 additions and 5 deletions

View File

@ -120,12 +120,25 @@ Cura.MachineAction
Column Column
{ {
CheckBox Row
{ {
id: heatedBedCheckBox spacing: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@option:check", "Heated Bed")
checked: String(machineHeatedBedProvider.properties.value).toLowerCase() != 'false' Label
onClicked: machineHeatedBedProvider.setPropertyValue("value", checked) {
text: catalog.i18nc("@label", "Build Plate Shape")
}
ComboBox
{
model: ["Rectangular", "Elliptic"]
currentIndex: machineShapeProvider.properties.value.toLowerCase() != model[1].toLowerCase() ? 0 : 1
onActivated:
{
machineShapeProvider.setPropertyValue("value", model[index]);
manager.forceUpdate();
}
}
} }
CheckBox CheckBox
{ {
@ -134,6 +147,13 @@ Cura.MachineAction
checked: String(machineCenterIsZeroProvider.properties.value).toLowerCase() != 'false' checked: String(machineCenterIsZeroProvider.properties.value).toLowerCase() != 'false'
onClicked: machineCenterIsZeroProvider.setPropertyValue("value", checked) onClicked: machineCenterIsZeroProvider.setPropertyValue("value", checked)
} }
CheckBox
{
id: heatedBedCheckBox
text: catalog.i18nc("@option:check", "Heated Bed")
checked: String(machineHeatedBedProvider.properties.value).toLowerCase() != 'false'
onClicked: machineHeatedBedProvider.setPropertyValue("value", checked)
}
} }
Row Row
@ -428,6 +448,16 @@ Cura.MachineAction
storeIndex: manager.containerIndex storeIndex: manager.containerIndex
} }
UM.SettingPropertyProvider
{
id: machineShapeProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "machine_shape"
watchedProperties: [ "value" ]
storeIndex: manager.containerIndex
}
UM.SettingPropertyProvider UM.SettingPropertyProvider
{ {
id: machineHeatedBedProvider id: machineHeatedBedProvider

View File

@ -137,6 +137,21 @@
"settable_per_extruder": false, "settable_per_extruder": false,
"settable_per_meshgroup": false "settable_per_meshgroup": false
}, },
"machine_shape":
{
"label": "Build plate shape",
"description": "The shape of the build plate without taking unprintable areas into account.",
"default_value": "Rectangular",
"type": "enum",
"options":
{
"rectangular": "Rectangular",
"elliptic": "Elliptic"
},
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"machine_height": "machine_height":
{ {
"label": "Machine height", "label": "Machine height",