Merge more stuff, re-use models for local networking as well

This commit is contained in:
ChrisTerBeke 2019-07-29 14:53:50 +02:00
parent 8f37c83b9c
commit 4b212d6c05
31 changed files with 688 additions and 975 deletions

View file

@ -186,17 +186,7 @@ Item
}
printJob: modelData
}
model:
{
// When printing over the cloud we don't recieve print jobs until there is one, so
// unless there's at least one print job we'll be stuck with skeleton loading
// indefinitely.
if (Cura.MachineManager.activeMachineIsUsingCloudConnection || OutputDevice.receivedPrintJobs)
{
return OutputDevice.queuedPrintJobs
}
return [null, null]
}
model: OutputDevice.queuedPrintJobs
spacing: 6 // TODO: Theme!
}
}

View file

@ -25,7 +25,7 @@ Component
}
width: maximumWidth
color: UM.Theme.getColor("monitor_stage_background")
// Enable keyboard navigation. NOTE: This is done here so that we can also potentially
// forward to the queue items in the future. (Deleting selected print job, etc.)
Keys.forwardTo: carousel
@ -50,17 +50,7 @@ Component
MonitorCarousel
{
id: carousel
printers:
{
// When printing over the cloud we don't recieve print jobs until there is one, so
// unless there's at least one print job we'll be stuck with skeleton loading
// indefinitely.
if (Cura.MachineManager.activeMachineIsUsingCloudConnection || OutputDevice.receivedPrintJobs)
{
return OutputDevice.printers
}
return [null]
}
printers: OutputDevice.printers
}
}