D5: Refactoring

This commit is contained in:
Victor Larchenko 2016-11-22 15:12:37 +06:00 committed by Youness Alaoui
parent ce9251b5a6
commit 1631045d7a
10 changed files with 69 additions and 43 deletions

View file

@ -412,7 +412,7 @@ UM.MainWindow
style: UM.Theme.styles.tool_button;
tooltip: "";
enabled: !PrintInformation.isPreSliced
enabled: !PrintInformation.preSliced
menu: ViewMenu { }
}

View file

@ -11,7 +11,7 @@ Menu
{
title: catalog.i18nc("@title:menu menubar:toplevel", "&View");
id: menu
enabled: !PrintInformation.isPreSliced
enabled: !PrintInformation.preSliced
Instantiator
{
model: UM.ViewModel { }

View file

@ -14,7 +14,6 @@ Rectangle {
property real progress: UM.Backend.progress;
property int backendState: UM.Backend.state;
property bool backendPaused: UM.Backend.paused;
property bool activity: Printer.getPlatformActivity;
property int totalHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
property string fileBaseName
@ -25,11 +24,6 @@ Rectangle {
return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model");
}
if (backendPaused)
{
return catalog.i18nc("@label:PrintjobStatus", "Slicing temporary disabled");
}
switch(base.backendState)
{
case 1:
@ -40,6 +34,8 @@ Rectangle {
return catalog.i18nc("@label:PrintjobStatus %1 is target operation","Ready to %1").arg(UM.OutputDeviceManager.activeDeviceShortDescription);
case 4:
return catalog.i18nc("@label:PrintjobStatus", "Unable to Slice");
case 5:
return catalog.i18nc("@label:PrintjobStatus", "Slicing unavailable");
default:
return "";
}

View file

@ -289,7 +289,7 @@ Rectangle
Label {
id: settingsModeLabel
text: !hideSettings ? catalog.i18nc("@label:listbox", "Print Setup") : catalog.i18nc("@label:listbox","Not possible to modify slicing settings or re-slice\nwhile a GCODE file is open");
text: !hideSettings ? catalog.i18nc("@label:listbox", "Print Setup") : catalog.i18nc("@label:listbox","Print Setup disabled\nG-code files cannot be modified");
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
anchors.top: headerSeparator.bottom