mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 06:19:02 +08:00
parent
831419d110
commit
968d72863e
@ -7,6 +7,8 @@ import QtQuick.Layouts 1.1
|
|||||||
import QtQuick.Window 2.1
|
import QtQuick.Window 2.1
|
||||||
|
|
||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
import Cura 1.0 as Cura
|
||||||
|
import ".."
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -15,11 +17,22 @@ Item
|
|||||||
property bool three_point_leveling: true
|
property bool three_point_leveling: true
|
||||||
property int platform_width: UM.MachineManager.getSettingValue("machine_width")
|
property int platform_width: UM.MachineManager.getSettingValue("machine_width")
|
||||||
property int platform_height: UM.MachineManager.getSettingValue("machine_depth")
|
property int platform_height: UM.MachineManager.getSettingValue("machine_depth")
|
||||||
property bool alreadyTested: base.addOriginalProgress.bedLeveling
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||||
Component.onCompleted: printer_connection.homeHead()
|
Component.onCompleted: printer_connection.homeHead()
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
property variant wizard: null;
|
||||||
|
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: wizardPage.wizard
|
||||||
|
onNextClicked: //You can add functions here that get triggered when the final button is clicked in the wizard-element
|
||||||
|
{
|
||||||
|
if(wizardPage.wizard.lastPage == true){
|
||||||
|
wizardPage.wizard.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@ -61,7 +74,6 @@ Item
|
|||||||
id: bedlevelingButton
|
id: bedlevelingButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
enabled: !alreadyTested
|
|
||||||
text: catalog.i18nc("@action:button","Move to Next Position");
|
text: catalog.i18nc("@action:button","Move to Next Position");
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
@ -79,7 +91,6 @@ Item
|
|||||||
}
|
}
|
||||||
wizardPage.leveling_state++
|
wizardPage.leveling_state++
|
||||||
if (wizardPage.leveling_state >= 3){
|
if (wizardPage.leveling_state >= 3){
|
||||||
base.addOriginalProgress.bedLeveling = true
|
|
||||||
resultText.visible = true
|
resultText.visible = true
|
||||||
skipBedlevelingButton.enabled = false
|
skipBedlevelingButton.enabled = false
|
||||||
bedlevelingButton.enabled = false
|
bedlevelingButton.enabled = false
|
||||||
@ -91,7 +102,6 @@ Item
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
id: skipBedlevelingButton
|
id: skipBedlevelingButton
|
||||||
enabled: !alreadyTested
|
|
||||||
anchors.top: parent.width < wizardPage.width ? parent.top : bedlevelingButton.bottom
|
anchors.top: parent.width < wizardPage.width ? parent.top : bedlevelingButton.bottom
|
||||||
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
|
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
|
||||||
anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left
|
anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left
|
||||||
@ -104,7 +114,7 @@ Item
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: resultText
|
id: resultText
|
||||||
visible: alreadyTested
|
visible: false
|
||||||
anchors.top: bedlevelingWrapper.bottom
|
anchors.top: bedlevelingWrapper.bottom
|
||||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -17,11 +17,8 @@ Item
|
|||||||
|
|
||||||
Component.onDestruction:
|
Component.onDestruction:
|
||||||
{
|
{
|
||||||
base.addOriginalProgress.upgrades[0] = extruderCheckBox.checked
|
|
||||||
base.addOriginalProgress.upgrades[1] = heatedBedCheckBox1.checked
|
|
||||||
base.addOriginalProgress.upgrades[2] = heatedBedCheckBox2.checked
|
|
||||||
if (extruderCheckBox.checked == true){
|
if (extruderCheckBox.checked == true){
|
||||||
UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true)
|
||||||
}
|
}
|
||||||
if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){
|
if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){
|
||||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||||
@ -58,14 +55,14 @@ Item
|
|||||||
{
|
{
|
||||||
id: extruderCheckBox
|
id: extruderCheckBox
|
||||||
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
||||||
checked: base.addOriginalProgress.upgrades[0]
|
checked: true
|
||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
id: heatedBedCheckBox1
|
id: heatedBedCheckBox1
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
text: catalog.i18nc("@option:check","Heated printer bed")
|
||||||
y: extruderCheckBox.height * 1
|
y: extruderCheckBox.height * 1
|
||||||
checked: base.addOriginalProgress.upgrades[1]
|
checked: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (heatedBedCheckBox2.checked == true)
|
if (heatedBedCheckBox2.checked == true)
|
||||||
heatedBedCheckBox2.checked = false
|
heatedBedCheckBox2.checked = false
|
||||||
@ -76,7 +73,7 @@ Item
|
|||||||
id: heatedBedCheckBox2
|
id: heatedBedCheckBox2
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
||||||
y: extruderCheckBox.height * 2
|
y: extruderCheckBox.height * 2
|
||||||
checked: base.addOriginalProgress.upgrades[2]
|
checked: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (heatedBedCheckBox1.checked == true)
|
if (heatedBedCheckBox1.checked == true)
|
||||||
heatedBedCheckBox1.checked = false
|
heatedBedCheckBox1.checked = false
|
||||||
|
@ -14,35 +14,40 @@ Item
|
|||||||
property int leftRow: wizardPage.width*0.40
|
property int leftRow: wizardPage.width*0.40
|
||||||
property int rightRow: wizardPage.width*0.60
|
property int rightRow: wizardPage.width*0.60
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
property bool alreadyTested: base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length-1]
|
|
||||||
property bool x_min_pressed: false
|
property bool x_min_pressed: false
|
||||||
property bool y_min_pressed: false
|
property bool y_min_pressed: false
|
||||||
property bool z_min_pressed: false
|
property bool z_min_pressed: false
|
||||||
property bool heater_works: false
|
property bool heater_works: false
|
||||||
property int extruder_target_temp: 0
|
property int extruder_target_temp: 0
|
||||||
property int bed_target_temp: 0
|
property int bed_target_temp: 0
|
||||||
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
property var checkupProgress: {
|
||||||
|
"connection": false,
|
||||||
|
"endstopX": wizardPage.x_min_pressed,
|
||||||
|
"endstopY": wizardPage.y_min_pressed,
|
||||||
|
"endstopZ": wizardPage.z_min_pressed,
|
||||||
|
"nozzleTemp": false,
|
||||||
|
"bedTemp": false
|
||||||
|
}
|
||||||
|
|
||||||
property variant printer_connection: {
|
property variant printer_connection: {
|
||||||
if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
||||||
base.addOriginalProgress.checkUp[0] = true
|
wizardPage.checkupProgress.connection = true
|
||||||
checkTotalCheckUp()
|
|
||||||
return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
|
||||||
|
|
||||||
function checkTotalCheckUp(){
|
function checkTotalCheckUp(){
|
||||||
var allDone = true
|
var allDone = true
|
||||||
for (var i = 0; i < (base.addOriginalProgress.checkUp.length - 1); i++){
|
for(var property in checkupProgress){
|
||||||
if (base.addOriginalProgress.checkUp[i] == false){
|
if (checkupProgress[property] == false){
|
||||||
allDone = false
|
allDone = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (allDone == true){
|
if (allDone == true){
|
||||||
base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length] = true
|
|
||||||
skipCheckButton.enabled = false
|
skipCheckButton.enabled = false
|
||||||
resultText.visible = true
|
resultText.visible = true
|
||||||
}
|
}
|
||||||
@ -91,7 +96,7 @@ Item
|
|||||||
id: startCheckButton
|
id: startCheckButton
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
enabled: !alreadyTested
|
//enabled: !alreadyTested
|
||||||
text: catalog.i18nc("@action:button","Start Printer Check");
|
text: catalog.i18nc("@action:button","Start Printer Check");
|
||||||
onClicked: {
|
onClicked: {
|
||||||
checkupContent.visible = true
|
checkupContent.visible = true
|
||||||
@ -107,7 +112,7 @@ Item
|
|||||||
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
|
anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
|
||||||
anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left
|
anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left
|
||||||
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
|
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
|
||||||
enabled: !alreadyTested
|
//enabled: !alreadyTested
|
||||||
text: catalog.i18nc("@action:button","Skip Printer Check");
|
text: catalog.i18nc("@action:button","Skip Printer Check");
|
||||||
onClicked: {
|
onClicked: {
|
||||||
base.currentPage += 1
|
base.currentPage += 1
|
||||||
@ -119,7 +124,7 @@ Item
|
|||||||
id: checkupContent
|
id: checkupContent
|
||||||
anchors.top: startStopButtons.bottom
|
anchors.top: startStopButtons.bottom
|
||||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
visible: alreadyTested
|
visible: false
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@ -156,7 +161,7 @@ Item
|
|||||||
anchors.left: endstopXLabel.right
|
anchors.left: endstopXLabel.right
|
||||||
anchors.top: connectionLabel.bottom
|
anchors.top: connectionLabel.bottom
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: x_min_pressed || base.addOriginalProgress.checkUp[1] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
text: x_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
Label
|
Label
|
||||||
@ -175,7 +180,7 @@ Item
|
|||||||
anchors.left: endstopYLabel.right
|
anchors.left: endstopYLabel.right
|
||||||
anchors.top: endstopXLabel.bottom
|
anchors.top: endstopXLabel.bottom
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: y_min_pressed || base.addOriginalProgress.checkUp[2] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
text: y_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
||||||
}
|
}
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
Label
|
Label
|
||||||
@ -194,7 +199,7 @@ Item
|
|||||||
anchors.left: endstopZLabel.right
|
anchors.left: endstopZLabel.right
|
||||||
anchors.top: endstopYLabel.bottom
|
anchors.top: endstopYLabel.bottom
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: z_min_pressed || base.addOriginalProgress.checkUp[3] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
text: z_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked")
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Label
|
Label
|
||||||
@ -233,14 +238,9 @@ Item
|
|||||||
{
|
{
|
||||||
if(printer_connection != null)
|
if(printer_connection != null)
|
||||||
{
|
{
|
||||||
if (alreadyTested){
|
nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
||||||
nozzleTempStatus.text = catalog.i18nc("@info:status","Works")
|
printer_connection.heatupNozzle(190)
|
||||||
}
|
wizardPage.extruder_target_temp = 190
|
||||||
else {
|
|
||||||
nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
|
||||||
printer_connection.heatupNozzle(190)
|
|
||||||
wizardPage.extruder_target_temp = 190
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,14 +294,9 @@ Item
|
|||||||
{
|
{
|
||||||
if(printer_connection != null)
|
if(printer_connection != null)
|
||||||
{
|
{
|
||||||
if (alreadyTested){
|
bedTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
||||||
bedTempStatus.text = catalog.i18nc("@info:status","Works")
|
printer_connection.heatupBed(60)
|
||||||
}
|
wizardPage.bed_target_temp = 60
|
||||||
else {
|
|
||||||
bedTempStatus.text = catalog.i18nc("@info:progress","Checking")
|
|
||||||
printer_connection.heatupBed(60)
|
|
||||||
wizardPage.bed_target_temp = 60
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,7 +315,7 @@ Item
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: resultText
|
id: resultText
|
||||||
visible: base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length-1]
|
visible: false
|
||||||
anchors.top: bedTemp.bottom
|
anchors.top: bedTemp.bottom
|
||||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@ -338,19 +333,16 @@ Item
|
|||||||
{
|
{
|
||||||
if(key == "x_min")
|
if(key == "x_min")
|
||||||
{
|
{
|
||||||
base.addOriginalProgress.checkUp[1] = true
|
|
||||||
x_min_pressed = true
|
x_min_pressed = true
|
||||||
checkTotalCheckUp()
|
checkTotalCheckUp()
|
||||||
}
|
}
|
||||||
if(key == "y_min")
|
if(key == "y_min")
|
||||||
{
|
{
|
||||||
base.addOriginalProgress.checkUp[2] = true
|
|
||||||
y_min_pressed = true
|
y_min_pressed = true
|
||||||
checkTotalCheckUp()
|
checkTotalCheckUp()
|
||||||
}
|
}
|
||||||
if(key == "z_min")
|
if(key == "z_min")
|
||||||
{
|
{
|
||||||
base.addOriginalProgress.checkUp[3] = true
|
|
||||||
z_min_pressed = true
|
z_min_pressed = true
|
||||||
checkTotalCheckUp()
|
checkTotalCheckUp()
|
||||||
}
|
}
|
||||||
@ -363,7 +355,7 @@ Item
|
|||||||
if(printer_connection != null)
|
if(printer_connection != null)
|
||||||
{
|
{
|
||||||
nozzleTempStatus.text = catalog.i18nc("@info:status","Works")
|
nozzleTempStatus.text = catalog.i18nc("@info:status","Works")
|
||||||
base.addOriginalProgress.checkUp[4] = true
|
wizardPage.checkupProgress.nozzleTemp = true
|
||||||
checkTotalCheckUp()
|
checkTotalCheckUp()
|
||||||
printer_connection.heatupNozzle(0)
|
printer_connection.heatupNozzle(0)
|
||||||
}
|
}
|
||||||
@ -374,7 +366,7 @@ Item
|
|||||||
if(printer_connection.bedTemperature > wizardPage.bed_target_temp - 5 && printer_connection.bedTemperature < wizardPage.bed_target_temp + 5)
|
if(printer_connection.bedTemperature > wizardPage.bed_target_temp - 5 && printer_connection.bedTemperature < wizardPage.bed_target_temp + 5)
|
||||||
{
|
{
|
||||||
bedTempStatus.text = catalog.i18nc("@info:status","Works")
|
bedTempStatus.text = catalog.i18nc("@info:status","Works")
|
||||||
base.addOriginalProgress.checkUp[5] = true
|
wizardPage.checkupProgress.bedTemp = true
|
||||||
checkTotalCheckUp()
|
checkTotalCheckUp()
|
||||||
printer_connection.heatupBed(0)
|
printer_connection.heatupBed(0)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user