Solved merge conflict.

This commit is contained in:
Jack Ha 2016-08-23 10:35:20 +02:00
commit 090b8d4f50
98 changed files with 2002 additions and 681 deletions

View file

@ -183,7 +183,7 @@ Item
Action
{
id: deleteObjectAction;
text: catalog.i18nc("@action:inmenu","Delete Object");
text: catalog.i18nc("@action:inmenu","Delete Model");
enabled: UM.Controller.toolsEnabled;
iconName: "edit-delete";
}
@ -191,13 +191,13 @@ Item
Action
{
id: centerObjectAction;
text: catalog.i18nc("@action:inmenu","Ce&nter Object on Platform");
text: catalog.i18nc("@action:inmenu","Ce&nter Model on Platform");
}
Action
{
id: groupObjectsAction
text: catalog.i18nc("@action:inmenu menubar:edit","&Group Objects");
text: catalog.i18nc("@action:inmenu menubar:edit","&Group Models");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false
iconName: "object-group"
shortcut: "Ctrl+G";
@ -207,7 +207,7 @@ Item
Action
{
id: unGroupObjectsAction
text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Objects");
text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Models");
enabled: UM.Scene.isGroupSelected
iconName: "object-ungroup"
shortcut: "Ctrl+Shift+G";
@ -217,7 +217,7 @@ Item
Action
{
id: mergeObjectsAction
text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Objects");
text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Models");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false
iconName: "merge";
shortcut: "Ctrl+Alt+G";
@ -227,14 +227,14 @@ Item
Action
{
id: multiplyObjectAction;
text: catalog.i18nc("@action:inmenu","&Duplicate Object");
text: catalog.i18nc("@action:inmenu","&Duplicate Model");
iconName: "edit-duplicate"
}
Action
{
id: selectAllAction;
text: catalog.i18nc("@action:inmenu menubar:edit","&Select All Objects");
text: catalog.i18nc("@action:inmenu menubar:edit","&Select All Models");
enabled: UM.Controller.toolsEnabled;
iconName: "edit-select-all";
shortcut: "Ctrl+A";
@ -244,7 +244,7 @@ Item
Action
{
id: deleteAllAction;
text: catalog.i18nc("@action:inmenu menubar:edit","&Clear Build Platform");
text: catalog.i18nc("@action:inmenu menubar:edit","&Clear Build Plate");
enabled: UM.Controller.toolsEnabled;
iconName: "edit-delete";
shortcut: "Ctrl+D";
@ -254,7 +254,7 @@ Item
Action
{
id: reloadAllAction;
text: catalog.i18nc("@action:inmenu menubar:file","Re&load All Objects");
text: catalog.i18nc("@action:inmenu menubar:file","Re&load All Models");
iconName: "document-revert";
onTriggered: Printer.reloadAll();
}
@ -262,14 +262,14 @@ Item
Action
{
id: resetAllTranslationAction;
text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Object Positions");
text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Positions");
onTriggered: Printer.resetAllTranslation();
}
Action
{
id: resetAllAction;
text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Object &Transformations");
text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model &Transformations");
onTriggered: Printer.resetAll();
}

View file

@ -143,20 +143,21 @@ UM.MainWindow
model: Cura.ExtrudersModel { }
Menu {
title: model.name
visible: machineExtruderCount.properties.value > 1
NozzleMenu { title: catalog.i18nc("@title:menu", "&Nozzle"); visible: Cura.MachineManager.hasVariants }
NozzleMenu { title: Cura.MachineManager.activeDefinitionVariantsName; visible: Cura.MachineManager.hasVariants }
MaterialMenu { title: catalog.i18nc("@title:menu", "&Material"); visible: Cura.MachineManager.hasMaterials }
ProfileMenu { title: catalog.i18nc("@title:menu", "&Profile"); }
MenuSeparator { }
MenuItem { text: catalog.i18nc("@action:inmenu", "Set as Active Extruder"); onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index) }
MenuItem { text: catalog.i18nc("@action:inmenu", "Set as Active Extruder"); onTriggered: ExtruderManager.setActiveExtruderIndex(model.index) }
}
onObjectAdded: settingsMenu.insertItem(index, object)
onObjectRemoved: settingsMenu.removeItem(object)
}
NozzleMenu { title: catalog.i18nc("@title:menu", "&Nozzle"); visible: machineExtruderCount.properties.value <= 1 && Cura.MachineManager.hasVariants }
NozzleMenu { title: Cura.MachineManager.activeDefinitionVariantsName; visible: machineExtruderCount.properties.value <= 1 && Cura.MachineManager.hasVariants }
MaterialMenu { title: catalog.i18nc("@title:menu", "&Material"); visible: machineExtruderCount.properties.value <= 1 && Cura.MachineManager.hasMaterials }
ProfileMenu { title: catalog.i18nc("@title:menu", "&Profile"); visible: machineExtruderCount.properties.value <= 1 }
@ -459,7 +460,6 @@ UM.MainWindow
target: Cura.Actions.addProfile
onTriggered:
{
// Cura.MachineManager.newQualityContainerFromQualityAndUser();
Cura.ContainerManager.createQualityChanges();
preferences.setPage(4);
preferences.show();
@ -765,10 +765,6 @@ UM.MainWindow
addMachineDialog.visible = true
addMachineDialog.firstRun = false
}
onClearAllFocus:
{
contentItem.focus = true
}
}
Timer

View file

@ -36,22 +36,7 @@ Menu
}
MenuItem
{
text:
{
var result = model.name
if(model.metadata.brand != undefined && model.metadata.brand != "Generic")
{
result = model.metadata.brand + " " + result
}
if(model.metadata.color_name != undefined && model.metadata.color_name != "Generic")
{
result = result + " (%1)".arg(model.metadata.color_name)
}
return result
}
text: model.name
checkable: true;
checked: model.id == Cura.MachineManager.activeMaterialId;
exclusiveGroup: group;

View file

@ -22,7 +22,7 @@ Menu
{
text: model.name
checkable: true
checked: Cura.MachineManager.activeQualityId == model.id
checked: Cura.MachineManager.activeQualityChangesId == "empty_quality_changes" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
exclusiveGroup: group
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
}
@ -38,7 +38,7 @@ Menu
id: customProfileInstantiator
model: UM.InstanceContainersModel
{
filter: menu.getFilter({ "type": "quality_changes", "extruder": null });
filter: { "type": "quality_changes", "extruder": null, "definition": Cura.MachineManager.filterQualityByMachine ? Cura.MachineManager.activeDefinitionId : "fdmprinter" };
onModelReset: customSeparator.visible = rowCount() > 0
}
@ -82,7 +82,7 @@ Menu
result.definition = Cura.MachineManager.activeDefinitionId;
if(Cura.MachineManager.hasMaterials)
{
result.material = Cura.MachineManager.activeMaterialId;
result.material = Cura.MachineManager.activeQualityMaterialId;
}
}
else

View file

@ -29,14 +29,14 @@ Rectangle
switch(Cura.MachineManager.printerOutputDevices[0].jobState)
{
case "printing":
case "pre_print": // heating, etc.
case "paused":
return true;
case "pre_print": // heating, etc.
case "wait_cleanup":
case "ready": // nut sure if this occurs, "" seems to be the ready state.
case "offline":
case "abort": // note sure if this jobState actually occurs in the wild
case "error": // after clicking abort you apparently get "error"
case "ready": // ready to print or getting ready
case "": // ready to print or getting ready
default:
return false;
@ -235,12 +235,12 @@ Rectangle
text: {
var result = "";
var jobState = Cura.MachineManager.printerOutputDevices[0].jobState;
if (!printerConnected) {
return "";
}
if (lastJobState !== jobState) {
var jobState = Cura.MachineManager.printerOutputDevices[0].jobState;
if (lastJobState != jobState) {
// the userClicked message must disappear when an "automated" jobState comes by
userClicked = false;
lastJobState = jobState;

View file

@ -46,11 +46,11 @@ UM.PreferencesPage
UM.Preferences.resetPreference("view/top_layer_count");
topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
if (plugins.model.find("id", "SliceInfoPlugin") > -1) {
if (plugins.find("id", "SliceInfoPlugin") > -1) {
UM.Preferences.resetPreference("info/send_slice_info")
sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
}
if (plugins.model.find("id", "UpdateChecker") > -1) {
if (plugins.find("id", "UpdateChecker") > -1) {
UM.Preferences.resetPreference("info/automatic_update_check")
checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
}
@ -58,6 +58,9 @@ UM.PreferencesPage
Column
{
//: Model used to check if a plugin exists
UM.PluginsModel { id: plugins }
//: Language selection label
UM.I18nCatalog{id: catalog; name:"cura"}
@ -168,7 +171,7 @@ UM.PreferencesPage
UM.TooltipArea {
width: childrenRect.width;
height: childrenRect.height;
text: catalog.i18nc("@info:tooltip","Moves the camera so the object is in the center of the view when an object is selected")
text: catalog.i18nc("@info:tooltip","Moves the camera so the model is in the center of the view when an model is selected")
CheckBox
{
@ -182,12 +185,12 @@ UM.PreferencesPage
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect?")
text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved so that they no longer intersect?")
CheckBox
{
id: pushFreeCheckbox
text: catalog.i18nc("@option:check", "Ensure objects are kept apart")
text: catalog.i18nc("@option:check", "Ensure models are kept apart")
checked: boolCheck(UM.Preferences.getValue("physics/automatic_push_free"))
onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked)
}
@ -247,12 +250,12 @@ UM.PreferencesPage
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should objects be scaled to the build volume if they are too large?")
text: catalog.i18nc("@info:tooltip","Should models be scaled to the build volume if they are too large?")
CheckBox
{
id: scaleToFitCheckbox
text: catalog.i18nc("@option:check","Scale large objects")
text: catalog.i18nc("@option:check","Scale large models")
checked: boolCheck(UM.Preferences.getValue("mesh/scale_to_fit"))
onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked)
}
@ -261,12 +264,12 @@ UM.PreferencesPage
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","An object may appear extremely small if its unit is for example in meters rather than millimeters. Should these objects be scaled up?")
text: catalog.i18nc("@info:tooltip","An model may appear extremely small if its unit is for example in meters rather than millimeters. Should these models be scaled up?")
CheckBox
{
id: scaleTinyCheckbox
text: catalog.i18nc("@option:check","Scale extremely small objects")
text: catalog.i18nc("@option:check","Scale extremely small models")
checked: boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes"))
onCheckedChanged: UM.Preferences.setValue("mesh/scale_tiny_meshes", checked)
}
@ -301,7 +304,7 @@ UM.PreferencesPage
}
UM.TooltipArea {
visible: plugins.model.find("id", "UpdateChecker") > -1
visible: plugins.find("id", "UpdateChecker") > -1
width: childrenRect.width
height: visible ? childrenRect.height : 0
text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?")
@ -316,7 +319,7 @@ UM.PreferencesPage
}
UM.TooltipArea {
visible: plugins.model.find("id", "SliceInfoPlugin") > -1
visible: plugins.find("id", "SliceInfoPlugin") > -1
width: childrenRect.width
height: visible ? childrenRect.height : 0
text: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.")
@ -329,13 +332,5 @@ UM.PreferencesPage
onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked)
}
}
//: Invisible list used to check if a plugin exists
ListView
{
id: plugins
model: UM.PluginsModel { }
visible: false
}
}
}

View file

@ -18,7 +18,10 @@ UM.ManagementPage
}
activeId: Cura.MachineManager.activeMachineId
activeIndex: {
activeIndex: activeMachineIndex()
function activeMachineIndex()
{
for(var i = 0; i < model.rowCount(); i++) {
if (model.getItem(i).id == Cura.MachineManager.activeMachineId) {
return i;
@ -142,7 +145,16 @@ UM.ManagementPage
{
id: confirmDialog;
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
onYes: Cura.MachineManager.removeMachine(base.currentItem.id);
onYes:
{
Cura.MachineManager.removeMachine(base.currentItem.id);
if(!base.currentItem)
{
objectList.currentIndex = activeMachineIndex()
}
//Force updating currentItem and the details panel
objectList.onCurrentIndexChanged()
}
}
UM.RenameDialog
@ -152,11 +164,20 @@ UM.ManagementPage
onAccepted:
{
Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim());
//Reselect current item to update details panel
var index = objectList.currentIndex
objectList.currentIndex = -1
objectList.currentIndex = index
//Force updating currentItem and the details panel
objectList.onCurrentIndexChanged()
}
}
Connections
{
target: Cura.MachineManager
onGlobalContainerChanged:
{
objectList.currentIndex = activeMachineIndex()
objectList.onCurrentIndexChanged()
}
}
}
}

View file

@ -47,7 +47,17 @@ UM.ManagementPage
return -1;
}
scrollviewCaption: "Printer: %1, Nozzle: %2".arg(Cura.MachineManager.activeMachineName).arg(Cura.MachineManager.activeVariantName)
scrollviewCaption:
{
if (Cura.MachineManager.hasVariants)
{
catalog.i18nc("@action:label %1 is printer name, %2 is how this printer names variants, %3 is variant name", "Printer: %1, %2: %3").arg(Cura.MachineManager.activeMachineName).arg(Cura.MachineManager.activeDefinitionVariantsName).arg(Cura.MachineManager.activeVariantName)
}
else
{
catalog.i18nc("@action:label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
}
}
detailsVisible: true
section.property: "section"
@ -67,8 +77,6 @@ UM.ManagementPage
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId
onClicked: Cura.MachineManager.setActiveMaterial(base.currentItem.id)
},
/*
// disabled because it has a lot of issues
Button
{
text: catalog.i18nc("@action:button", "Duplicate");
@ -91,7 +99,7 @@ UM.ManagementPage
Cura.MachineManager.setActiveMaterial(material_id)
}
}, */
},
Button
{
text: catalog.i18nc("@action:button", "Remove");
@ -188,7 +196,7 @@ UM.ManagementPage
object: base.currentItem != null ? base.currentItem.name : ""
onYes:
{
var containers = Cura.ContainerManager.findInstanceContainers({"GUID": base.currentItem.metadata.GUID})
var containers = Cura.ContainerManager.findInstanceContainers({"id": base.currentItem.id})
for(var i in containers)
{
Cura.ContainerManager.removeContainer(containers[i])

View file

@ -0,0 +1,62 @@
// Copyright (c) 2016 Ultimaker B.V.
// Cura is released under the terms of the AGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Controls 1.1
import UM 1.2 as UM
import Cura 1.0 as Cura
Tab
{
id: base
property string extruderId: "";
property string quality: "";
property string material: "";
TableView
{
anchors.fill: parent
anchors.margins: UM.Theme.getSize("default_margin").width
TableViewColumn
{
role: "label"
title: catalog.i18nc("@title:column", "Setting")
width: parent.width * 0.4
}
TableViewColumn
{
role: "profile_value"
title: catalog.i18nc("@title:column", "Profile")
width: parent.width * 0.18
}
TableViewColumn
{
role: "user_value"
title: catalog.i18nc("@title:column", "Current"); visible: quality == Cura.MachineManager.activeQualityId
width: parent.width * 0.18
}
TableViewColumn
{
role: "unit"
title: catalog.i18nc("@title:column", "Unit")
width: parent.width * 0.14
}
section.property: "category"
section.delegate: Label
{
text: section
font.bold: true
}
model: Cura.QualitySettingsModel
{
extruderId: base.extruderId != "" ? base.extruderId : ""
quality: base.quality != null ? base.quality : ""
material: base.material != null ? base.material : ""
}
}
}

View file

@ -18,13 +18,13 @@ UM.ManagementPage
{
filter:
{
var result = { "type": "quality" };
var result = { "type": "quality*", "extruder": null };
if(Cura.MachineManager.filterQualityByMachine)
{
result.definition = Cura.MachineManager.activeDefinitionId;
if(Cura.MachineManager.hasMaterials)
{
result.material = Cura.MachineManager.activeMaterialId;
result.material = Cura.MachineManager.allActiveMaterialIds[Cura.MachineManager.activeMachineId];
}
}
else
@ -76,9 +76,9 @@ UM.ManagementPage
{
var selectedContainer;
if (base.currentItem.id == Cura.MachineManager.activeQualityId) {
selectedContainer = Cura.MachineManager.newQualityContainerFromQualityAndUser();
selectedContainer = Cura.ContainerManager.createQualityChanges();
} else {
selectedContainer = Cura.MachineManager.duplicateContainer(base.currentItem.id);
selectedContainer = Cura.ContainerManager.duplicateQualityOrQualityChanges(base.currentItem.name);
}
base.selectContainer(selectedContainer);
@ -106,13 +106,15 @@ UM.ManagementPage
text: catalog.i18nc("@action:button", "Import");
iconName: "document-import";
onClicked: importDialog.open();
enabled: false
},
Button
{
text: catalog.i18nc("@action:button", "Export")
iconName: "document-export"
onClicked: exportDialog.open()
enabled: currentItem != null
// enabled: currentItem != null
enabled: false
}
]
@ -152,14 +154,14 @@ UM.ManagementPage
return catalog.i18nc("@action:button", "Update profile with current settings");
}
enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId)
onClicked: Cura.MachineManager.updateQualityContainerFromUserContainer()
onClicked: Cura.ContainerManager.updateQualityChanges()
}
Button
{
text: catalog.i18nc("@action:button", "Discard current settings");
enabled: Cura.MachineManager.hasUserSettings
onClicked: Cura.MachineManager.clearUserSettings();
onClicked: Cura.ContainerManager.clearUserContainers();
}
}
@ -173,7 +175,7 @@ UM.ManagementPage
Label {
id: defaultsMessage
visible: currentItem && !currentItem.metadata.has_settings
visible: false
text: catalog.i18nc("@action:label", "This profile has no settings and uses the defaults specified by the printer.")
wrapMode: Text.WordWrap
width: parent.width
@ -187,69 +189,31 @@ UM.ManagementPage
}
}
ScrollView {
id: scrollView
TabView
{
anchors.left: parent.left
anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.right: parent.right
anchors.bottom: parent.bottom
ListView {
model: Cura.ContainerSettingsModel{ containers:
{
if (!currentItem) {
return []
} else if (currentItem.id == Cura.MachineManager.activeQualityId) {
return [base.currentItem.id, Cura.MachineManager.activeUserProfileId]
} else {
return [base.currentItem.id]
}
}
}
delegate: Row {
property variant setting: model
spacing: UM.Theme.getSize("default_margin").width/2
Label {
text: model.label
elide: Text.ElideMiddle
width: scrollView.width / 100 * 40
}
Repeater {
model: setting.values.length
Label {
text: setting.values[index].toString()
width: scrollView.width / 100 * 15
elide: Text.ElideRight
font.strikeout: index < setting.values.length - 1 && setting.values[index + 1] != ""
opacity: font.strikeout ? 0.5 : 1
}
}
Label {
text: model.unit
}
}
header: Row {
visible: currentItem && currentItem.id == Cura.MachineManager.activeQualityId
spacing: UM.Theme.getSize("default_margin").width
Label {
text: catalog.i18nc("@action:label", "Profile:")
width: scrollView.width / 100 * 55
horizontalAlignment: Text.AlignRight
font.bold: true
}
Label {
text: catalog.i18nc("@action:label", "Current:")
visible: currentItem && currentItem.id == Cura.MachineManager.activeQualityId
font.bold: true
}
}
section.property: "category"
section.criteria: ViewSection.FullString
section.delegate: Label {
text: section
font.bold: true
ProfileTab
{
title: catalog.i18nc("@title:tab", "Global Settings");
quality: base.currentItem != null ? base.currentItem.id : "";
material: Cura.MachineManager.allActiveMaterialIds.global ? Cura.MachineManager.allActiveMaterialIds.global : ""
}
Repeater
{
model: Cura.ExtrudersModel { }
ProfileTab
{
title: model.name;
extruderId: model.id;
quality: base.currentItem != null ? base.currentItem.id : "";
material: Cura.MachineManager.allActiveMaterialIds[model.id]
}
}
}
@ -263,17 +227,25 @@ UM.ManagementPage
{
id: confirmDialog
object: base.currentItem != null ? base.currentItem.name : ""
onYes: Cura.MachineManager.removeQualityContainer(base.currentItem.id)
onYes:
{
var name = base.currentItem.name;
Cura.ContainerManager.removeQualityChanges(name)
if(Cura.MachineManager.activeQualityName == name)
{
Cura.MachineManager.setActiveQuality(base.model.getItem(0).name)
}
}
}
UM.RenameDialog
{
id: renameDialog;
object: base.currentItem != null ? base.currentItem.name : ""
property bool removeWhenRejected: false
onAccepted: Cura.MachineManager.renameQualityContainer(base.currentItem.id, newName)
onAccepted: Cura.ContainerManager.renameQualityChanges(base.currentItem.name, newName)
onRejected: {
if(removeWhenRejected) {
Cura.MachineManager.removeQualityContainer(base.currentItem.id)
Cura.ContainerManager.removeQualityChanges(base.currentItem.name)
}
}
}

View file

@ -14,6 +14,8 @@ Column
id: printMonitor
property var connectedPrinter: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null
Cura.ExtrudersModel { id: extrudersModel }
Label
{
text: printerConnected ? connectedPrinter.connectionText : catalog.i18nc("@label", "The printer is not connected.")
@ -34,7 +36,7 @@ Column
delegate: Loader
{
sourceComponent: monitorItem
property string label: machineExtruderCount.properties.value > 1 ? catalog.i18nc("@label", "Hotend Temperature %1").arg(index + 1) : catalog.i18nc("@label", "Hotend Temperature")
property string label: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
property string value: printerConnected ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
}
}
@ -44,7 +46,7 @@ Column
delegate: Loader
{
sourceComponent: monitorItem
property string label: catalog.i18nc("@label", "Bed Temperature")
property string label: catalog.i18nc("@label", "Build plate")
property string value: printerConnected ? Math.round(connectedPrinter.bedTemperature) + "°C" : ""
}
}
@ -80,21 +82,24 @@ Column
Row
{
height: UM.Theme.getSize("setting_control").height
width: base.width - 2 * UM.Theme.getSize("default_margin").width
Label
{
width: parent.width * 0.4
anchors.verticalCenter: parent.verticalCenter
text: label
color: printerConnected && printerAcceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
font: UM.Theme.getFont("default")
width: base.width * 0.4
elide: Text.ElideRight
anchors.verticalCenter: parent.verticalCenter
}
Label
{
width: parent.width * 0.6
anchors.verticalCenter: parent.verticalCenter
text: value
color: printerConnected && printerAcceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
font: UM.Theme.getFont("default")
anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight
}
}
}

View file

@ -14,9 +14,7 @@ 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:
@ -26,21 +24,18 @@ Rectangle {
return catalog.i18nc("@label:PrintjobStatus", "Please load a 3d model");
}
if(base.backendState == 1)
switch(base.backendState)
{
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")
case 1:
return catalog.i18nc("@label:PrintjobStatus", "Preparing to slice...");
case 2:
return catalog.i18nc("@label:PrintjobStatus", "Slicing...");
case 3:
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");
default:
return "";
}
}
@ -126,12 +121,29 @@ Rectangle {
background: Rectangle
{
border.width: UM.Theme.getSize("default_lining").width
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
border.color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled_border");
else if(control.pressed)
return UM.Theme.getColor("action_button_active_border");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered_border");
else
return UM.Theme.getColor("action_button_border");
}
color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled");
else if(control.pressed)
return UM.Theme.getColor("action_button_active");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered");
else
return UM.Theme.getColor("action_button");
}
Behavior on color { ColorAnimation { duration: 50; } }
implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2)
@ -139,9 +151,17 @@ Rectangle {
Label {
id: actualLabel
anchors.centerIn: parent
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
control.pressed ? UM.Theme.getColor("action_button_active_text") :
control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text")
color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled_text");
else if(control.pressed)
return UM.Theme.getColor("action_button_active_text");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered_text");
else
return UM.Theme.getColor("action_button_text");
}
font: UM.Theme.getFont("action_button")
text: control.text;
}
@ -167,12 +187,28 @@ Rectangle {
background: Rectangle {
id: deviceSelectionIcon
border.width: UM.Theme.getSize("default_lining").width
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
color: !control.enabled ? UM.Theme.getColor("action_button_disabled") :
control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
border.color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled_border");
else if(control.pressed)
return UM.Theme.getColor("action_button_active_border");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered_border");
else
return UM.Theme.getColor("action_button_border");
}
color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled");
else if(control.pressed)
return UM.Theme.getColor("action_button_active");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered");
else
return UM.Theme.getColor("action_button");
}
Behavior on color { ColorAnimation { duration: 50; } }
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("save_button_text_margin").width / 2;
@ -186,9 +222,17 @@ Rectangle {
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: !control.enabled ? UM.Theme.getColor("action_button_disabled_text") :
control.pressed ? UM.Theme.getColor("action_button_active_text") :
control.hovered ? UM.Theme.getColor("action_button_hovered_text") : UM.Theme.getColor("action_button_text");
color:
{
if(!control.enabled)
return UM.Theme.getColor("action_button_disabled_text");
else if(control.pressed)
return UM.Theme.getColor("action_button_active_text");
else if(control.hovered)
return UM.Theme.getColor("action_button_hovered_text");
else
return UM.Theme.getColor("action_button_text");
}
source: UM.Theme.getIcon("arrow_bottom");
}
}

View file

@ -95,26 +95,31 @@ ScrollView
{
target: provider
property: "containerStackId"
when: model.settable_per_extruder || (inheritStackProvider.properties.global_inherits_stack != -1 && inheritStackProvider.properties.global_inherits_stack != null)
when: model.settable_per_extruder || model.settable_per_mesh || (inheritStackProvider.properties.global_inherits_stack != null && inheritStackProvider.properties.global_inherits_stack >= 0);
value:
{
if(inheritStackProvider.properties.global_inherits_stack == -1 || inheritStackProvider.properties.global_inherits_stack == null)
if(!model.settable_per_extruder && !model.settable_per_mesh)
{
if( ExtruderManager.activeExtruderStackId)
{
return ExtruderManager.activeExtruderStackId
}
else
{
return Cura.MachineManager.activeMachineId
}
//Not settable per extruder, so we must pick global.
return Cura.MachineManager.activeMachineId;
}
return ExtruderManager.extruderIds[String(inheritStackProvider.properties.global_inherits_stack)]
if(inheritStackProvider.properties.global_inherits_stack != null && inheritStackProvider.properties.global_inherits_stack >= 0)
{
//We have global_inherits_stack, so pick that stack.
return ExtruderManager.extruderIds[String(inheritStackProvider.properties.global_inherits_stack)];
}
if(ExtruderManager.activeExtruderStackId)
{
//We're on an extruder tab. Pick the current extruder.
return ExtruderManager.activeExtruderStackId;
}
//No extruder tab is selected. Pick the global stack. Shouldn't happen any more since we removed the global tab.
return Cura.MachineManager.activeMachineId;
}
}
// Specialty provider that only watches global_inherits (we cant filter on what property changed we get events
// so we bypass that to make a dedicated provider.
// so we bypass that to make a dedicated provider).
UM.SettingPropertyProvider
{
id: inheritStackProvider

View file

@ -183,8 +183,23 @@ Column
Label
{
id: variantLabel
text: (Cura.MachineManager.hasVariants && Cura.MachineManager.hasMaterials) ? catalog.i18nc("@label","Nozzle & Material:"):
Cura.MachineManager.hasVariants ? catalog.i18nc("@label","Nozzle:") : catalog.i18nc("@label","Material:");
text:
{
var label;
if(Cura.MachineManager.hasVariants && Cura.MachineManager.hasMaterials)
{
label = "%1 & %2".arg(Cura.MachineManager.activeDefinitionVariantsName).arg(catalog.i18nc("@label","Material"));
}
else if(Cura.MachineManager.hasVariants)
{
label = Cura.MachineManager.activeDefinitionVariantsName;
}
else
{
label = catalog.i18nc("@label","Material");
}
return "%1:".arg(label);
}
anchors.verticalCenter: parent.verticalCenter
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width

View file

@ -213,42 +213,54 @@ Item
id: adhesionHelperLabel
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.verticalCenter: brimCheckBox.verticalCenter
anchors.verticalCenter: adhesionCheckBox.verticalCenter
width: parent.width / 100 * 35 - 3 * UM.Theme.getSize("default_margin").width
//: Bed adhesion label
text: catalog.i18nc("@label:listbox", "Bed Adhesion:");
text: catalog.i18nc("@label", "Helper Parts:");
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
CheckBox{
id: brimCheckBox
property alias _hovered: brimMouseArea.containsMouse
id: adhesionCheckBox
property alias _hovered: adhesionMouseArea.containsMouse
anchors.top: parent.top
anchors.left: adhesionHelperLabel.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
//: Setting enable skirt adhesion checkbox
text: catalog.i18nc("@option:check", "Print Brim");
//: Setting enable printing build-plate adhesion helper checkbox
text: catalog.i18nc("@option:check", "Print Build Plate Adhesion");
style: UM.Theme.styles.checkbox;
enabled: base.settingsEnabled
checked: platformAdhesionType.properties.value == "brim"
checked: platformAdhesionType.properties.value != "skirt"
MouseArea {
id: brimMouseArea
id: adhesionMouseArea
anchors.fill: parent
hoverEnabled: true
enabled: base.settingsEnabled
onClicked:
{
platformAdhesionType.setPropertyValue("value", !parent.checked ? "brim" : "skirt")
var adhesionType = "skirt";
if(!parent.checked)
{
// Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft
platformAdhesionType.removeFromContainer(0);
adhesionType = platformAdhesionType.properties.value;
if(adhesionType == "skirt")
{
// If the rest of the stack doesn't prescribe an adhesion-type, default to a brim
adhesionType = "brim";
}
}
platformAdhesionType.setPropertyValue("value", adhesionType);
}
onEntered:
{
base.showTooltip(brimCheckBox, Qt.point(-brimCheckBox.x, 0),
catalog.i18nc("@label", "Enable printing a brim. This will add a single-layer-thick flat area around your object which is easy to cut off afterwards."));
base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0),
catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards."));
}
onExited:
{
@ -264,7 +276,7 @@ Item
anchors.verticalCenter: supportCheckBox.verticalCenter
width: parent.width / 100 * 35 - 3 * UM.Theme.getSize("default_margin").width
//: Support label
text: catalog.i18nc("@label:listbox", "Support:");
text: "";
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("text");
}
@ -274,7 +286,7 @@ Item
visible: machineExtruderCount.properties.value <= 1
property alias _hovered: supportMouseArea.containsMouse
anchors.top: brimCheckBox.bottom
anchors.top: adhesionCheckBox.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: supportHelperLabel.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
@ -311,7 +323,7 @@ Item
visible: machineExtruderCount.properties.value > 1
model: extruderModel
anchors.top: brimCheckBox.bottom
anchors.top: adhesionCheckBox.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: supportHelperLabel.right
anchors.leftMargin: UM.Theme.getSize("default_margin").width
@ -354,12 +366,11 @@ Item
Component.onCompleted: populateExtruderModel()
}
//: Invisible list used to populate the extrudelModel
ListView
//: Model used to populate the extrudelModel
Cura.ExtrudersModel
{
id: extruders
model: Cura.ExtrudersModel { onModelChanged: populateExtruderModel() }
visible: false
onModelChanged: populateExtruderModel()
}
}
@ -370,10 +381,10 @@ Item
text: catalog.i18nc("@label", "Don't print support"),
color: ""
})
for(var extruderNumber = 0; extruderNumber < extruders.model.rowCount() ; extruderNumber++) {
for(var extruderNumber = 0; extruderNumber < extruders.rowCount() ; extruderNumber++) {
extruderModel.append({
text: catalog.i18nc("@label", "Print using %1").arg(extruders.model.getItem(extruderNumber).name),
color: extruders.model.getItem(extruderNumber).color
text: catalog.i18nc("@label", "Print support using %1").arg(extruders.getItem(extruderNumber).name),
color: extruders.getItem(extruderNumber).color
})
}
}