mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
No longer inject parameters into function handling in qml
This commit is contained in:
parent
1df9ca55c8
commit
af712785c8
12 changed files with 36 additions and 39 deletions
|
@ -237,8 +237,8 @@ UM.Dialog
|
||||||
onTriggered: manager.addScriptToList(modelData.toString())
|
onTriggered: manager.addScriptToList(modelData.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectAdded: scriptsMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { scriptsMenu.insertItem(index, object)}
|
||||||
onObjectRemoved: scriptsMenu.removeItem(object)
|
onObjectRemoved: function(object) { scriptsMenu.removeItem(object) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ Cura.ExpandablePopup
|
||||||
|
|
||||||
property var extruderStack: activeMachine ? activeMachine.extruderList[model.index]: null
|
property var extruderStack: activeMachine ? activeMachine.extruderList[model.index]: null
|
||||||
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
|
property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack)
|
||||||
property bool valueError: activeMachine ? Cura.ContainerManager.getContainerMetaDataEntry(extruderStack.material.id, "compatible", "") != "True" : false
|
property bool valueError: activeMachine ? Cura.ContainerManager.getContainerMetaDataEntry(extruderStack.material.id, "compatible") != "True" : false
|
||||||
|
|
||||||
// Extruder icon. Shows extruder index and has the same color as the active material.
|
// Extruder icon. Shows extruder index and has the same color as the active material.
|
||||||
Cura.ExtruderIcon
|
Cura.ExtruderIcon
|
||||||
|
|
|
@ -202,7 +202,7 @@ Item
|
||||||
return paddedWidth - textWidth - UM.Theme.getSize("print_setup_big_item").height * 0.5 - UM.Theme.getSize("default_margin").width
|
return paddedWidth - textWidth - UM.Theme.getSize("print_setup_big_item").height * 0.5 - UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property string instructionLink: Cura.MachineManager.activeStack != null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "instruction_link", ""): ""
|
property string instructionLink: Cura.MachineManager.activeStack != null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "instruction_link"): ""
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ Item
|
||||||
{
|
{
|
||||||
id: materialSelection
|
id: materialSelection
|
||||||
|
|
||||||
property bool valueError: Cura.MachineManager.activeStack !== null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "compatible", "") !== "True" : true
|
property bool valueError: Cura.MachineManager.activeStack !== null ? Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeStack.material.id, "compatible") !== "True" : true
|
||||||
property bool valueWarning: !Cura.MachineManager.isActiveQualitySupported
|
property bool valueWarning: !Cura.MachineManager.isActiveQualitySupported
|
||||||
|
|
||||||
text: Cura.MachineManager.activeStack !== null ? Cura.MachineManager.activeStack.material.name : ""
|
text: Cura.MachineManager.activeStack !== null ? Cura.MachineManager.activeStack.material.name : ""
|
||||||
|
|
|
@ -45,8 +45,8 @@ Cura.Menu
|
||||||
shortcut: "Ctrl+" + (model.index + 1)
|
shortcut: "Ctrl+" + (model.index + 1)
|
||||||
}
|
}
|
||||||
// Add it to the fifth position (and above) as we want it to be added after the extruder header.
|
// Add it to the fifth position (and above) as we want it to be added after the extruder header.
|
||||||
onObjectAdded: base.insertItem(index + 5, object)
|
onObjectAdded: function(index, object) { base.insertItem(index + 5, object) }
|
||||||
onObjectRemoved: base.removeItem(object)
|
onObjectRemoved: function(object) { base.removeItem(object) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global actions
|
// Global actions
|
||||||
|
|
|
@ -53,12 +53,12 @@ Cura.Menu
|
||||||
sourceComponent: modelText.trim() == "" ? extensionsMenuSeparator : extensionsMenuItem
|
sourceComponent: modelText.trim() == "" ? extensionsMenuSeparator : extensionsMenuItem
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectAdded: sub_menu.insertItem(index, object.item)
|
onObjectAdded: function(index, object) { sub_menu.insertItem(index, object.item)}
|
||||||
onObjectRemoved: sub_menu.removeItem(object.item)
|
onObjectRemoved: function(object) { sub_menu.removeItem(object.item)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectAdded: extensionMenu.insertMenu(index, object)
|
onObjectAdded: function(index, object) { extensionMenu.insertMenu(index, object) }
|
||||||
onObjectRemoved: extensionMenu.removeMenu(object)
|
onObjectRemoved: function(object) { extensionMenu.removeMenu(object)}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,8 +66,8 @@ Cura.Menu
|
||||||
checked: model.root_material_id === materialMenu.currentRootMaterialId
|
checked: model.root_material_id === materialMenu.currentRootMaterialId
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
}
|
}
|
||||||
onObjectAdded: materialMenu.insertItem(index + 1, object)
|
onObjectAdded: function(index, object) { materialMenu.insertItem(index + 1, object) }
|
||||||
onObjectRemoved: materialMenu.removeItem(index)
|
onObjectRemoved: function(object) { materialMenu.removeItem(index) }
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator { visible: favoriteMaterialsModel.items.length > 0}
|
Cura.MenuSeparator { visible: favoriteMaterialsModel.items.length > 0}
|
||||||
|
@ -88,8 +88,8 @@ Cura.Menu
|
||||||
checked: model.root_material_id === materialMenu.currentRootMaterialId
|
checked: model.root_material_id === materialMenu.currentRootMaterialId
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
}
|
}
|
||||||
onObjectAdded: genericMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { genericMenu.insertItem(index, object)}
|
||||||
onObjectRemoved: genericMenu.removeItem(index)
|
onObjectRemoved: function(object) {genericMenu.removeItem(index) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,16 +127,16 @@ Cura.Menu
|
||||||
|
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
}
|
}
|
||||||
onObjectAdded: brandMaterialsMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { brandMaterialsMenu.insertItem(index, object)}
|
||||||
onObjectRemoved: brandMaterialsMenu.removeItem(object)
|
onObjectRemoved: function(object) {brandMaterialsMenu.removeItem(object)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onObjectAdded: brandMenu.insertMenu(index, object)
|
onObjectAdded: function(index, object) { brandMenu.insertMenu(index, object)}
|
||||||
onObjectRemoved: brandMenu.removeMenu(object)
|
onObjectRemoved: function(object) {brandMenu.removeMenu(object)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onObjectAdded: materialMenu.insertMenu(index + 4, object)
|
onObjectAdded: function(index, object) {materialMenu.insertMenu(index + 4, object)}
|
||||||
onObjectRemoved: materialMenu.removeMenu(object)
|
onObjectRemoved: function(object) { materialMenu.removeMenu(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
|
@ -49,8 +49,8 @@ Cura.Menu
|
||||||
onTriggered: Cura.MachineManager.setVariant(nozzleMenu.extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setVariant(nozzleMenu.extruderIndex, model.container_node)
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectAdded: nozzleMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { nozzleMenu.insertItem(index, object) }
|
||||||
onObjectRemoved: nozzleMenu.removeItem(object)
|
onObjectRemoved: function(object) {nozzleMenu.removeItem(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,8 +34,8 @@ Cura.Menu
|
||||||
}
|
}
|
||||||
shortcut: model.shortcut
|
shortcut: model.shortcut
|
||||||
}
|
}
|
||||||
onObjectAdded: openFilesMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { openFilesMenu.insertItem(index, object)}
|
||||||
|
|
||||||
onObjectRemoved: openFilesMenu.removeItem(object)
|
onObjectRemoved: function(object) { openFilesMenu.removeItem(object) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ Cura.Menu
|
||||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName
|
checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
onObjectAdded: menu.insertItem(2, object)
|
onObjectAdded: function(index, object) { menu.insertItem(2, object)}
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: function(object) { menu.removeItem(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator { visible: networKPrinterInstantiator.count > 0 }
|
Cura.MenuSeparator { visible: networKPrinterInstantiator.count > 0 }
|
||||||
|
@ -66,8 +66,8 @@ Cura.Menu
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
// A bit hackish, but we have 2 items at the end, put them before that
|
// A bit hackish, but we have 2 items at the end, put them before that
|
||||||
onObjectAdded: menu.insertItem(menu.count - 2, object)
|
onObjectAdded: function(index, object) { menu.insertItem(menu.count - 2, object) }
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: function(object) { menu.removeItem(object) }
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator { visible: localPrinterInstantiator.count > 0 }
|
Cura.MenuSeparator { visible: localPrinterInstantiator.count > 0 }
|
||||||
|
|
|
@ -43,8 +43,8 @@ Cura.Menu
|
||||||
shortcut: model.shortcut
|
shortcut: model.shortcut
|
||||||
enabled: saveProjectMenu.shouldBeVisible
|
enabled: saveProjectMenu.shouldBeVisible
|
||||||
}
|
}
|
||||||
onObjectAdded: saveProjectMenu.insertItem(index, object)
|
onObjectAdded: function(index, object) { saveProjectMenu.insertItem(index, object)}
|
||||||
onObjectRemoved: saveProjectMenu.removeItem(object)
|
onObjectRemoved: function(object) { saveProjectMenu.removeItem(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
WorkspaceSummaryDialog
|
WorkspaceSummaryDialog
|
||||||
|
|
|
@ -29,14 +29,11 @@ Cura.Menu
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: modelData.presetId == settingVisibilityPresetsModel.activePreset
|
checked: modelData.presetId == settingVisibilityPresetsModel.activePreset
|
||||||
ActionGroup.group: group
|
ActionGroup.group: group
|
||||||
onTriggered:
|
onTriggered: settingVisibilityPresetsModel.setActivePreset(modelData.presetId)
|
||||||
{
|
|
||||||
settingVisibilityPresetsModel.setActivePreset(modelData.presetId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onObjectAdded: menu.insertItem(index, object)
|
onObjectAdded: function(index, object) { menu.insertItem(index, object) }
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: function(object) { menu.removeItem(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator {}
|
Cura.MenuSeparator {}
|
||||||
|
|
|
@ -67,8 +67,8 @@ Cura.Menu
|
||||||
height: visible ? implicitHeight: 0
|
height: visible ? implicitHeight: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onObjectAdded: base.insertMenu(index, object)
|
onObjectAdded: function(index, object) { base.insertMenu(index, object) }
|
||||||
onObjectRemoved: base.removeMenu(object)
|
onObjectRemoved:function(object) { base.removeMenu(object)}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.MenuSeparator { }
|
Cura.MenuSeparator { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue