mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 10:15:54 +08:00
Move quality profile, material and print core to it's new location
CURA-4147
This commit is contained in:
parent
b74c09dec8
commit
7978b0efe9
@ -202,12 +202,95 @@ Rectangle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: globalProfileRow
|
||||||
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
|
visible: !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
top: settingsModeSelection.bottom
|
||||||
|
topMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
}
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
id: globalProfileLabel
|
||||||
|
text: catalog.i18nc("@label","Profile:");
|
||||||
|
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||||
|
font: UM.Theme.getFont("default");
|
||||||
|
color: UM.Theme.getColor("text");
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton
|
||||||
|
{
|
||||||
|
id: globalProfileSelection
|
||||||
|
|
||||||
|
text: {
|
||||||
|
var result = Cura.MachineManager.activeQualityName;
|
||||||
|
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||||
|
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">";
|
||||||
|
result += " - ";
|
||||||
|
result += Cura.MachineManager.activeQualityLayerHeight + "mm";
|
||||||
|
result += "</font>";
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||||
|
|
||||||
|
width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width
|
||||||
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
anchors.right: parent.right
|
||||||
|
tooltip: Cura.MachineManager.activeQualityName
|
||||||
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
|
activeFocusOnPress: true;
|
||||||
|
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
||||||
|
menu: ProfileMenu { }
|
||||||
|
|
||||||
|
UM.SimpleButton
|
||||||
|
{
|
||||||
|
id: customisedSettings
|
||||||
|
|
||||||
|
visible: Cura.MachineManager.hasUserSettings
|
||||||
|
height: parent.height * 0.6
|
||||||
|
width: parent.height * 0.6
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
|
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||||
|
iconSource: UM.Theme.getIcon("star");
|
||||||
|
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
Cura.Actions.manageProfiles.trigger()
|
||||||
|
}
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
|
var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.")
|
||||||
|
base.showTooltip(globalProfileRow, Qt.point(- UM.Theme.getSize("default_margin").width, 0), content)
|
||||||
|
}
|
||||||
|
onExited: base.hideTooltip()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StackView
|
StackView
|
||||||
{
|
{
|
||||||
id: sidebarContents
|
id: sidebarContents
|
||||||
|
|
||||||
anchors.bottom: footerSeparator.top
|
anchors.bottom: footerSeparator.top
|
||||||
anchors.top: settingsModeSelection.bottom
|
anchors.top: globalProfileRow.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.left: base.left
|
anchors.left: base.left
|
||||||
anchors.right: base.right
|
anchors.right: base.right
|
||||||
|
@ -15,6 +15,7 @@ Column
|
|||||||
id: base;
|
id: base;
|
||||||
|
|
||||||
property int currentExtruderIndex: ExtruderManager.activeExtruderIndex;
|
property int currentExtruderIndex: ExtruderManager.activeExtruderIndex;
|
||||||
|
property bool currentExtruderVisible: extrudersList.visible;
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").height
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
@ -159,12 +160,12 @@ Column
|
|||||||
visible: !extruderSelectionRow.visible
|
visible: !extruderSelectionRow.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Print core row
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: variantRow
|
id: printCoreRow
|
||||||
|
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
|
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
@ -176,100 +177,51 @@ Column
|
|||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
id: variantLabel
|
id: printCoreLabel
|
||||||
width: parent.width * 0.30
|
text: Cura.MachineManager.activeDefinitionVariantsName;
|
||||||
|
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: variantRow.left
|
|
||||||
|
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: materialInfoButton
|
|
||||||
height: parent.height * 0.60
|
|
||||||
width: height
|
|
||||||
|
|
||||||
anchors.right: materialVariantContainer.left
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
visible: extrudersList.visible
|
|
||||||
|
|
||||||
text: "i"
|
|
||||||
style: UM.Theme.styles.info_button
|
|
||||||
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
// open the material URL with web browser
|
|
||||||
var version = UM.Application.version;
|
|
||||||
var machineName = Cura.MachineManager.activeMachine.definition.id;
|
|
||||||
|
|
||||||
var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName;
|
|
||||||
Qt.openUrlExternally(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
onHoveredChanged:
|
|
||||||
{
|
|
||||||
if (hovered)
|
|
||||||
{
|
|
||||||
var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com.");
|
|
||||||
base.showTooltip(
|
|
||||||
extruderSelectionRow, Qt.point(0, extruderSelectionRow.height + variantRow.height / 2), catalog.i18nc("@tooltip", content)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
base.hideTooltip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: materialVariantContainer
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: variantSelection
|
id: printCoreSelection
|
||||||
text: Cura.MachineManager.activeVariantName
|
text: Cura.MachineManager.activeVariantName
|
||||||
tooltip: Cura.MachineManager.activeVariantName;
|
tooltip: Cura.MachineManager.activeVariantName;
|
||||||
visible: Cura.MachineManager.hasVariants
|
visible: Cura.MachineManager.hasVariants
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width
|
width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width
|
||||||
anchors.left: parent.left
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
|
||||||
menu: NozzleMenu { extruderIndex: base.currentExtruderIndex }
|
menu: NozzleMenu { extruderIndex: base.currentExtruderIndex }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//Material Row
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: materialRow
|
||||||
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
|
visible: Cura.MachineManager.hasMaterials && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
}
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
id: materialLabel
|
||||||
|
text: catalog.i18nc("@label","Material");
|
||||||
|
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||||
|
font: UM.Theme.getFont("default");
|
||||||
|
color: UM.Theme.getColor("text");
|
||||||
|
}
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
id: materialSelection
|
id: materialSelection
|
||||||
@ -294,7 +246,7 @@ Column
|
|||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width
|
width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
@ -302,13 +254,12 @@ Column
|
|||||||
menu: MaterialMenu { extruderIndex: base.currentExtruderIndex }
|
menu: MaterialMenu { extruderIndex: base.currentExtruderIndex }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//Material info row
|
||||||
|
Item
|
||||||
Row
|
|
||||||
{
|
{
|
||||||
id: globalProfileRow
|
id: materialInfoRow
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
visible: !sidebar.monitoringPrint && !sidebar.hideSettings
|
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
@ -318,65 +269,69 @@ Column
|
|||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
|
anchors.right: parent.right
|
||||||
|
width: parent.width * 0.7 + UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
id: globalProfileLabel
|
id: materialInfoLabel
|
||||||
text: catalog.i18nc("@label","Profile:");
|
wrapMode: Text.WordWrap
|
||||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
text: catalog.i18nc("@label","Check material compability");
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
ToolButton
|
color:
|
||||||
{
|
{
|
||||||
id: globalProfileSelection
|
if (! Cura.MachineManager.isActiveQualitySupported)
|
||||||
text: {
|
UM.Theme.getColor("setting_validation_error");
|
||||||
var result = Cura.MachineManager.activeQualityName;
|
else
|
||||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
UM.Theme.getColor("text");
|
||||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">";
|
|
||||||
result += " - ";
|
|
||||||
result += Cura.MachineManager.activeQualityLayerHeight + "mm";
|
|
||||||
result += "</font>";
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
|
||||||
|
|
||||||
width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width
|
MouseArea
|
||||||
height: UM.Theme.getSize("setting_control").height
|
|
||||||
tooltip: Cura.MachineManager.activeQualityName
|
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
|
||||||
activeFocusOnPress: true;
|
|
||||||
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
|
||||||
menu: ProfileMenu { }
|
|
||||||
|
|
||||||
UM.SimpleButton
|
|
||||||
{
|
{
|
||||||
id: customisedSettings
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
visible: Cura.MachineManager.hasUserSettings
|
|
||||||
height: parent.height * 0.6
|
|
||||||
width: parent.height * 0.6
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("default_margin").width
|
|
||||||
|
|
||||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
|
||||||
iconSource: UM.Theme.getIcon("star");
|
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus();
|
// open the material URL with web browser
|
||||||
Cura.Actions.manageProfiles.trigger()
|
var version = UM.Application.version;
|
||||||
|
var machineName = Cura.MachineManager.activeMachine.definition.id;
|
||||||
|
|
||||||
|
var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName;
|
||||||
|
Qt.openUrlExternally(url);
|
||||||
}
|
}
|
||||||
onEntered:
|
onEntered:
|
||||||
{
|
{
|
||||||
var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.")
|
|
||||||
base.showTooltip(globalProfileRow, Qt.point(0, globalProfileRow.height / 2), content)
|
var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com.");
|
||||||
|
base.showTooltip(
|
||||||
|
materialInfoRow,
|
||||||
|
Qt.point(- UM.Theme.getSize("default_margin").width,0),
|
||||||
|
catalog.i18nc("@tooltip", content)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
onExited: base.hideTooltip()
|
onExited:base.hideTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UM.RecolorImage
|
||||||
|
{
|
||||||
|
id: warningImage
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.Bottom
|
||||||
|
source: UM.Theme.getIcon("warning")
|
||||||
|
width: UM.Theme.getSize("section_icon").width
|
||||||
|
height: UM.Theme.getSize("section_icon").height
|
||||||
|
//sourceSize.width: width + 5
|
||||||
|
//sourceSize.height: width + 5
|
||||||
|
|
||||||
|
color: UM.Theme.getColor("setting_control_text")
|
||||||
|
visible: ! Cura.MachineManager.isActiveQualitySupported
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user