mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 03:19:04 +08:00
Display all the extruder settings and global settings in profile manager
Contributes to CURA-2006
This commit is contained in:
parent
03252c69dc
commit
975a60bec3
33
resources/qml/Preferences/ProfileTab.qml
Normal file
33
resources/qml/Preferences/ProfileTab.qml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// Copyright (c) 2015 Ultimaker B.V.
|
||||||
|
// Uranium 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") }
|
||||||
|
TableViewColumn { role: "profile_value"; title: catalog.i18nc("@title:column", "Profile Value"); }
|
||||||
|
TableViewColumn { role: "user_value"; title: catalog.i18nc("@title:column", "User Value"); visible: quality == Cura.MachineManager.activeQualityId }
|
||||||
|
TableViewColumn { role: "unit"; title: catalog.i18nc("@title:column", "Unit") }
|
||||||
|
|
||||||
|
section.property: "category"
|
||||||
|
section.delegate: Label { text: section }
|
||||||
|
|
||||||
|
model: Cura.QualitySettingsModel { extruderId: base.extruderId != "" ? base.extruderId : null; quality: base.quality; material: base.material }
|
||||||
|
}
|
||||||
|
}
|
@ -187,70 +187,21 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
TabView
|
||||||
id: scrollView
|
{
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top
|
anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
ListView {
|
ProfileTab { title: catalog.i18nc("@title:tab", "Global Settings"); quality: base.currentItem != null ? base.currentItem.id : ""; material: Cura.MachineManager.allActiveMaterialIds.global }
|
||||||
model: Cura.ContainerSettingsModel{ containers:
|
|
||||||
{
|
Repeater
|
||||||
if (!currentItem) {
|
{
|
||||||
return []
|
model: Cura.ExtrudersModel { }
|
||||||
} else if (currentItem.id == Cura.MachineManager.activeQualityId) {
|
|
||||||
return [base.currentItem.id, Cura.MachineManager.activeUserProfileId]
|
ProfileTab { title: model.name; extruderId: model.id; quality: base.currentItem.id; material: Cura.MachineManager.allActiveMaterialIds[model.id] }
|
||||||
} 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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user