mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Added maintenance state to display qml
CURA-2235
This commit is contained in:
parent
fcefda9eaf
commit
31bc3d2575
2 changed files with 17 additions and 1 deletions
|
@ -48,7 +48,13 @@ Rectangle
|
||||||
{
|
{
|
||||||
if(!printerConnected || !printerAcceptsCommands)
|
if(!printerConnected || !printerAcceptsCommands)
|
||||||
return UM.Theme.getColor("text");
|
return UM.Theme.getColor("text");
|
||||||
|
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("status_busy");
|
||||||
|
} else if (Cura.MachineManager.printerOutputDevices[0].printerState == "error")
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("status_stopped");
|
||||||
|
}
|
||||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
{
|
{
|
||||||
case "printing":
|
case "printing":
|
||||||
|
@ -80,6 +86,11 @@ Rectangle
|
||||||
return catalog.i18nc("@label:MonitorStatus", "Printer does not accept commands");
|
return catalog.i18nc("@label:MonitorStatus", "Printer does not accept commands");
|
||||||
|
|
||||||
var printerOutputDevice = Cura.MachineManager.printerOutputDevices[0]
|
var printerOutputDevice = Cura.MachineManager.printerOutputDevices[0]
|
||||||
|
|
||||||
|
if(printerOutputDevice.printerState == "maintenance")
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Printer is in maintenance mode.");
|
||||||
|
}
|
||||||
switch(printerOutputDevice.jobState)
|
switch(printerOutputDevice.jobState)
|
||||||
{
|
{
|
||||||
case "offline":
|
case "offline":
|
||||||
|
|
|
@ -112,6 +112,11 @@ Rectangle
|
||||||
else if(!printerAcceptsCommands)
|
else if(!printerAcceptsCommands)
|
||||||
return UM.Theme.getIcon("tab_monitor_unknown");
|
return UM.Theme.getIcon("tab_monitor_unknown");
|
||||||
|
|
||||||
|
if(Cura.MachineManager.printerOutputDevices[0].printerState == "maintenance")
|
||||||
|
{
|
||||||
|
return UM.Theme.getIcon("tab_monitor_busy");
|
||||||
|
}
|
||||||
|
|
||||||
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
|
||||||
{
|
{
|
||||||
case "printing":
|
case "printing":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue