mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Rename ExtruderSelectorBar -> SingleSettingExtruderSelectorBar to be inline with new single setting widgets.
Move common functionality into SingleSettingExtruderSelectorBar Add adhesion settings CURA-9793
This commit is contained in:
parent
c240833868
commit
c356b9d46f
6 changed files with 79 additions and 75 deletions
|
@ -1,10 +1,11 @@
|
|||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Copyright (c) 2022 UltiMaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.7 as Cura
|
||||
|
||||
|
||||
RecommendedSettingSection
|
||||
|
@ -32,16 +33,12 @@ RecommendedSettingSection
|
|||
curaRecommendedMode.setAdhesion(state)
|
||||
}
|
||||
|
||||
contents: RecommendedSettingItem
|
||||
{
|
||||
settingName: catalog.i18nc("@action:label", "Print with")
|
||||
|
||||
settingControl: Rectangle
|
||||
contents: [
|
||||
RecommendedSettingItem
|
||||
{
|
||||
width: 20
|
||||
height: 20
|
||||
color: Qt.rgba(1, 0, 0, .5)
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
settingName: catalog.i18nc("@action:label", "Print with")
|
||||
settingControl: Cura.SingleSettingExtruderSelectorBar { extruderSettingName: "adhesion_extruder_nr" }
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Copyright (c) 2022 UltiMaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
|
@ -24,9 +24,6 @@ RecommendedSettingSection
|
|||
supportEnabled.setPropertyValue("value", state)
|
||||
}
|
||||
|
||||
property var extruderModel: CuraApplication.getExtrudersModel()
|
||||
|
||||
|
||||
property UM.SettingPropertyProvider supportEnabled: UM.SettingPropertyProvider
|
||||
{
|
||||
id: supportEnabled
|
||||
|
@ -68,19 +65,8 @@ RecommendedSettingSection
|
|||
{
|
||||
Layout.preferredHeight: childrenRect.height
|
||||
settingName: catalog.i18nc("@action:label", "Print with")
|
||||
settingControl: Cura.ExtruderSelectorBar
|
||||
{
|
||||
model: extruderModel
|
||||
selectedIndex: supportExtruderNr.properties.value !== undefined ? supportExtruderNr.properties.value : 0
|
||||
function onClickExtruder(index)
|
||||
{
|
||||
forceActiveFocus();
|
||||
supportExtruderNr.setPropertyValue("value", index);
|
||||
}
|
||||
}
|
||||
|
||||
settingControl: Cura.SingleSettingExtruderSelectorBar { extruderSettingName: "support_extruder_nr" }
|
||||
},
|
||||
|
||||
RecommendedSettingItem
|
||||
{
|
||||
settingName: catalog.i18nc("@action:label", "Placement")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue