mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge branch 'master' of https://github.com/maukcc/Cura
resources/quality/ultimaker3/um3_aa0.8_TPU_Not_Supported_Quality.inst.cfg resources/quality/ultimaker3/um3_aa0.8_TPU_Not_Supported_Superdraft_Quality.inst.cfg
This commit is contained in:
commit
d57701c7ef
199 changed files with 4940 additions and 558 deletions
|
|
@ -152,6 +152,7 @@ UM.PreferencesPage
|
|||
append({ text: "Suomi", code: "fi" })
|
||||
append({ text: "Français", code: "fr" })
|
||||
append({ text: "Italiano", code: "it" })
|
||||
append({ text: "日本語", code: "jp" })
|
||||
append({ text: "Nederlands", code: "nl" })
|
||||
append({ text: "Português do Brasil", code: "ptbr" })
|
||||
append({ text: "Русский", code: "ru" })
|
||||
|
|
|
|||
|
|
@ -24,66 +24,89 @@ TabView
|
|||
property double spoolLength: calculateSpoolLength()
|
||||
property real costPerMeter: calculateCostPerMeter()
|
||||
|
||||
property bool reevaluateLinkedMaterials: false
|
||||
property string linkedMaterialNames:
|
||||
{
|
||||
if (reevaluateLinkedMaterials)
|
||||
{
|
||||
reevaluateLinkedMaterials = false;
|
||||
}
|
||||
if(!base.containerId || !base.editingEnabled)
|
||||
{
|
||||
return ""
|
||||
}
|
||||
var linkedMaterials = Cura.ContainerManager.getLinkedMaterials(base.containerId);
|
||||
return linkedMaterials.join(", ");
|
||||
}
|
||||
|
||||
Tab
|
||||
{
|
||||
title: catalog.i18nc("@title","Information")
|
||||
|
||||
anchors
|
||||
{
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
rightMargin: 0
|
||||
}
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||
|
||||
ScrollView
|
||||
{
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
||||
flickableItem.flickableDirection: Flickable.VerticalFlick
|
||||
frameVisible: true
|
||||
|
||||
property real columnWidth: Math.floor(viewport.width * 0.5) - UM.Theme.getSize("default_margin").width
|
||||
|
||||
Flow
|
||||
{
|
||||
id: containerGrid
|
||||
|
||||
width: base.width;
|
||||
x: UM.Theme.getSize("default_margin").width
|
||||
y: UM.Theme.getSize("default_lining").height
|
||||
|
||||
property real rowHeight: textField.height;
|
||||
width: base.width
|
||||
property real rowHeight: textField.height + UM.Theme.getSize("default_lining").height
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }
|
||||
ReadOnlyTextField
|
||||
{
|
||||
id: displayNameTextField;
|
||||
width: base.secondColumnWidth;
|
||||
width: scrollView.columnWidth;
|
||||
text: properties.name;
|
||||
readOnly: !base.editingEnabled;
|
||||
onEditingFinished: base.setName(properties.name, text)
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Brand") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Brand") }
|
||||
ReadOnlyTextField
|
||||
{
|
||||
id: textField;
|
||||
width: base.secondColumnWidth;
|
||||
width: scrollView.columnWidth;
|
||||
text: properties.supplier;
|
||||
readOnly: !base.editingEnabled;
|
||||
onEditingFinished: base.setMetaDataEntry("brand", properties.supplier, text)
|
||||
onEditingFinished:
|
||||
{
|
||||
base.setMetaDataEntry("brand", properties.supplier, text);
|
||||
pane.objectList.currentIndex = pane.getIndexById(base.containerId);
|
||||
}
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Material Type") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Material Type") }
|
||||
ReadOnlyTextField
|
||||
{
|
||||
width: base.secondColumnWidth;
|
||||
width: scrollView.columnWidth;
|
||||
text: properties.material_type;
|
||||
readOnly: !base.editingEnabled;
|
||||
onEditingFinished: base.setMetaDataEntry("material", properties.material_type, text)
|
||||
onEditingFinished:
|
||||
{
|
||||
base.setMetaDataEntry("material", properties.material_type, text);
|
||||
pane.objectList.currentIndex = pane.getIndexById(base.containerId)
|
||||
}
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Color") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Color") }
|
||||
|
||||
Row
|
||||
{
|
||||
width: base.secondColumnWidth;
|
||||
width: scrollView.columnWidth;
|
||||
height: parent.rowHeight;
|
||||
spacing: UM.Theme.getSize("default_margin").width/2
|
||||
|
||||
|
|
@ -115,11 +138,11 @@ TabView
|
|||
|
||||
Label { width: parent.width; height: parent.rowHeight; font.bold: true; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Properties") }
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Density") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Density") }
|
||||
ReadOnlySpinBox
|
||||
{
|
||||
id: densitySpinBox
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
value: properties.density
|
||||
decimals: 2
|
||||
suffix: " g/cm³"
|
||||
|
|
@ -130,11 +153,11 @@ TabView
|
|||
onValueChanged: updateCostPerMeter()
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Diameter") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Diameter") }
|
||||
ReadOnlySpinBox
|
||||
{
|
||||
id: diameterSpinBox
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
value: properties.diameter
|
||||
decimals: 2
|
||||
suffix: " mm"
|
||||
|
|
@ -145,11 +168,11 @@ TabView
|
|||
onValueChanged: updateCostPerMeter()
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament Cost") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament Cost") }
|
||||
SpinBox
|
||||
{
|
||||
id: spoolCostSpinBox
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
value: base.getMaterialPreferenceValue(properties.guid, "spool_cost")
|
||||
prefix: base.currency + " "
|
||||
decimals: 2
|
||||
|
|
@ -161,11 +184,11 @@ TabView
|
|||
}
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament weight") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament weight") }
|
||||
SpinBox
|
||||
{
|
||||
id: spoolWeightSpinBox
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
value: base.getMaterialPreferenceValue(properties.guid, "spool_weight")
|
||||
suffix: " g"
|
||||
stepSize: 100
|
||||
|
|
@ -178,24 +201,45 @@ TabView
|
|||
}
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament length") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament length") }
|
||||
Label
|
||||
{
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
text: "~ %1 m".arg(Math.round(base.spoolLength))
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
height: parent.rowHeight
|
||||
}
|
||||
|
||||
Label { width: base.firstColumnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Cost per Meter") }
|
||||
Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Cost per Meter") }
|
||||
Label
|
||||
{
|
||||
width: base.secondColumnWidth
|
||||
width: scrollView.columnWidth
|
||||
text: "~ %1 %2/m".arg(base.costPerMeter.toFixed(2)).arg(base.currency)
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
height: parent.rowHeight
|
||||
}
|
||||
|
||||
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height; visible: unlinkMaterialButton.visible }
|
||||
Label
|
||||
{
|
||||
width: 2 * scrollView.columnWidth
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
text: catalog.i18nc("@label", "This material is linked to %1 and shares some of its properties.").arg(base.linkedMaterialNames)
|
||||
wrapMode: Text.WordWrap
|
||||
visible: unlinkMaterialButton.visible
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: unlinkMaterialButton
|
||||
text: catalog.i18nc("@label", "Unlink Material")
|
||||
visible: base.linkedMaterialNames != ""
|
||||
onClicked:
|
||||
{
|
||||
Cura.ContainerManager.unlinkMaterial(base.containerId)
|
||||
base.reevaluateLinkedMaterials = true
|
||||
}
|
||||
}
|
||||
|
||||
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height }
|
||||
|
||||
Label { width: parent.width; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Description") }
|
||||
|
|
@ -203,7 +247,7 @@ TabView
|
|||
ReadOnlyTextArea
|
||||
{
|
||||
text: properties.description;
|
||||
width: base.firstColumnWidth + base.secondColumnWidth
|
||||
width: 2 * scrollView.columnWidth
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readOnly: !base.editingEnabled;
|
||||
|
|
@ -216,13 +260,15 @@ TabView
|
|||
ReadOnlyTextArea
|
||||
{
|
||||
text: properties.adhesion_info;
|
||||
width: base.firstColumnWidth + base.secondColumnWidth
|
||||
width: 2 * scrollView.columnWidth
|
||||
wrapMode: Text.WordWrap
|
||||
|
||||
readOnly: !base.editingEnabled;
|
||||
|
||||
onEditingFinished: base.setMetaDataEntry("adhesion_info", properties.adhesion_info, text)
|
||||
}
|
||||
|
||||
Item { width: parent.width; height: UM.Theme.getSize("default_margin").height }
|
||||
}
|
||||
|
||||
function updateCostPerMeter()
|
||||
|
|
@ -266,8 +312,10 @@ TabView
|
|||
{
|
||||
id: label
|
||||
width: base.firstColumnWidth;
|
||||
height: spinBox.height
|
||||
height: spinBox.height + UM.Theme.getSize("default_lining").height
|
||||
text: model.label
|
||||
elide: Text.ElideRight
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
}
|
||||
ReadOnlySpinBox
|
||||
{
|
||||
|
|
@ -380,6 +428,7 @@ TabView
|
|||
Cura.ContainerManager.setContainerName(base.containerId, new_value);
|
||||
// update material name label. not so pretty, but it works
|
||||
materialProperties.name = new_value;
|
||||
pane.objectList.currentIndex = pane.getIndexById(base.containerId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ UM.ManagementPage
|
|||
|
||||
title: catalog.i18nc("@title:tab", "Materials");
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
// Workaround to make sure all of the items are visible
|
||||
objectList.positionViewAtBeginning();
|
||||
}
|
||||
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter:
|
||||
|
|
@ -81,6 +87,7 @@ UM.ManagementPage
|
|||
anchors.fill: parent;
|
||||
onClicked:
|
||||
{
|
||||
forceActiveFocus();
|
||||
if(!parent.ListView.isCurrentItem)
|
||||
{
|
||||
parent.ListView.view.currentIndex = index;
|
||||
|
|
@ -91,9 +98,11 @@ UM.ManagementPage
|
|||
}
|
||||
|
||||
activeId: Cura.MachineManager.activeMaterialId
|
||||
activeIndex: {
|
||||
activeIndex: getIndexById(activeId)
|
||||
function getIndexById(material_id)
|
||||
{
|
||||
for(var i = 0; i < model.rowCount(); i++) {
|
||||
if (model.getItem(i).id == Cura.MachineManager.activeMaterialId) {
|
||||
if (model.getItem(i).id == material_id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
@ -135,6 +144,24 @@ UM.ManagementPage
|
|||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Create")
|
||||
iconName: "list-add"
|
||||
onClicked:
|
||||
{
|
||||
var material_id = Cura.ContainerManager.createMaterial()
|
||||
if(material_id == "")
|
||||
{
|
||||
return
|
||||
}
|
||||
if(Cura.MachineManager.hasMaterials)
|
||||
{
|
||||
Cura.MachineManager.setActiveMaterial(material_id)
|
||||
}
|
||||
base.objectList.currentIndex = base.getIndexById(material_id);
|
||||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Duplicate");
|
||||
iconName: "list-add";
|
||||
|
|
@ -152,6 +179,7 @@ UM.ManagementPage
|
|||
{
|
||||
Cura.MachineManager.setActiveMaterial(material_id)
|
||||
}
|
||||
base.objectList.currentIndex = base.getIndexById(material_id);
|
||||
}
|
||||
},
|
||||
Button
|
||||
|
|
@ -206,6 +234,8 @@ UM.ManagementPage
|
|||
|
||||
properties: materialProperties
|
||||
containerId: base.currentItem != null ? base.currentItem.id : ""
|
||||
|
||||
property alias pane: base
|
||||
}
|
||||
|
||||
QtObject
|
||||
|
|
@ -251,6 +281,10 @@ UM.ManagementPage
|
|||
{
|
||||
Cura.ContainerManager.removeContainer(containers[i])
|
||||
}
|
||||
if(base.objectList.currentIndex > 0)
|
||||
{
|
||||
base.objectList.currentIndex--;
|
||||
}
|
||||
currentItem = base.model.getItem(base.objectList.currentIndex) // Refresh the current item.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,17 +45,4 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
visible: base.readOnly
|
||||
text: textArea.text
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: textArea.__style ? textArea.__style.textMargin : 4
|
||||
|
||||
color: palette.buttonText
|
||||
}
|
||||
|
||||
SystemPalette { id: palette }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue