Add tabs for extruder settings

This commit is contained in:
fieldOfView 2017-03-26 19:39:36 +02:00
parent 940a60a4cb
commit 91bc023d2a

View File

@ -12,6 +12,9 @@ import Cura 1.0 as Cura
Cura.MachineAction
{
id: base
property var extrudersModel: Cura.ExtrudersModel{}
anchors.fill: parent;
Item
{
@ -38,16 +41,26 @@ Cura.MachineAction
text: catalog.i18nc("@label", "Please enter the correct settings for your printer below:")
}
Column
TabView
{
id: settingsTabs
height: parent.height - y
width: parent.width - UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").height
width: parent.width
anchors.left: parent.left
anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
property real columnWidth: Math.floor((width - 3 * UM.Theme.getSize("default_margin").width) / 2)
Tab
{
title: catalog.i18nc("@title:tab", "Printer");
anchors.margins: UM.Theme.getSize("default_margin").width
Column
{
spacing: UM.Theme.getSize("default_margin").height
Row
{
width: parent.width
@ -55,7 +68,7 @@ Cura.MachineAction
Column
{
width: Math.floor(parent.width / 2)
width: settingsTabs.columnWidth
spacing: UM.Theme.getSize("default_margin").height
Label
@ -243,7 +256,7 @@ Cura.MachineAction
Column
{
width: Math.floor(parent.width / 2)
width: settingsTabs.columnWidth
spacing: UM.Theme.getSize("default_margin").height
Label
@ -407,7 +420,7 @@ Cura.MachineAction
Column
{
height: parent.height
width: Math.floor(parent.width / 2)
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "Start Gcode")
@ -431,7 +444,7 @@ Cura.MachineAction
}
Column {
height: parent.height
width: Math.floor(parent.width / 2)
width: settingsTabs.columnWidth
Label
{
text: catalog.i18nc("@label", "End Gcode")
@ -457,6 +470,19 @@ Cura.MachineAction
}
}
Repeater
{
model: (machineExtruderCountProvider.properties.value > 1) ? base.extrudersModel : 0
Tab
{
title: model.name
anchors.margins: UM.Theme.getSize("default_margin").width
}
}
}
}
function getHeadPolygonCoord(axis, minMax)
{
var polygon = JSON.parse(machineHeadPolygonProvider.properties.value);