mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-29 01:28:55 +08:00
48 lines
1.3 KiB
QML
48 lines
1.3 KiB
QML
// Copyright (c) 2022 Ultimaker B.V.
|
|
// Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
import QtQuick 2.7
|
|
|
|
import UM 1.5 as UM
|
|
import Cura 1.0 as Cura
|
|
|
|
|
|
RecommendedSettingSection
|
|
{
|
|
id: enableAdhesionRow
|
|
|
|
title: catalog.i18nc("@label", "Adhesion")
|
|
icon: UM.Theme.getIcon("Adhesion")
|
|
enableSectionVisible: platformAdhesionType.properties.enabled == "True"
|
|
enableSectionChecked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none"
|
|
enableSectionEnabled: recommendedPrintSetup.settingsEnabled
|
|
|
|
property var curaRecommendedMode: Cura.RecommendedMode {}
|
|
|
|
property UM.SettingPropertyProvider platformAdhesionType: UM.SettingPropertyProvider
|
|
{
|
|
containerStack: Cura.MachineManager.activeMachine
|
|
removeUnusedValue: false //Doesn't work with settings that are resolved.
|
|
key: "adhesion_type"
|
|
watchedProperties: [ "value", "resolve", "enabled" ]
|
|
storeIndex: 0
|
|
}
|
|
|
|
function onEnableSectionChanged(state) {
|
|
curaRecommendedMode.setAdhesion(state)
|
|
}
|
|
|
|
contents: RecommendedSettingItem
|
|
{
|
|
settingName: catalog.i18nc("@action:label", "Print with")
|
|
|
|
settingControl: Rectangle
|
|
{
|
|
width: 20
|
|
height: 20
|
|
color: Qt.rgba(1, 0, 0, .5)
|
|
}
|
|
}
|
|
|
|
}
|