mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 16:18:58 +08:00
JobData is now shown in monitor screen again
CL-541
This commit is contained in:
parent
219e285b20
commit
9d7cd72691
@ -16,6 +16,7 @@ Column
|
|||||||
id: printMonitor
|
id: printMonitor
|
||||||
property var connectedDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
property var connectedDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||||
property var activePrinter: connectedDevice != null ? connectedDevice.activePrinter : null
|
property var activePrinter: connectedDevice != null ? connectedDevice.activePrinter : null
|
||||||
|
property var activePrintJob: activePrinter != null ? activePrinter.activePrintJob: null
|
||||||
|
|
||||||
Cura.ExtrudersModel
|
Cura.ExtrudersModel
|
||||||
{
|
{
|
||||||
@ -438,20 +439,33 @@ Column
|
|||||||
{
|
{
|
||||||
sourceComponent: monitorItem
|
sourceComponent: monitorItem
|
||||||
property string label: catalog.i18nc("@label", "Job Name")
|
property string label: catalog.i18nc("@label", "Job Name")
|
||||||
property string value: connectedPrinter != null ? connectedPrinter.jobName : ""
|
property string value: activePrintJob != null ? activePrintJob.name : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
sourceComponent: monitorItem
|
sourceComponent: monitorItem
|
||||||
property string label: catalog.i18nc("@label", "Printing Time")
|
property string label: catalog.i18nc("@label", "Printing Time")
|
||||||
property string value: connectedPrinter != null ? getPrettyTime(connectedPrinter.timeTotal) : ""
|
property string value: activePrintJob != null ? getPrettyTime(activePrintJob.timeTotal) : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader
|
Loader
|
||||||
{
|
{
|
||||||
sourceComponent: monitorItem
|
sourceComponent: monitorItem
|
||||||
property string label: catalog.i18nc("@label", "Estimated time left")
|
property string label: catalog.i18nc("@label", "Estimated time left")
|
||||||
property string value: connectedPrinter != null ? getPrettyTime(connectedPrinter.timeTotal - connectedPrinter.timeElapsed) : ""
|
property string value: activePrintJob != null ? getPrettyTime(activePrintJob.timeTotal - activePrintJob.timeElapsed) : ""
|
||||||
visible: connectedPrinter != null && (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "paused")
|
visible:
|
||||||
|
{
|
||||||
|
if(activePrintJob == null)
|
||||||
|
{
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return (activePrintJob.state == "printing" ||
|
||||||
|
activePrintJob.state == "resuming" ||
|
||||||
|
activePrintJob.state == "pausing" ||
|
||||||
|
activePrintJob.state == "paused")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component
|
Component
|
||||||
@ -485,6 +499,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component
|
Component
|
||||||
{
|
{
|
||||||
id: monitorSection
|
id: monitorSection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user