mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Merge branch '3.0' of github.com:Ultimaker/Cura into 3.0
This commit is contained in:
commit
a7d06ff866
4 changed files with 46 additions and 24 deletions
|
@ -494,7 +494,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||
def numJobsPrinting(self):
|
||||
num_jobs_printing = 0
|
||||
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
|
||||
return num_jobs_printing
|
||||
|
||||
|
|
|
@ -199,10 +199,10 @@ Rectangle
|
|||
property var showExtended: {
|
||||
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 false
|
||||
return ! printer.enabled;
|
||||
}
|
||||
visible:
|
||||
{
|
||||
|
@ -227,6 +227,11 @@ Rectangle
|
|||
anchors.right: progressText.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
text: {
|
||||
if ( ! printer.enabled)
|
||||
{
|
||||
return catalog.i18nc("@label:status", "Disabled");
|
||||
}
|
||||
|
||||
if(printJob != null)
|
||||
{
|
||||
if(printJob.status == "printing" || printJob.status == "post_print")
|
||||
|
@ -243,14 +248,22 @@ Rectangle
|
|||
}
|
||||
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
|
||||
{
|
||||
return ""
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return catalog.i18nc("@label:status", "Available")
|
||||
return catalog.i18nc("@label:status", "Available");
|
||||
}
|
||||
|
||||
elide: Text.ElideRight
|
||||
|
@ -292,32 +305,41 @@ Rectangle
|
|||
|
||||
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
|
||||
{
|
||||
text:
|
||||
{
|
||||
if ( ! printer.enabled)
|
||||
{
|
||||
return catalog.i18nc("@label", "Not accepting print jobs");
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
if(printJob.status == "wait_cleanup")
|
||||
{
|
||||
case "wait_cleanup":
|
||||
return catalog.i18nc("@label", "Clear build plate")
|
||||
}
|
||||
if(printJob.status == "sent_to_printer" || printJob.status == "pre_print")
|
||||
{
|
||||
return catalog.i18nc("@label", "Preparing to print")
|
||||
}
|
||||
if(printJob.status == "wait_for_configuration")
|
||||
{
|
||||
case "sent_to_printer":
|
||||
case "pre_print":
|
||||
return catalog.i18nc("@label", "Leveling and heating")
|
||||
case "wait_for_configuration":
|
||||
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
|
||||
font: UM.Theme.getFont("default")
|
||||
|
@ -327,7 +349,7 @@ Rectangle
|
|||
{
|
||||
text: {
|
||||
if(printJob != null) {
|
||||
if(printJob.status == "printing" )
|
||||
if(printJob.status == "printing" || printJob.status == "post_print")
|
||||
{
|
||||
return OutputDevice.getDateCompleted(printJob.time_total - printJob.time_elapsed)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue