mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 23:29:01 +08:00
Add tabs for extruder settings
This commit is contained in:
parent
940a60a4cb
commit
91bc023d2a
@ -12,6 +12,9 @@ import Cura 1.0 as Cura
|
|||||||
|
|
||||||
Cura.MachineAction
|
Cura.MachineAction
|
||||||
{
|
{
|
||||||
|
id: base
|
||||||
|
property var extrudersModel: Cura.ExtrudersModel{}
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -38,16 +41,26 @@ Cura.MachineAction
|
|||||||
text: catalog.i18nc("@label", "Please enter the correct settings for your printer below:")
|
text: catalog.i18nc("@label", "Please enter the correct settings for your printer below:")
|
||||||
}
|
}
|
||||||
|
|
||||||
Column
|
TabView
|
||||||
{
|
{
|
||||||
|
id: settingsTabs
|
||||||
height: parent.height - y
|
height: parent.height - y
|
||||||
width: parent.width - UM.Theme.getSize("default_margin").width
|
width: parent.width
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: pageDescription.bottom
|
anchors.top: pageDescription.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
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
|
Row
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -55,7 +68,7 @@ Cura.MachineAction
|
|||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width / 2)
|
width: settingsTabs.columnWidth
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -243,7 +256,7 @@ Cura.MachineAction
|
|||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: Math.floor(parent.width / 2)
|
width: settingsTabs.columnWidth
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -407,7 +420,7 @@ Cura.MachineAction
|
|||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: Math.floor(parent.width / 2)
|
width: settingsTabs.columnWidth
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Start Gcode")
|
text: catalog.i18nc("@label", "Start Gcode")
|
||||||
@ -431,7 +444,7 @@ Cura.MachineAction
|
|||||||
}
|
}
|
||||||
Column {
|
Column {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: Math.floor(parent.width / 2)
|
width: settingsTabs.columnWidth
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "End Gcode")
|
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)
|
function getHeadPolygonCoord(axis, minMax)
|
||||||
{
|
{
|
||||||
var polygon = JSON.parse(machineHeadPolygonProvider.properties.value);
|
var polygon = JSON.parse(machineHeadPolygonProvider.properties.value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user