mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 09:14:24 +08:00

The setMachineSettingValue functionalities are now bound to whether the checkboxes are checked or not instead of onClicked. Also the wizard now saves the values, so the user cannot get confused when revisiting this part of the wizard. commits to #143 contributes to #CURA-256
98 lines
3.3 KiB
QML
98 lines
3.3 KiB
QML
// Copyright (c) 2015 Ultimaker B.V.
|
|
// Cura is released under the terms of the AGPLv3 or higher.
|
|
|
|
import QtQuick 2.2
|
|
import QtQuick.Controls 1.1
|
|
import QtQuick.Window 2.1
|
|
|
|
import UM 1.1 as UM
|
|
|
|
Item
|
|
{
|
|
id: wizardPage
|
|
property string title
|
|
|
|
SystemPalette{id: palette}
|
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
|
|
|
Component.onDestruction:
|
|
{
|
|
base.addOriginalProgress.upgrades[0] = extruderCheckBox.checked
|
|
base.addOriginalProgress.upgrades[1] = heatedBedCheckBox1.checked
|
|
base.addOriginalProgress.upgrades[2] = heatedBedCheckBox2.checked
|
|
if (extruderCheckBox.checked == true){
|
|
UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
|
}
|
|
if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){
|
|
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
|
}
|
|
}
|
|
Label
|
|
{
|
|
id: pageTitle
|
|
width: parent.width
|
|
text: catalog.i18nc("@title", "Select Upgraded Parts")
|
|
wrapMode: Text.WordWrap
|
|
font.pointSize: 18
|
|
}
|
|
Label
|
|
{
|
|
id: pageDescription
|
|
anchors.top: pageTitle.bottom
|
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
|
width: parent.width
|
|
wrapMode: Text.WordWrap
|
|
text: catalog.i18nc("@label","To assist you in having better default settings for your Ultimaker. Cura would like to know which upgrades you have in your machine:")
|
|
}
|
|
|
|
Item
|
|
{
|
|
id: pageCheckboxes
|
|
height: childrenRect.height
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
|
anchors.top: pageDescription.bottom
|
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
|
width: parent.width - UM.Theme.sizes.default_margin.width
|
|
CheckBox
|
|
{
|
|
id: extruderCheckBox
|
|
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
|
checked: base.addOriginalProgress.upgrades[0]
|
|
}
|
|
CheckBox
|
|
{
|
|
id: heatedBedCheckBox1
|
|
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
|
y: extruderCheckBox.height * 1
|
|
checked: base.addOriginalProgress.upgrades[1]
|
|
onClicked: {
|
|
if (heatedBedCheckBox2.checked == true)
|
|
heatedBedCheckBox2.checked = false
|
|
}
|
|
}
|
|
CheckBox
|
|
{
|
|
id: heatedBedCheckBox2
|
|
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
|
y: extruderCheckBox.height * 2
|
|
checked: base.addOriginalProgress.upgrades[2]
|
|
onClicked: {
|
|
if (heatedBedCheckBox1.checked == true)
|
|
heatedBedCheckBox1.checked = false
|
|
}
|
|
}
|
|
}
|
|
|
|
Label
|
|
{
|
|
width: parent.width
|
|
anchors.top: pageCheckboxes.bottom
|
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
|
wrapMode: Text.WordWrap
|
|
text: catalog.i18nc("@label","If you bought your Ultimaker after october 2012 you will have the Extruder drive upgrade. If you do not have this upgrade, it is highly recommended to improve reliability. This upgrade can be bought from the Ultimaker webshop or found on thingiverse as thing:26094");
|
|
}
|
|
|
|
ExclusiveGroup { id: printerGroup; }
|
|
}
|