mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Allow plugins to add additional components to Machines detail pane
CURA-2276
This commit is contained in:
parent
244332a807
commit
55c0095b30
1 changed files with 33 additions and 1 deletions
|
@ -122,13 +122,16 @@ UM.ManagementPage
|
|||
|
||||
Row
|
||||
{
|
||||
id: machineInfo
|
||||
|
||||
anchors.top: machineActions.visible ? machineActions.bottom : machineActions.anchors.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
visible: base.currentItem
|
||||
|
||||
Label
|
||||
{
|
||||
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.ConfirmRemoveDialog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue