Add (placeholder) head polygon controls and tweak layout

This commit is contained in:
fieldOfView 2016-08-02 09:53:30 +02:00
parent 5868a8bed3
commit 9a0e78ff46

View File

@ -40,115 +40,223 @@ Cura.MachineAction
Column Column
{ {
id: pageCheckboxes height: parent.height - y
height: childrenRect.height
anchors.left: parent.left
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
width: parent.width - UM.Theme.getSize("default_margin").width width: parent.width - UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Grid anchors.left: parent.left
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
Row
{ {
columns: 3 width: parent.width
columnSpacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").height
Label Column
{ {
text: catalog.i18nc("@label","X (Width)") width: parent.width / 2
} spacing: UM.Theme.getSize("default_margin").height
TextField
{ Label
id: buildAreaWidthField {
text: machineWidthProvider.properties.value text: catalog.i18nc("@label", "Printer Settings")
validator: RegExpValidator { regExp: /[0-9]{0,6}/ } font.bold: true
onEditingFinished: { machineWidthProvider.setPropertyValue("value", text); manager.forceUpdate() } }
}
Label Grid
{ {
text: catalog.i18nc("@label","mm") columns: 3
columnSpacing: UM.Theme.getSize("default_margin").width
Label
{
text: catalog.i18nc("@label","X (Width)")
}
TextField
{
id: buildAreaWidthField
text: machineWidthProvider.properties.value
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineWidthProvider.setPropertyValue("value", text); manager.forceUpdate() }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Label
{
text: catalog.i18nc("@label","Y (Depth)")
}
TextField
{
id: buildAreaDepthField
text: machineDepthProvider.properties.value
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineDepthProvider.setPropertyValue("value", text); manager.forceUpdate() }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Label
{
text: catalog.i18nc("@label","Z (Height)")
}
TextField
{
id: buildAreaHeightField
text: machineHeightProvider.properties.value
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineHeightProvider.setPropertyValue("value", text); manager.forceUpdate() }
}
Label
{
text: catalog.i18nc("@label","mm")
}
}
Column
{
CheckBox
{
id: heatedBedCheckBox
text: catalog.i18nc("@option:check","Heated Bed")
checked: String(machineHeatedBedProvider.properties.value).toLowerCase() != 'false'
onClicked: machineHeatedBedProvider.setPropertyValue("value", checked)
}
CheckBox
{
id: centerIsZeroCheckBox
text: catalog.i18nc("@option:check","Machine Center is Zero")
checked: String(machineCenterIsZeroProvider.properties.value).toLowerCase() != 'false'
onClicked: machineCenterIsZeroProvider.setPropertyValue("value", checked)
}
}
} }
Label Column
{ {
text: catalog.i18nc("@label","Y (Depth)") width: parent.width / 2
} spacing: UM.Theme.getSize("default_margin").height
TextField
{
id: buildAreaDepthField
text: machineDepthProvider.properties.value
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineDepthProvider.setPropertyValue("value", text); manager.forceUpdate() }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Label Label
{ {
text: catalog.i18nc("@label","Z (Height)") text: catalog.i18nc("@label", "Printhead Settings")
} font.bold: true
TextField }
{
id: buildAreaHeightField
text: machineHeightProvider.properties.value
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineHeightProvider.setPropertyValue("value", text); manager.forceUpdate() }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Item Grid
{ {
width: UM.Theme.getSize("default_margin").width columns: 3
height: UM.Theme.getSize("default_margin").height columnSpacing: UM.Theme.getSize("default_margin").width
}
Item
{
width: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("default_margin").height
}
Item
{
width: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("default_margin").height
}
Label Label
{ {
text: catalog.i18nc("@label","Nozzle size") text: catalog.i18nc("@label","X (Width)")
} }
TextField TextField
{ {
id: nozzleSizeField id: printheadXMinField
text: machineNozzleSizeProvider.properties.value text: ""
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ } validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { machineNozzleSizeProvider.setPropertyValue("value", text) } onEditingFinished: { }
} }
Label Label
{ {
text: catalog.i18nc("@label","mm") text: catalog.i18nc("@label","mm")
} }
}
Column Label
{ {
CheckBox text: catalog.i18nc("@label","X (Width)")
{ }
id: heatedBedCheckBox TextField
text: catalog.i18nc("@option:check","Heated Bed") {
checked: String(machineHeatedBedProvider.properties.value).toLowerCase() != 'false' id: printheadYMinField
onClicked: machineHeatedBedProvider.setPropertyValue("value", checked) text: ""
} validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
CheckBox onEditingFinished: { }
{ }
id: centerIsZeroCheckBox Label
text: catalog.i18nc("@option:check","Machine Center is Zero") {
checked: String(machineCenterIsZeroProvider.properties.value).toLowerCase() != 'false' text: catalog.i18nc("@label","mm")
onClicked: machineCenterIsZeroProvider.setPropertyValue("value", checked) }
Label
{
text: catalog.i18nc("@label","X (Width)")
}
TextField
{
id: printheadXMaxField
text: ""
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Label
{
text: catalog.i18nc("@label","X (Width)")
}
TextField
{
id: printheadYMaxField
text: ""
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
onEditingFinished: { }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Label
{
text: catalog.i18nc("@label","Gantry height")
}
TextField
{
id: gantryHeightField
text: gantryHeightProvider.properties.value
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
onEditingFinished: { gantryHeightProvider.setPropertyValue("value", text) }
}
Label
{
text: catalog.i18nc("@label","mm")
}
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
Label
{
text: catalog.i18nc("@label","Nozzle size")
}
TextField
{
id: nozzleSizeField
text: machineNozzleSizeProvider.properties.value
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
onEditingFinished: { machineNozzleSizeProvider.setPropertyValue("value", text) }
}
Label
{
text: catalog.i18nc("@label","mm")
}
}
} }
} }
@ -157,8 +265,10 @@ Cura.MachineAction
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
height: parent.height - y
Column Column
{ {
height: parent.height
width: parent.width / 2 width: parent.width / 2
Label Label
{ {
@ -168,6 +278,7 @@ Cura.MachineAction
{ {
id: machineStartGcodeField id: machineStartGcodeField
width: parent.width width: parent.width
height: parent.height - y
text: machineStartGcodeProvider.properties.value text: machineStartGcodeProvider.properties.value
onActiveFocusChanged: onActiveFocusChanged:
{ {
@ -178,7 +289,8 @@ Cura.MachineAction
} }
} }
} }
Column{ Column {
height: parent.height
width: parent.width / 2 width: parent.width / 2
Label Label
{ {
@ -188,6 +300,7 @@ Cura.MachineAction
{ {
id: machineEndGcodeField id: machineEndGcodeField
width: parent.width width: parent.width
height: parent.height - y
text: machineEndGcodeProvider.properties.value text: machineEndGcodeProvider.properties.value
onActiveFocusChanged: onActiveFocusChanged:
{ {
@ -232,16 +345,6 @@ Cura.MachineAction
storeIndex: 3 storeIndex: 3
} }
UM.SettingPropertyProvider
{
id: machineNozzleSizeProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "machine_nozzle_size"
watchedProperties: [ "value" ]
storeIndex: 3
}
UM.SettingPropertyProvider UM.SettingPropertyProvider
{ {
id: machineHeatedBedProvider id: machineHeatedBedProvider
@ -262,6 +365,26 @@ Cura.MachineAction
storeIndex: 3 storeIndex: 3
} }
UM.SettingPropertyProvider
{
id: machineNozzleSizeProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "machine_nozzle_size"
watchedProperties: [ "value" ]
storeIndex: 3
}
UM.SettingPropertyProvider
{
id: gantryHeightProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "gantry_height"
watchedProperties: [ "value" ]
storeIndex: 3
}
UM.SettingPropertyProvider UM.SettingPropertyProvider
{ {