mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:19:02 +08:00
Merge branch '3.0'
This commit is contained in:
commit
15f09d0757
@ -494,7 +494,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||||||
def numJobsPrinting(self):
|
def numJobsPrinting(self):
|
||||||
num_jobs_printing = 0
|
num_jobs_printing = 0
|
||||||
for job in self._print_jobs:
|
for job in self._print_jobs:
|
||||||
if job["status"] == "printing":
|
if job["status"] in ["printing", "wait_cleanup", "sent_to_printer", "pre_print", "post_print"]:
|
||||||
num_jobs_printing += 1
|
num_jobs_printing += 1
|
||||||
return num_jobs_printing
|
return num_jobs_printing
|
||||||
|
|
||||||
|
@ -199,10 +199,10 @@ Rectangle
|
|||||||
property var showExtended: {
|
property var showExtended: {
|
||||||
if(printJob!= null)
|
if(printJob!= null)
|
||||||
{
|
{
|
||||||
var extendStates = ["sent_to_printer", "wait_for_configuration", "printing", "pre_print", "post_print", "wait_cleanup"];
|
var extendStates = ["sent_to_printer", "wait_for_configuration", "printing", "pre_print", "post_print", "wait_cleanup", "queued"];
|
||||||
return extendStates.indexOf(printJob.status) !== -1;
|
return extendStates.indexOf(printJob.status) !== -1;
|
||||||
}
|
}
|
||||||
return false
|
return ! printer.enabled;
|
||||||
}
|
}
|
||||||
visible:
|
visible:
|
||||||
{
|
{
|
||||||
@ -227,6 +227,11 @@ Rectangle
|
|||||||
anchors.right: progressText.left
|
anchors.right: progressText.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
text: {
|
text: {
|
||||||
|
if ( ! printer.enabled)
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label:status", "Disabled");
|
||||||
|
}
|
||||||
|
|
||||||
if(printJob != null)
|
if(printJob != null)
|
||||||
{
|
{
|
||||||
if(printJob.status == "printing" || printJob.status == "post_print")
|
if(printJob.status == "printing" || printJob.status == "post_print")
|
||||||
@ -243,14 +248,22 @@ Rectangle
|
|||||||
}
|
}
|
||||||
else if (printJob.status == "pre_print" || printJob.status == "sent_to_printer")
|
else if (printJob.status == "pre_print" || printJob.status == "sent_to_printer")
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label:status", "Preparing")
|
return catalog.i18nc("@label:status", "Preparing to print")
|
||||||
|
}
|
||||||
|
else if (printJob.configuration_changes_required != undefined && printJob.status == "queued")
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label:status", "Action required")
|
||||||
|
}
|
||||||
|
else if (printJob.Status == "aborted")
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label:status", "Aborted")
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ""
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return catalog.i18nc("@label:status", "Available")
|
return catalog.i18nc("@label:status", "Available");
|
||||||
}
|
}
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
@ -292,32 +305,41 @@ Rectangle
|
|||||||
|
|
||||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
visible: printJob != null && (["wait_cleanup", "printing", "pre_print", "wait_for_configuration"].indexOf(printJob.status) !== -1)
|
visible: showExtended
|
||||||
|
|
||||||
Label // Status detail
|
Label // Status detail
|
||||||
{
|
{
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
|
if ( ! printer.enabled)
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label", "Not accepting print jobs");
|
||||||
|
}
|
||||||
|
|
||||||
if(printJob != null)
|
if(printJob != null)
|
||||||
{
|
{
|
||||||
if(printJob.status == "printing" )
|
switch (printJob.status)
|
||||||
{
|
{
|
||||||
|
case "printing":
|
||||||
|
case "post_print":
|
||||||
return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.time_total - printJob.time_elapsed)
|
return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.time_total - printJob.time_elapsed)
|
||||||
}
|
case "wait_cleanup":
|
||||||
if(printJob.status == "wait_cleanup")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label", "Clear build plate")
|
return catalog.i18nc("@label", "Clear build plate")
|
||||||
}
|
case "sent_to_printer":
|
||||||
if(printJob.status == "sent_to_printer" || printJob.status == "pre_print")
|
case "pre_print":
|
||||||
{
|
return catalog.i18nc("@label", "Leveling and heating")
|
||||||
return catalog.i18nc("@label", "Preparing to print")
|
case "wait_for_configuration":
|
||||||
}
|
|
||||||
if(printJob.status == "wait_for_configuration")
|
|
||||||
{
|
|
||||||
return catalog.i18nc("@label", "Not accepting print jobs")
|
return catalog.i18nc("@label", "Not accepting print jobs")
|
||||||
|
case "queued":
|
||||||
|
if (printJob.configuration_changes_required != undefined)
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label", "Configuration change");
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ""
|
return "";
|
||||||
}
|
}
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
@ -327,7 +349,7 @@ Rectangle
|
|||||||
{
|
{
|
||||||
text: {
|
text: {
|
||||||
if(printJob != null) {
|
if(printJob != null) {
|
||||||
if(printJob.status == "printing" )
|
if(printJob.status == "printing" || printJob.status == "post_print")
|
||||||
{
|
{
|
||||||
return OutputDevice.getDateCompleted(printJob.time_total - printJob.time_elapsed)
|
return OutputDevice.getDateCompleted(printJob.time_total - printJob.time_elapsed)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user