mirror of
https://github.com/Ultimaker/Cura.git
synced 2026-02-15 08:59:32 -07:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
601fdf51fc
7 changed files with 64 additions and 34 deletions
|
|
@ -674,6 +674,7 @@ class ContainerManager(QObject):
|
|||
global_changes_id = new_unique_id
|
||||
new_change_instances.append(new_container)
|
||||
self._container_registry.addContainer(new_container)
|
||||
profile_index += 1
|
||||
|
||||
return new_change_instances
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
|||
LabelRole = Qt.UserRole + 2
|
||||
UnitRole = Qt.UserRole + 3
|
||||
ProfileValueRole = Qt.UserRole + 4
|
||||
UserValueRole = Qt.UserRole + 5
|
||||
CategoryRole = Qt.UserRole + 6
|
||||
ProfileValueSourceRole = Qt.UserRole + 5
|
||||
UserValueRole = Qt.UserRole + 6
|
||||
CategoryRole = Qt.UserRole + 7
|
||||
|
||||
def __init__(self, parent = None):
|
||||
super().__init__(parent = parent)
|
||||
|
|
@ -33,6 +34,7 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
|||
self.addRoleName(self.LabelRole, "label")
|
||||
self.addRoleName(self.UnitRole, "unit")
|
||||
self.addRoleName(self.ProfileValueRole, "profile_value")
|
||||
self.addRoleName(self.ProfileValueSourceRole, "profile_value_source")
|
||||
self.addRoleName(self.UserValueRole, "user_value")
|
||||
self.addRoleName(self.CategoryRole, "category")
|
||||
|
||||
|
|
@ -170,9 +172,11 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
|||
continue
|
||||
|
||||
profile_value = None
|
||||
profile_value_source = ""
|
||||
for container in containers:
|
||||
new_value = container.getProperty(definition.key, "value")
|
||||
if new_value is not None:
|
||||
profile_value_source = container.getMetaDataEntry("type")
|
||||
profile_value = new_value
|
||||
|
||||
user_value = None
|
||||
|
|
@ -201,6 +205,7 @@ class QualitySettingsModel(UM.Qt.ListModel.ListModel):
|
|||
"label": definition.label,
|
||||
"unit": definition.unit,
|
||||
"profile_value": "" if profile_value is None else str(profile_value), # it is for display only
|
||||
"profile_value_source": profile_value_source,
|
||||
"user_value": "" if user_value is None else str(user_value),
|
||||
"category": current_category
|
||||
})
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ msgstr "Arayüz yükleniyor..."
|
|||
#, python-format
|
||||
msgctxt "@info"
|
||||
msgid "%(width).1f x %(depth).1f x %(height).1f mm"
|
||||
msgstr "%(genişlik).1f x %(derinlik).1f x %(yükseklik).1f mm"
|
||||
msgstr "%(width).1f x %(depth).1f x %(height).1f mm"
|
||||
|
||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:27
|
||||
msgctxt "@title"
|
||||
|
|
|
|||
|
|
@ -90,13 +90,14 @@ UM.PreferencesPage
|
|||
id: languageList
|
||||
|
||||
Component.onCompleted: {
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "English"), code: "en" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "Finnish"), code: "fi" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "French"), code: "fr" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "German"), code: "de" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "Italian"), code: "it" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "Dutch"), code: "nl" })
|
||||
append({ text: catalog.i18nc("@item:inlistbox", "Spanish"), code: "es" })
|
||||
append({ text: "English", code: "en" })
|
||||
append({ text: "Deutsch", code: "de" })
|
||||
append({ text: "Español", code: "es" })
|
||||
append({ text: "Suomi", code: "fi" })
|
||||
append({ text: "Français", code: "fr" })
|
||||
append({ text: "Italiano", code: "it" })
|
||||
append({ text: "Nederlands", code: "nl" })
|
||||
append({ text: "Türkçe", code: "tr" })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,26 @@ Tab
|
|||
role: "profile_value"
|
||||
title: catalog.i18nc("@title:column", "Profile")
|
||||
width: parent.width * 0.18
|
||||
delegate: Rectangle
|
||||
{
|
||||
property var setting: qualitySettings.getItem(styleData.row)
|
||||
height: childrenRect.height
|
||||
color: "transparent"
|
||||
width: (parent != null) ? parent.width : 0
|
||||
Label
|
||||
{
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: parent.right
|
||||
text: styleData.value
|
||||
font.weight: (setting.profile_value_source == "quality_changes") ? Font.Bold : Font.Normal
|
||||
font.strikeout: quality == Cura.MachineManager.activeQualityId && setting.user_value != ""
|
||||
opacity: font.strikeout ? 0.5 : 1
|
||||
color: styleData.textColor
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
TableViewColumn
|
||||
{
|
||||
|
|
@ -56,10 +76,13 @@ Tab
|
|||
|
||||
model: Cura.QualitySettingsModel
|
||||
{
|
||||
id: qualitySettings
|
||||
extruderId: base.extruderId
|
||||
extruderDefinition: base.extruderDefinition
|
||||
quality: base.quality != null ? base.quality : ""
|
||||
material: base.material != null ? base.material : ""
|
||||
}
|
||||
|
||||
SystemPalette { id: palette }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,34 +87,32 @@ SettingItem
|
|||
}
|
||||
|
||||
onActivated: { forceActiveFocus(); propertyProvider.setPropertyValue("value", definition.options[index].key) }
|
||||
onModelChanged: updateCurrentIndex();
|
||||
|
||||
Connections
|
||||
Binding
|
||||
{
|
||||
target: propertyProvider
|
||||
onPropertiesChanged: control.updateCurrentIndex()
|
||||
}
|
||||
|
||||
function updateCurrentIndex() {
|
||||
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||
var value;
|
||||
if ((propertyProvider.properties.resolve != "None") && (stackLevel != 0) && (stackLevel != 1)) {
|
||||
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||
// we have to choose between the resolved value (default) and the global value
|
||||
// (if user has explicitly set this).
|
||||
value = propertyProvider.properties.resolve;
|
||||
} else {
|
||||
value = propertyProvider.properties.value;
|
||||
}
|
||||
|
||||
for(var i = 0; i < definition.options.length; ++i) {
|
||||
if(definition.options[i].key == value) {
|
||||
currentIndex = i;
|
||||
return;
|
||||
target: control
|
||||
property: "currentIndex"
|
||||
value:
|
||||
{
|
||||
// FIXME this needs to go away once 'resolve' is combined with 'value' in our data model.
|
||||
var value;
|
||||
if ((propertyProvider.properties.resolve != "None") && (base.stackLevel != 0) && (base.stackLevel != 1)) {
|
||||
// We have a resolve function. Indicates that the setting is not settable per extruder and that
|
||||
// we have to choose between the resolved value (default) and the global value
|
||||
// (if user has explicitly set this).
|
||||
value = propertyProvider.properties.resolve;
|
||||
} else {
|
||||
value = propertyProvider.properties.value;
|
||||
}
|
||||
}
|
||||
|
||||
currentIndex = -1;
|
||||
for(var i = 0; i < control.model.length; ++i) {
|
||||
if(control.model[i].key == value) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,6 +137,8 @@ ScrollView
|
|||
key: model.key ? model.key : ""
|
||||
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ]
|
||||
storeIndex: 0
|
||||
// Due to the way setPropertyValue works, removeUnusedValue gives the correct output in case of resolve
|
||||
removeUnusedValue: model.resolve == undefined
|
||||
}
|
||||
|
||||
Connections
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue