From 6c6ccb16b8f139a90347a9807c36d3353ed778c0 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 18 Mar 2019 12:02:25 +0100 Subject: [PATCH] WIP: Add X/Y min/max fields --- resources/qml/WelcomePages/TestContent.qml | 84 +++++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/resources/qml/WelcomePages/TestContent.qml b/resources/qml/WelcomePages/TestContent.qml index 193a1090e3..6db019785e 100644 --- a/resources/qml/WelcomePages/TestContent.qml +++ b/resources/qml/WelcomePages/TestContent.qml @@ -19,15 +19,24 @@ Row id: base UM.I18nCatalog { id: catalog; name: "cura" } - property int labelWidth: 100 + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: UM.Theme.getSize("default_margin").width + + property int labelWidth: 110 property var labelFont: UM.Theme.getFont("medium") + spacing: 10 + + // ======================================= // Left-side column for "Printer Settings" + // ======================================= Column { spacing: 10 - Label + Label // Title Label { text: catalog.i18nc("@title:label", "Printer Settings") font: UM.Theme.getFont("medium_bold") @@ -119,18 +128,87 @@ Row } } + // ======================================= // Right-side column for "Printhead Settings" + // ======================================= Column { spacing: 10 - Label + Label // Title Label { text: catalog.i18nc("@title:label", "Printhead Settings") font: UM.Theme.getFont("medium_bold") } + PrintHeadMinMaxTextField // "X min" + { + id: machineXMinField + settingStoreIndex: 1 // TODO + labelText: catalog.i18nc("@label", "X min") + labelFont: base.labelFont + labelWidth: base.labelWidth + unitText: catalog.i18nc("@label", "mm") + + axisName: "x" + axisMinOrMax: "min" + + // TODO: add forceUpdateOnChangeFunction: + } + + PrintHeadMinMaxTextField // "Y min" + { + id: machineYMinField + + settingStoreIndex: 1 // TODO + + labelText: catalog.i18nc("@label", "Y min") + labelFont: base.labelFont + labelWidth: base.labelWidth + unitText: catalog.i18nc("@label", "mm") + + axisName: "y" + axisMinOrMax: "min" + + // TODO: add forceUpdateOnChangeFunction: + } + + PrintHeadMinMaxTextField // "X max" + { + id: machineXMaxField + + settingStoreIndex: 1 // TODO + + labelText: catalog.i18nc("@label", "X max") + labelFont: base.labelFont + labelWidth: base.labelWidth + unitText: catalog.i18nc("@label", "mm") + + axisName: "x" + axisMinOrMax: "max" + + // TODO: add forceUpdateOnChangeFunction: + } + + PrintHeadMinMaxTextField // "Y max" + { + id: machineYMaxField + + containerStackId: Cura.MachineManager.activeMachineId + settingKey: "machine_head_with_fans_polygon" + settingStoreIndex: 1 // TODO + + labelText: catalog.i18nc("@label", "Y max") + labelFont: base.labelFont + labelWidth: base.labelWidth + unitText: catalog.i18nc("@label", "mm") + + axisName: "y" + axisMinOrMax: "max" + + // TODO: add forceUpdateOnChangeFunction: + } } }