mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Update the settings menu to controls 2
CURA-8683
This commit is contained in:
parent
770f6f94c9
commit
2bad5c5cd3
8 changed files with 121 additions and 140 deletions
|
@ -2,9 +2,9 @@
|
|||
//Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Menu
|
||||
|
@ -23,11 +23,16 @@ Menu
|
|||
{
|
||||
title: modelData.name
|
||||
property var extruder: (base.activeMachine === null) ? null : activeMachine.extruderList[model.index]
|
||||
NozzleMenu { title: Cura.MachineManager.activeDefinitionVariantsName; visible: Cura.MachineManager.activeMachine.hasVariants; extruderIndex: index }
|
||||
NozzleMenu
|
||||
{
|
||||
title: Cura.MachineManager.activeDefinitionVariantsName
|
||||
shouldBeVisible: activeMachine.hasVariants
|
||||
extruderIndex: index
|
||||
}
|
||||
MaterialMenu
|
||||
{
|
||||
title: catalog.i18nc("@title:menu", "&Material")
|
||||
visible: Cura.MachineManager.activeMachine.hasMaterials
|
||||
shouldBeVisible: activeMachine.hasMaterials
|
||||
extruderIndex: index
|
||||
updateModels: false
|
||||
onAboutToShow: updateModels = true
|
||||
|
@ -39,33 +44,34 @@ Menu
|
|||
visible: Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasMaterials
|
||||
}
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Set as Active Extruder")
|
||||
onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index)
|
||||
}
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Enable Extruder")
|
||||
onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, true)
|
||||
visible: (extruder === null || extruder === undefined) ? false : !extruder.isEnabled
|
||||
height: visible ? implicitHeight: 0
|
||||
}
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
text: catalog.i18nc("@action:inmenu", "Disable Extruder")
|
||||
onTriggered: Cura.MachineManager.setExtruderEnabled(index, false)
|
||||
visible: (extruder === null || extruder === undefined) ? false : extruder.isEnabled
|
||||
enabled: Cura.MachineManager.numberExtrudersEnabled > 1
|
||||
height: visible ? implicitHeight: 0
|
||||
}
|
||||
|
||||
}
|
||||
onObjectAdded: base.insertItem(index, object)
|
||||
onObjectRemoved: base.removeItem(object)
|
||||
onObjectAdded: base.insertMenu(index, object)
|
||||
onObjectRemoved: base.removeMenu(object)
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: Cura.Actions.configureSettingVisibility }
|
||||
UM.MenuItem { action: Cura.Actions.configureSettingVisibility }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue