mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 23:59:03 +08:00
Merge branch '3.0' of github.com:Ultimaker/Cura into 3.0
This commit is contained in:
commit
a7d06ff866
@ -1,5 +1,5 @@
|
|||||||
# Copyright (c) 2017 Ultimaker B.V.
|
# Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Uranium is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import UM.Settings.Models.SettingVisibilityHandler
|
import UM.Settings.Models.SettingVisibilityHandler
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ class MaterialSettingsVisibilityHandler(UM.Settings.Models.SettingVisibilityHand
|
|||||||
"default_material_print_temperature",
|
"default_material_print_temperature",
|
||||||
"material_bed_temperature",
|
"material_bed_temperature",
|
||||||
"material_standby_temperature",
|
"material_standby_temperature",
|
||||||
"material_flow_temp_graph",
|
#"material_flow_temp_graph",
|
||||||
"cool_fan_speed",
|
"cool_fan_speed",
|
||||||
"retraction_amount",
|
"retraction_amount",
|
||||||
"retraction_speed",
|
"retraction_speed",
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
2
setup.py
2
setup.py
@ -45,7 +45,7 @@ setup(name="Cura",
|
|||||||
author="Ultimaker",
|
author="Ultimaker",
|
||||||
author_email="a.hiemstra@ultimaker.com",
|
author_email="a.hiemstra@ultimaker.com",
|
||||||
url="http://software.ultimaker.com/",
|
url="http://software.ultimaker.com/",
|
||||||
license="GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)",
|
license="GNU LESSER GENERAL PUBLIC LICENSE (LGPL)",
|
||||||
scripts=["cura_app.py"],
|
scripts=["cura_app.py"],
|
||||||
windows=[{"script": "cura_app.py", "dest_name": "Cura", "icon_resources": [(1, "icons/cura.ico")]}],
|
windows=[{"script": "cura_app.py", "dest_name": "Cura", "icon_resources": [(1, "icons/cura.ico")]}],
|
||||||
#console=[{"script": "cura_app.py"}],
|
#console=[{"script": "cura_app.py"}],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user