mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Add a selector for the intent profile
CURA-6534
This commit is contained in:
parent
2d8c19203e
commit
35ec70a3cf
5 changed files with 95 additions and 4 deletions
44
resources/qml/Menus/IntentMenu.qml
Normal file
44
resources/qml/Menus/IntentMenu.qml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
Menu
|
||||
{
|
||||
id: menu
|
||||
title: "Intent"
|
||||
|
||||
property int extruderIndex: 0
|
||||
|
||||
Cura.IntentModel
|
||||
{
|
||||
id: intentModel
|
||||
}
|
||||
|
||||
Instantiator
|
||||
{
|
||||
model: intentModel
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: false
|
||||
Binding on checked
|
||||
{
|
||||
when: Cura.MachineManager.activeStack != null
|
||||
value: Cura.MachineManager.activeStack.intent == model.container
|
||||
}
|
||||
exclusiveGroup: group
|
||||
onTriggered: Cura.MachineManager.activeStack.intent = model.container
|
||||
}
|
||||
|
||||
onObjectAdded: menu.insertItem(index, object)
|
||||
onObjectRemoved: menu.removeItem(object)
|
||||
}
|
||||
ExclusiveGroup { id: group }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue