mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:19:05 +08:00
Allow plugins to add additional components to Machines detail pane
CURA-2276
This commit is contained in:
parent
244332a807
commit
55c0095b30
@ -122,13 +122,16 @@ UM.ManagementPage
|
|||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
|
id: machineInfo
|
||||||
|
|
||||||
anchors.top: machineActions.visible ? machineActions.bottom : machineActions.anchors.top
|
anchors.top: machineActions.visible ? machineActions.bottom : machineActions.anchors.top
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
|
visible: base.currentItem
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Type")
|
text: catalog.i18nc("@label", "Type")
|
||||||
@ -139,6 +142,35 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: additionalComponentsColumn
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: machineInfo.visible ? machineInfo.bottom : machineInfo.anchors.top
|
||||||
|
anchors.topMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
for (var component in Printer.additionalComponents["machinesDetailPane"]) {
|
||||||
|
Printer.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Printer
|
||||||
|
onAdditionalComponentsChanged:
|
||||||
|
{
|
||||||
|
if(areaId == "machinesDetailPane") {
|
||||||
|
for (var component in Printer.additionalComponents["machinesDetailPane"]) {
|
||||||
|
Printer.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "uranium"; }
|
UM.I18nCatalog { id: catalog; name: "uranium"; }
|
||||||
|
|
||||||
UM.ConfirmRemoveDialog
|
UM.ConfirmRemoveDialog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user