Cura/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
Joey de l'Arago c356b9d46f Rename ExtruderSelectorBar -> SingleSettingExtruderSelectorBar to be inline with new single setting widgets.
Move common functionality into SingleSettingExtruderSelectorBar

Add adhesion settings

CURA-9793
2022-11-29 17:00:55 +01:00

83 lines
2.6 KiB
QML

// Copyright (c) 2022 UltiMaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import UM 1.5 as UM
import Cura 1.7 as Cura
RecommendedSettingSection
{
id: enableSupportRow
title: catalog.i18nc("@label", "Support")
icon: UM.Theme.getIcon("Support")
enableSectionVisible: supportEnabled.properties.enabled == "True"
enableSectionChecked: supportEnabled.properties.value == "True"
enableSectionEnabled: recommendedPrintSetup.settingsEnabled
toolTipText: catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing.")
function onEnableSectionChanged(state) {
supportEnabled.setPropertyValue("value", state)
}
property UM.SettingPropertyProvider supportEnabled: UM.SettingPropertyProvider
{
id: supportEnabled
containerStack: Cura.MachineManager.activeMachine
key: "support_enable"
watchedProperties: [ "value", "enabled", "description" ]
storeIndex: 0
}
property UM.SettingPropertyProvider supportExtruderNr: UM.SettingPropertyProvider
{
containerStack: Cura.MachineManager.activeMachine
key: "support_extruder_nr"
watchedProperties: [ "value" ]
storeIndex: 0
}
property UM.SettingPropertyProvider machineExtruderCount: UM.SettingPropertyProvider
{
containerStack: Cura.MachineManager.activeMachine
key: "machine_extruder_count"
watchedProperties: ["value"]
storeIndex: 0
}
contents: [
RecommendedSettingItem
{
settingName: catalog.i18nc("@action:label", "Support Type")
settingControl: Cura.SingleSettingComboBox
{
width: parent.width
height: UM.Theme.getSize("combobox").height
settingName: "support_structure"
}
},
RecommendedSettingItem
{
Layout.preferredHeight: childrenRect.height
settingName: catalog.i18nc("@action:label", "Print with")
settingControl: Cura.SingleSettingExtruderSelectorBar { extruderSettingName: "support_extruder_nr" }
},
RecommendedSettingItem
{
settingName: catalog.i18nc("@action:label", "Placement")
settingControl: Cura.SingleSettingComboBox
{
width: parent.width
height: UM.Theme.getSize("combobox").height
settingName: "support_type"
}
}
]
}