mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Account for the changes to BackendState in Uranium
Contributes to CURA-1278
This commit is contained in:
parent
472012a5b9
commit
c63eb3871c
2 changed files with 31 additions and 18 deletions
|
@ -14,21 +14,35 @@ Rectangle {
|
|||
|
||||
property real progress: UM.Backend.progress;
|
||||
property int backendState: UM.Backend.state;
|
||||
|
||||
property bool activity: Printer.getPlatformActivity;
|
||||
//Behavior on progress { NumberAnimation { duration: 250; } }
|
||||
property int totalHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
|
||||
property string fileBaseName
|
||||
property string statusText: {
|
||||
if(base.backendState == 0) {
|
||||
if(!activity) {
|
||||
return catalog.i18nc("@label:PrintjobStatus","Please load a 3d model");
|
||||
} else {
|
||||
return catalog.i18nc("@label:PrintjobStatus","Preparing to slice...");
|
||||
property string statusText:
|
||||
{
|
||||
if(base.backendState == 1)
|
||||
{
|
||||
if(!activity)
|
||||
{
|
||||
return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model");
|
||||
}
|
||||
} else if(base.backendState == 1) {
|
||||
return catalog.i18nc("@label:PrintjobStatus","Slicing...");
|
||||
} else {
|
||||
return catalog.i18nc("@label:PrintjobStatus","Ready to ") + UM.OutputDeviceManager.activeDeviceShortDescription;
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice...");
|
||||
}
|
||||
}
|
||||
else if(base.backendState == 2)
|
||||
{
|
||||
return catalog.i18nc("@label:PrintjobStatus", "Slicing...");
|
||||
}
|
||||
else if(base.backendState == 3)
|
||||
{
|
||||
return catalog.i18nc("@label:PrintjobStatus %1 is target operation","Ready to %1").arg(UM.OutputDeviceManager.activeDeviceShortDescription);
|
||||
}
|
||||
else if(base.backendState == 4)
|
||||
{
|
||||
return catalog.i18nc("@label:PrintjobStatus", "Unable to slice due to errors")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +74,7 @@ Rectangle {
|
|||
height: parent.height
|
||||
color: UM.Theme.getColor("progressbar_control")
|
||||
radius: UM.Theme.getSize("progressbar_radius").width
|
||||
visible: base.backendState == 1 ? true : false
|
||||
visible: base.backendState == 2 ? true : false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +90,7 @@ Rectangle {
|
|||
id: saveToButton
|
||||
|
||||
tooltip: UM.OutputDeviceManager.activeDeviceDescription;
|
||||
enabled: base.backendState == 2 && base.activity == true
|
||||
enabled: base.backendState == 3 && base.activity == true
|
||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||
|
||||
anchors.top: parent.top
|
||||
|
@ -127,7 +141,7 @@ Rectangle {
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
width: UM.Theme.getSize("save_button_save_to_button").height
|
||||
height: UM.Theme.getSize("save_button_save_to_button").height
|
||||
enabled: base.backendState == 2 && base.activity == true
|
||||
enabled: base.backendState == 3 && base.activity == true
|
||||
visible: devicesModel.deviceCount > 1
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue