JobData is now shown in monitor screen again

CL-541
This commit is contained in:
Jaime van Kessel 2017-11-24 09:38:10 +01:00
parent 219e285b20
commit 9d7cd72691

View file

@ -16,6 +16,7 @@ Column
id: printMonitor
property var connectedDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
property var activePrinter: connectedDevice != null ? connectedDevice.activePrinter : null
property var activePrintJob: activePrinter != null ? activePrinter.activePrintJob: null
Cura.ExtrudersModel
{
@ -438,20 +439,33 @@ Column
{
sourceComponent: monitorItem
property string label: catalog.i18nc("@label", "Job Name")
property string value: connectedPrinter != null ? connectedPrinter.jobName : ""
property string value: activePrintJob != null ? activePrintJob.name : ""
}
Loader
{
sourceComponent: monitorItem
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
{
sourceComponent: monitorItem
property string label: catalog.i18nc("@label", "Estimated time left")
property string value: connectedPrinter != null ? getPrettyTime(connectedPrinter.timeTotal - connectedPrinter.timeElapsed) : ""
visible: connectedPrinter != null && (connectedPrinter.jobState == "printing" || connectedPrinter.jobState == "resuming" || connectedPrinter.jobState == "pausing" || connectedPrinter.jobState == "paused")
property string value: activePrintJob != null ? getPrettyTime(activePrintJob.timeTotal - activePrintJob.timeElapsed) : ""
visible:
{
if(activePrintJob == null)
{
return false
}
return (activePrintJob.state == "printing" ||
activePrintJob.state == "resuming" ||
activePrintJob.state == "pausing" ||
activePrintJob.state == "paused")
}
}
Component
@ -485,6 +499,7 @@ Column
}
}
}
Component
{
id: monitorSection