mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-30 10:05:42 +08:00
Merge branch '4.0' of github.com:Ultimaker/Cura into 4.0
This commit is contained in:
commit
9814deaeab
@ -13,8 +13,40 @@ Item {
|
|||||||
property string activeQualityDefinitionId: Cura.MachineManager.activeQualityDefinitionId;
|
property string activeQualityDefinitionId: Cura.MachineManager.activeQualityDefinitionId;
|
||||||
property bool isUM3: activeQualityDefinitionId == "ultimaker3" || activeQualityDefinitionId.match("ultimaker_") != null;
|
property bool isUM3: activeQualityDefinitionId == "ultimaker3" || activeQualityDefinitionId.match("ultimaker_") != null;
|
||||||
property bool printerConnected: Cura.MachineManager.printerConnected;
|
property bool printerConnected: Cura.MachineManager.printerConnected;
|
||||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands;
|
property bool printerAcceptsCommands:
|
||||||
property bool authenticationRequested: printerConnected && (Cura.MachineManager.printerOutputDevices[0].authenticationState == 2 || Cura.MachineManager.printerOutputDevices[0].authenticationState == 5); // AuthState.AuthenticationRequested or AuthenticationReceived.
|
{
|
||||||
|
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||||
|
{
|
||||||
|
return Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
property bool authenticationRequested:
|
||||||
|
{
|
||||||
|
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||||
|
{
|
||||||
|
var device = Cura.MachineManager.printerOutputDevices[0]
|
||||||
|
// AuthState.AuthenticationRequested or AuthState.AuthenticationReceived
|
||||||
|
return device.authenticationState == 2 || device.authenticationState == 5
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
property var materialNames:
|
||||||
|
{
|
||||||
|
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||||
|
{
|
||||||
|
return Cura.MachineManager.printerOutputDevices[0].materialNames
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
property var hotendIds:
|
||||||
|
{
|
||||||
|
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||||
|
{
|
||||||
|
return Cura.MachineManager.printerOutputDevices[0].hotendIds
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
UM.I18nCatalog {
|
UM.I18nCatalog {
|
||||||
id: catalog;
|
id: catalog;
|
||||||
@ -94,7 +126,7 @@ Item {
|
|||||||
Column {
|
Column {
|
||||||
Repeater {
|
Repeater {
|
||||||
id: nozzleColumn;
|
id: nozzleColumn;
|
||||||
model: printerConnected ? Cura.MachineManager.printerOutputDevices[0].hotendIds : null;
|
model: hotendIds
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: nozzleColumn.model[index];
|
text: nozzleColumn.model[index];
|
||||||
@ -105,7 +137,7 @@ Item {
|
|||||||
Column {
|
Column {
|
||||||
Repeater {
|
Repeater {
|
||||||
id: materialColumn;
|
id: materialColumn;
|
||||||
model: printerConnected ? Cura.MachineManager.printerOutputDevices[0].materialNames : null;
|
model: materialNames
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: materialColumn.model[index];
|
text: materialColumn.model[index];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user