mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-08 14:39:01 +08:00
54 lines
1.4 KiB
QML
54 lines
1.4 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.Layouts 1.1
|
|
import QtQuick.Window 2.1
|
|
|
|
import UM 1.0 as UM
|
|
|
|
Column
|
|
{
|
|
id: wizardPage
|
|
property int leveling_state: 0
|
|
property bool three_point_leveling: true
|
|
property int platform_width: UM.Models.settingsModel.getMachineSetting("machine_width")
|
|
property int platform_height: UM.Models.settingsModel.getMachineSetting("machine_depth")
|
|
anchors.fill: parent;
|
|
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
|
Component.onCompleted: printer_connection.homeHead()
|
|
Label
|
|
{
|
|
text: ""
|
|
//Component.onCompleted:console.log(UM.Models.settingsModel.getMachineSetting("machine_width"))
|
|
}
|
|
Button
|
|
{
|
|
text: "Move to next position"
|
|
onClicked:
|
|
{
|
|
if(wizardPage.leveling_state == 0)
|
|
{
|
|
printer_connection.moveHead(platform_width /2 , platform_height,0)
|
|
}
|
|
if(wizardPage.leveling_state == 1)
|
|
{
|
|
printer_connection.moveHead(platform_width , 0,0)
|
|
}
|
|
if(wizardPage.leveling_state == 2)
|
|
{
|
|
printer_connection.moveHead(0, 0 ,0)
|
|
}
|
|
|
|
wizardPage.leveling_state++
|
|
|
|
}
|
|
}
|
|
|
|
function threePointLeveling(width, height)
|
|
{
|
|
}
|
|
|
|
|
|
} |