Merge branch 'master' into CURA-8640_PyQt6

# Conflicts:
#	cura/CuraApplication.py
#	resources/qml/Preferences/Materials/MaterialsSyncDialog.qml
#	resources/qml/Preferences/Materials/MaterialsView.qml
This commit is contained in:
Jelle Spijker 2022-03-24 11:53:44 +01:00
commit 3f8907d02a
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
582 changed files with 8061 additions and 9724 deletions

View file

@ -34,7 +34,7 @@ Build scripts
------------- -------------
Please check out [cura-build](https://github.com/Ultimaker/cura-build) for detailed building instructions. Please check out [cura-build](https://github.com/Ultimaker/cura-build) for detailed building instructions.
If you want to build the entire environment from scratch before building Cura as well, [cura-build-environment](https://github.com/Ultimaker/cura-build) might be a starting point before cura-build. (Again, see cura-build for more details.) If you want to build the entire environment from scratch before building Cura as well, [cura-build-environment](https://github.com/Ultimaker/cura-build-environment) might be a starting point before cura-build. (Again, see cura-build for more details.)
Running from Source Running from Source
------------- -------------

5
SECURITY.md Normal file
View file

@ -0,0 +1,5 @@
# Reporting vulnerabilities
If you discover a vulnerability, please let us know as soon as possible via`security@ultimaker.com`.
Please do not take advantage of the vulnerability and do not reveal the problem to others.
To allow us to resolve the issue, please do provide us with sufficient information to reproduce the problem.

View file

@ -1113,7 +1113,8 @@ class BuildVolume(SceneNode):
# Use brim width if brim is enabled OR the prime tower has a brim. # Use brim width if brim is enabled OR the prime tower has a brim.
if adhesion_type == "brim": if adhesion_type == "brim":
brim_line_count = skirt_brim_stack.getProperty("brim_line_count", "value") brim_line_count = skirt_brim_stack.getProperty("brim_line_count", "value")
bed_adhesion_size = skirt_brim_line_width * brim_line_count * initial_layer_line_width_factor / 100.0 brim_gap = skirt_brim_stack.getProperty("brim_gap", "value")
bed_adhesion_size = brim_gap + skirt_brim_line_width * brim_line_count * initial_layer_line_width_factor / 100.0
for extruder_stack in used_extruders: for extruder_stack in used_extruders:
bed_adhesion_size += extruder_stack.getProperty("skirt_brim_line_width", "value") * extruder_stack.getProperty("initial_layer_line_width_factor", "value") / 100.0 bed_adhesion_size += extruder_stack.getProperty("skirt_brim_line_width", "value") * extruder_stack.getProperty("initial_layer_line_width_factor", "value") / 100.0
@ -1214,7 +1215,7 @@ class BuildVolume(SceneNode):
return max(min(value, max_value), min_value) return max(min(value, max_value), min_value)
_machine_settings = ["machine_width", "machine_depth", "machine_height", "machine_shape", "machine_center_is_zero"] _machine_settings = ["machine_width", "machine_depth", "machine_height", "machine_shape", "machine_center_is_zero"]
_skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "initial_layer_line_width_factor"] _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_gap", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "initial_layer_line_width_factor"]
_raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_layers", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap", "layer_0_z_overlap"] _raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_layers", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap", "layer_0_z_overlap"]
_extra_z_settings = ["retraction_hop_enabled", "retraction_hop"] _extra_z_settings = ["retraction_hop_enabled", "retraction_hop"]
_prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "prime_blob_enable"] _prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "prime_blob_enable"]

View file

@ -1,4 +1,4 @@
# Copyright (c) 2021 Ultimaker B.V. # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
import enum import enum
import os import os
@ -43,7 +43,7 @@ from UM.Scene.Selection import Selection
from UM.Scene.ToolHandle import ToolHandle from UM.Scene.ToolHandle import ToolHandle
from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.InstanceContainer import InstanceContainer
from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType, toIntConversion
from UM.Settings.SettingFunction import SettingFunction from UM.Settings.SettingFunction import SettingFunction
from UM.Settings.Validator import Validator from UM.Settings.Validator import Validator
from UM.View.SelectionPass import SelectionPass # For typing. from UM.View.SelectionPass import SelectionPass # For typing.
@ -382,11 +382,12 @@ class CuraApplication(QtApplication):
SettingDefinition.addSupportedProperty("resolve", DefinitionPropertyType.Function, default=None, SettingDefinition.addSupportedProperty("resolve", DefinitionPropertyType.Function, default=None,
depends_on="value") depends_on="value")
SettingDefinition.addSettingType("extruder", None, str, Validator) SettingDefinition.addSettingType("extruder", None, toIntConversion, Validator)
SettingDefinition.addSettingType("optional_extruder", None, str, None) SettingDefinition.addSettingType("optional_extruder", None, toIntConversion, None)
SettingDefinition.addSettingType("[int]", None, str, None) SettingDefinition.addSettingType("[int]", None, str, None)
def _initializeSettingFunctions(self): def _initializeSettingFunctions(self):
"""Adds custom property types, settings types, and extra operators (functions). """Adds custom property types, settings types, and extra operators (functions).

View file

@ -1,4 +1,4 @@
# Copyright (c) 2020 Ultimaker B.V. # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
from PyQt6.QtCore import pyqtProperty, pyqtSignal, Qt from PyQt6.QtCore import pyqtProperty, pyqtSignal, Qt
@ -9,6 +9,7 @@ from UM import i18nCatalog
from UM.Logger import Logger from UM.Logger import Logger
from UM.Qt.ListModel import ListModel from UM.Qt.ListModel import ListModel
from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.SettingFunction import SettingFunction # To format setting functions differently.
import os import os
@ -173,12 +174,22 @@ class QualitySettingsModel(ListModel):
label = definition.label label = definition.label
if self._i18n_catalog: if self._i18n_catalog:
label = self._i18n_catalog.i18nc(definition.key + " label", label) label = self._i18n_catalog.i18nc(definition.key + " label", label)
if profile_value_source == "quality_changes":
label = f"<i>{label}</i>" # Make setting name italic if it's derived from the quality-changes profile.
if isinstance(profile_value, SettingFunction):
if self._i18n_catalog:
profile_value_display = self._i18n_catalog.i18nc("@info:status", "Calculated")
else:
profile_value_display = "Calculated"
else:
profile_value_display = "" if profile_value is None else str(profile_value)
items.append({ items.append({
"key": definition.key, "key": definition.key,
"label": label, "label": label,
"unit": definition.unit, "unit": definition.unit,
"profile_value": "" if profile_value is None else str(profile_value), # it is for display only "profile_value": profile_value_display,
"profile_value_source": profile_value_source, "profile_value_source": profile_value_source,
"user_value": "" if user_value is None else str(user_value), "user_value": "" if user_value is None else str(user_value),
"category": current_category "category": current_category

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
UM.Dialog UM.Dialog
@ -19,9 +19,7 @@ UM.Dialog
width: minimumWidth width: minimumWidth
height: Math.max(dialogSummaryItem.height + 2 * buttonsItem.height, minimumHeight) // 2 * button height to also have some extra space around the button relative to the button size height: Math.max(dialogSummaryItem.height + 2 * buttonsItem.height, minimumHeight) // 2 * button height to also have some extra space around the button relative to the button size
property int comboboxHeight: 15 * screenScaleFactor property int comboboxHeight: UM.Theme.getSize("default_margin").height
property int spacerHeight: 10 * screenScaleFactor
property int doubleSpacerHeight: 20 * screenScaleFactor
onClosing: manager.notifyClosed() onClosing: manager.notifyClosed()
onVisibleChanged: onVisibleChanged:
@ -46,10 +44,6 @@ UM.Dialog
id: catalog id: catalog
name: "cura" name: "cura"
} }
SystemPalette
{
id: palette
}
ListModel ListModel
{ {
@ -68,45 +62,39 @@ UM.Dialog
{ {
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
spacing: 2 * screenScaleFactor spacing: UM.Theme.getSize("default_margin").height
Label
Column
{ {
id: titleLabel
text: catalog.i18nc("@action:title", "Summary - Cura Project")
font.pointSize: 18
}
Rectangle
{
id: separator
color: palette.text
width: parent.width width: parent.width
height: 1 height: cildrenRect.height
}
Item // Spacer UM.Label
{ {
height: doubleSpacerHeight id: titleLabel
width: height text: catalog.i18nc("@action:title", "Summary - Cura Project")
font: UM.Theme.getFont("large")
}
Rectangle
{
id: separator
color: UM.Theme.getColor("text")
width: parent.width
height: UM.Theme.getSize("default_lining").height
}
} }
Row Item
{ {
height: childrenRect.height
width: parent.width width: parent.width
Label height: childrenRect.height
{
text: catalog.i18nc("@action:label", "Printer settings")
font.bold: true
width: (parent.width / 3) | 0
}
Item
{
// spacer
height: spacerHeight
width: (parent.width / 3) | 0
}
UM.TooltipArea UM.TooltipArea
{ {
id: machineResolveStrategyTooltip id: machineResolveStrategyTooltip
anchors.top: parent.top
anchors.right: parent.right
width: (parent.width / 3) | 0 width: (parent.width / 3) | 0
height: visible ? comboboxHeight : 0 height: visible ? comboboxHeight : 0
visible: base.visible && machineResolveComboBox.model.count > 1 visible: base.visible && machineResolveComboBox.model.count > 1
@ -157,64 +145,65 @@ UM.Dialog
} }
} }
} }
}
Row Column
{
width: parent.width
height: childrenRect.height
Label
{ {
text: catalog.i18nc("@action:label", "Type") width: parent.width
width: (parent.width / 3) | 0 height: cildrenRect.height
}
Label UM.Label
{ {
text: manager.machineType id: printer_settings_label
width: (parent.width / 3) | 0 text: catalog.i18nc("@action:label", "Printer settings")
font: UM.Theme.getFont("default_bold")
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Type")
width: (parent.width / 3) | 0
}
UM.Label
{
text: manager.machineType
width: (parent.width / 3) | 0
}
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name")
width: (parent.width / 3) | 0
}
UM.Label
{
text: manager.machineName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
} }
} }
Row Item
{ {
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name")
width: (parent.width / 3) | 0
}
Label
{
text: manager.machineName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
Item // Spacer
{
height: doubleSpacerHeight
width: height
}
Row
{
height: childrenRect.height
width: parent.width
Label
{
text: catalog.i18nc("@action:label", "Profile settings")
font.bold: true
width: (parent.width / 3) | 0
}
Item
{
// spacer
height: spacerHeight
width: (parent.width / 3) | 0
}
UM.TooltipArea UM.TooltipArea
{ {
id: qualityChangesResolveTooltip anchors.right: parent.right
anchors.top: parent.top
width: (parent.width / 3) | 0 width: (parent.width / 3) | 0
height: visible ? comboboxHeight : 0 height: visible ? comboboxHeight : 0
visible: manager.qualityChangesConflict visible: manager.qualityChangesConflict
@ -232,96 +221,105 @@ UM.Dialog
} }
} }
} }
Column
{
width: parent.width
height: cildrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Profile settings")
font: UM.Theme.getFont("default_bold")
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Name")
width: (parent.width / 3) | 0
}
UM.Label
{
text: manager.qualityName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Intent")
width: (parent.width / 3) | 0
}
UM.Label
{
text: manager.intentName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Not in profile")
visible: manager.numUserSettings != 0
width: (parent.width / 3) | 0
}
UM.Label
{
text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
visible: manager.numUserSettings != 0
width: (parent.width / 3) | 0
}
}
Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Derivative from")
visible: manager.numSettingsOverridenByQualityChanges != 0
width: (parent.width / 3) | 0
}
UM.Label
{
text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges)
width: (parent.width / 3) | 0
visible: manager.numSettingsOverridenByQualityChanges != 0
wrapMode: Text.WordWrap
}
}
}
} }
Row
Item
{ {
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", "Name")
width: (parent.width / 3) | 0
}
Label
{
text: manager.qualityName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
Row
{
width: parent.width
height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", "Intent")
width: (parent.width / 3) | 0
}
Label
{
text: manager.intentName
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
Row
{
width: parent.width
height: manager.numUserSettings != 0 ? childrenRect.height : 0
Label
{
text: catalog.i18nc("@action:label", "Not in profile")
width: (parent.width / 3) | 0
}
Label
{
text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings)
width: (parent.width / 3) | 0
}
visible: manager.numUserSettings != 0
}
Row
{
width: parent.width
height: manager.numSettingsOverridenByQualityChanges != 0 ? childrenRect.height : 0
Label
{
text: catalog.i18nc("@action:label", "Derivative from")
width: (parent.width / 3) | 0
}
Label
{
text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges)
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
visible: manager.numSettingsOverridenByQualityChanges != 0
}
Item // Spacer
{
height: doubleSpacerHeight
width: height
}
Row
{
height: childrenRect.height
width: parent.width
Label
{
text: catalog.i18nc("@action:label", "Material settings")
font.bold: true
width: (parent.width / 3) | 0
}
Item
{
// spacer
height: spacerHeight
width: (parent.width / 3) | 0
}
UM.TooltipArea UM.TooltipArea
{ {
id: materialResolveTooltip id: materialResolveTooltip
anchors.right: parent.right
anchors.top: parent.top
width: (parent.width / 3) | 0 width: (parent.width / 3) | 0
height: visible ? comboboxHeight : 0 height: visible ? comboboxHeight : 0
visible: manager.materialConflict visible: manager.materialConflict
@ -339,76 +337,91 @@ UM.Dialog
} }
} }
} }
Column
{
width: parent.width
height: cildrenRect.height
Row
{
height: childrenRect.height
width: parent.width
spacing: UM.Theme.getSize("narrow_margin").width
UM.Label
{
text: catalog.i18nc("@action:label", "Material settings")
font: UM.Theme.getFont("default_bold")
width: (parent.width / 3) | 0
}
}
Repeater
{
model: manager.materialLabels
delegate: Row
{
width: parent.width
height: childrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Name")
width: (parent.width / 3) | 0
}
UM.Label
{
text: modelData
width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
}
}
}
}
} }
Repeater Column
{ {
model: manager.materialLabels width: parent.width
delegate: Row height: cildrenRect.height
UM.Label
{
text: catalog.i18nc("@action:label", "Setting visibility")
font: UM.Theme.getFont("default_bold")
}
Row
{ {
width: parent.width width: parent.width
height: childrenRect.height height: childrenRect.height
Label UM.Label
{ {
text: catalog.i18nc("@action:label", "Name") text: catalog.i18nc("@action:label", "Mode")
width: (parent.width / 3) | 0 width: (parent.width / 3) | 0
} }
Label UM.Label
{ {
text: modelData text: manager.activeMode
width: (parent.width / 3) | 0
}
}
Row
{
width: parent.width
height: childrenRect.height
visible: manager.hasVisibleSettingsField
UM.Label
{
text: catalog.i18nc("@action:label", "Visible settings:")
width: (parent.width / 3) | 0
}
UM.Label
{
text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
width: (parent.width / 3) | 0 width: (parent.width / 3) | 0
wrapMode: Text.WordWrap
} }
} }
} }
Item // Spacer
{
height: doubleSpacerHeight
width: height
}
Label
{
text: catalog.i18nc("@action:label", "Setting visibility")
font.bold: true
}
Row
{
width: parent.width
height: childrenRect.height
Label
{
text: catalog.i18nc("@action:label", "Mode")
width: (parent.width / 3) | 0
}
Label
{
text: manager.activeMode
width: (parent.width / 3) | 0
}
}
Row
{
width: parent.width
height: childrenRect.height
visible: manager.hasVisibleSettingsField
Label
{
text: catalog.i18nc("@action:label", "Visible settings:")
width: (parent.width / 3) | 0
}
Label
{
text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings)
width: (parent.width / 3) | 0
}
}
Item // Spacer
{
height: spacerHeight
width: height
}
Row Row
{ {
width: parent.width width: parent.width
@ -418,12 +431,10 @@ UM.Dialog
{ {
width: warningLabel.height width: warningLabel.height
height: width height: width
source: UM.Theme.getIcon("Information") source: UM.Theme.getIcon("Information")
color: palette.text color: UM.Theme.getColor("text")
} }
Label UM.Label
{ {
id: warningLabel id: warningLabel
text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.") text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.")
@ -432,44 +443,22 @@ UM.Dialog
} }
} }
} }
Item
{ buttonSpacing: UM.Theme.getSize("default_margin").width
id: buttonsItem
width: parent.width rightButtons: [
height: childrenRect.height Cura.TertiaryButton
anchors.bottom: parent.bottom
anchors.right: parent.right
Button
{ {
id: cancel_button text: catalog.i18nc("@action:button", "Cancel")
text: catalog.i18nc("@action:button","Cancel"); onClicked: reject()
onClicked: { manager.onCancelButtonClicked() } },
enabled: true Cura.PrimaryButton
anchors.bottom: parent.bottom
anchors.right: ok_button.left
anchors.rightMargin: 2 * screenScaleFactor
}
Button
{ {
id: ok_button text: catalog.i18nc("@action:button", "Open")
anchors.right: parent.right onClicked: accept()
anchors.bottom: parent.bottom
text: catalog.i18nc("@action:button","Open");
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
} }
} ]
onRejected: manager.onCancelButtonClicked()
function accept() { onAccepted: manager.onOkButtonClicked()
manager.closeBackend();
manager.onOkButtonClicked();
base.visible = false;
base.accept();
}
function reject() {
manager.onCancelButtonClicked();
base.visible = false;
base.rejected();
}
} }

View file

@ -1,39 +1,34 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.1 as UM import UM 1.5 as UM
ScrollView ListView
{ {
property alias model: backupList.model
width: parent.width
clip: true clip: true
ListView ScrollBar.vertical: UM.ScrollBar {}
delegate: Item
{ {
id: backupList // Add a margin, otherwise the scrollbar is on top of the right most component
width: parent.width width: parent.width - UM.Theme.getSize("scrollbar").width
delegate: Item height: childrenRect.height
BackupListItem
{ {
// Add a margin, otherwise the scrollbar is on top of the right most component id: backupListItem
width: parent.width - UM.Theme.getSize("default_margin").width width: parent.width
height: childrenRect.height }
BackupListItem Rectangle
{ {
id: backupListItem id: divider
width: parent.width color: UM.Theme.getColor("lining")
} height: UM.Theme.getSize("default_lining").height
Rectangle
{
id: divider
color: UM.Theme.getColor("lining")
height: UM.Theme.getSize("default_lining").height
}
} }
} }
} }

View file

@ -1,12 +1,11 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.1
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Item Item
@ -42,28 +41,22 @@ Item
onClicked: backupListItem.showDetails = !backupListItem.showDetails onClicked: backupListItem.showDetails = !backupListItem.showDetails
} }
Label UM.Label
{ {
text: new Date(modelData.generated_time).toLocaleString(UM.Preferences.getValue("general/language")) text: new Date(modelData.generated_time).toLocaleString(UM.Preferences.getValue("general/language"))
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 100 * screenScaleFactor Layout.minimumWidth: 100 * screenScaleFactor
Layout.maximumWidth: 500 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: modelData.metadata.description text: modelData.metadata.description
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 100 * screenScaleFactor Layout.minimumWidth: 100 * screenScaleFactor
Layout.maximumWidth: 500 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Cura.SecondaryButton Cura.SecondaryButton
@ -94,21 +87,21 @@ Item
anchors.top: dataRow.bottom anchors.top: dataRow.bottom
} }
MessageDialog Cura.MessageDialog
{ {
id: confirmDeleteDialog id: confirmDeleteDialog
title: catalog.i18nc("@dialog:title", "Delete Backup") title: catalog.i18nc("@dialog:title", "Delete Backup")
text: catalog.i18nc("@dialog:info", "Are you sure you want to delete this backup? This cannot be undone.") text: catalog.i18nc("@dialog:info", "Are you sure you want to delete this backup? This cannot be undone.")
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: Dialog.Yes | Dialog.No
onYes: CuraDrive.deleteBackup(modelData.backup_id) onAccepted: CuraDrive.deleteBackup(modelData.backup_id)
} }
MessageDialog Cura.MessageDialog
{ {
id: confirmRestoreDialog id: confirmRestoreDialog
title: catalog.i18nc("@dialog:title", "Restore Backup") title: catalog.i18nc("@dialog:title", "Restore Backup")
text: catalog.i18nc("@dialog:info", "You will need to restart Cura before your backup is restored. Do you want to close Cura now?") text: catalog.i18nc("@dialog:info", "You will need to restart Cura before your backup is restored. Do you want to close Cura now?")
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: Dialog.Yes | Dialog.No
onYes: CuraDrive.restoreBackup(modelData.backup_id) onAccepted: CuraDrive.restoreBackup(modelData.backup_id)
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.3 as UM import UM 1.5 as UM
RowLayout RowLayout
{ {
@ -26,27 +26,21 @@ RowLayout
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
} }
Label UM.Label
{ {
id: detailName id: detailName
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: detailValue id: detailValue
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
Layout.minimumWidth: 50 * screenScaleFactor Layout.minimumWidth: 50 * screenScaleFactor
Layout.maximumWidth: 100 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor
Layout.fillWidth: true Layout.fillWidth: true
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
} }

View file

@ -5,7 +5,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
import "../components" import "../components"
@ -28,18 +28,14 @@ Column
width: Math.round(parent.width / 4) width: Math.round(parent.width / 4)
} }
Label UM.Label
{ {
id: welcomeTextLabel id: welcomeTextLabel
text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.") text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.")
width: Math.round(parent.width / 2) width: Math.round(parent.width / 2)
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Label.WordWrap wrapMode: Label.WordWrap
renderType: Text.NativeRendering
} }
Cura.PrimaryButton Cura.PrimaryButton

View file

@ -205,6 +205,13 @@ class StartSliceJob(Job):
# Get the objects in their groups to print. # Get the objects in their groups to print.
object_groups = [] object_groups = []
if stack.getProperty("print_sequence", "value") == "one_at_a_time": if stack.getProperty("print_sequence", "value") == "one_at_a_time":
modifier_mesh_nodes = []
for node in DepthFirstIterator(self._scene.getRoot()):
build_plate_number = node.callDecoration("getBuildPlateNumber")
if node.callDecoration("isNonPrintingMesh") and build_plate_number == self._build_plate_number:
modifier_mesh_nodes.append(node)
for node in OneAtATimeIterator(self._scene.getRoot()): for node in OneAtATimeIterator(self._scene.getRoot()):
temp_list = [] temp_list = []
@ -221,7 +228,7 @@ class StartSliceJob(Job):
temp_list.append(child_node) temp_list.append(child_node)
if temp_list: if temp_list:
object_groups.append(temp_list) object_groups.append(temp_list + modifier_mesh_nodes)
Job.yieldThread() Job.yieldThread()
if len(object_groups) == 0: if len(object_groups) == 0:
Logger.log("w", "No objects suitable for one at a time found, or no correct order found") Logger.log("w", "No objects suitable for one at a time found, or no correct order found")

View file

@ -1,10 +1,9 @@
// Copyright (C) 2021 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura

View file

@ -1,10 +1,9 @@
// Copyright (C) 2021 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura

View file

@ -1,10 +1,9 @@
// Copyright (C) 2021 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura

View file

@ -1,10 +1,10 @@
// Copyright (C) 2021 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import Qt.labs.qmlmodels 1.0
import QtQuick 2.15
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
@ -57,52 +57,32 @@ Item
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
//We can't use Cura's TableView here, since in Cura >= 5.0 this uses QtQuick.TableView, while in Cura < 5.0 this uses QtControls1.TableView.
Cura.TableView //So we have to define our own. Once support for 4.13 and earlier is dropped, we can switch to Cura.TableView.
Table
{ {
id: filesTableView id: filesTableView
anchors.fill: parent anchors.fill: parent
model: manager.digitalFactoryFileModel anchors.margins: parent.border.width
visible: model.count != 0 && manager.retrievingFileStatus != DF.RetrievalStatus.InProgress
selectionMode: OldControls.SelectionMode.SingleSelection columnHeaders: ["Name", "Uploaded by", "Uploaded at"]
onDoubleClicked: model: TableModel
{
TableModelColumn { display: "fileName" }
TableModelColumn { display: "username" }
TableModelColumn { display: "uploadedAt" }
rows: manager.digitalFactoryFileModel.items
}
onCurrentRowChanged:
{
manager.setSelectedFileIndices([currentRow]);
}
onDoubleClicked: function(row)
{ {
manager.setSelectedFileIndices([row]); manager.setSelectedFileIndices([row]);
openFilesButton.clicked(); openFilesButton.clicked();
} }
OldControls.TableViewColumn
{
id: fileNameColumn
role: "fileName"
title: "Name"
width: Math.round(filesTableView.width / 3)
}
OldControls.TableViewColumn
{
id: usernameColumn
role: "username"
title: "Uploaded by"
width: Math.round(filesTableView.width / 3)
}
OldControls.TableViewColumn
{
role: "uploadedAt"
title: "Uploaded at"
}
Connections
{
target: filesTableView.selection
function onSelectionChanged()
{
let newSelection = [];
filesTableView.selection.forEach(function(rowIndex) { newSelection.push(rowIndex); });
manager.setSelectedFileIndices(newSelection);
}
}
} }
Label Label
@ -161,7 +141,6 @@ Item
{ {
// Make sure no files are selected when the file model changes // Make sure no files are selected when the file model changes
filesTableView.currentRow = -1 filesTableView.currentRow = -1
filesTableView.selection.clear()
} }
} }
} }
@ -187,7 +166,7 @@ Item
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
text: "Open" text: "Open"
enabled: filesTableView.selection.count > 0 enabled: filesTableView.currentRow >= 0
onClicked: onClicked:
{ {
manager.openSelectedFiles() manager.openSelectedFiles()

View file

@ -1,10 +1,10 @@
// Copyright (C) 2021 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import Qt.labs.qmlmodels 1.0
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
@ -67,11 +67,17 @@ Item
} }
text: PrintInformation.jobName text: PrintInformation.jobName
font: UM.Theme.getFont("medium") font: fontMetrics.font
height: fontMetrics.height + 2 * UM.Theme.getSize("thin_margin").height
placeholderText: "Enter the name of the file." placeholderText: "Enter the name of the file."
onAccepted: { if (saveButton.enabled) {saveButton.clicked()}} onAccepted: { if (saveButton.enabled) {saveButton.clicked()}}
} }
FontMetrics
{
id: fontMetrics
font: UM.Theme.getFont("medium")
}
Rectangle Rectangle
{ {
@ -86,35 +92,22 @@ Item
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
//We can't use Cura's TableView here, since in Cura >= 5.0 this uses QtQuick.TableView, while in Cura < 5.0 this uses QtControls1.TableView.
Cura.TableView //So we have to define our own. Once support for 4.13 and earlier is dropped, we can switch to Cura.TableView.
Table
{ {
id: filesTableView id: filesTableView
anchors.fill: parent anchors.fill: parent
model: manager.digitalFactoryFileModel anchors.margins: parent.border.width
visible: model.count != 0 && manager.retrievingFileStatus != DF.RetrievalStatus.InProgress
selectionMode: OldControls.SelectionMode.NoSelection
OldControls.TableViewColumn allowSelection: false
columnHeaders: ["Name", "Uploaded by", "Uploaded at"]
model: TableModel
{ {
id: fileNameColumn TableModelColumn { display: "fileName" }
role: "fileName" TableModelColumn { display: "username" }
title: "@tableViewColumn:title", "Name" TableModelColumn { display: "uploadedAt" }
width: Math.round(filesTableView.width / 3) rows: manager.digitalFactoryFileModel.items
}
OldControls.TableViewColumn
{
id: usernameColumn
role: "username"
title: "Uploaded by"
width: Math.round(filesTableView.width / 3)
}
OldControls.TableViewColumn
{
role: "uploadedAt"
title: "Uploaded at"
} }
} }
@ -173,8 +166,7 @@ Item
function onItemsChanged() function onItemsChanged()
{ {
// Make sure no files are selected when the file model changes // Make sure no files are selected when the file model changes
filesTableView.currentRow = -1 filesTableView.currentRow = -1;
filesTableView.selection.clear()
} }
} }
} }

View file

@ -1,11 +1,9 @@
// Copyright (C) 2022 Ultimaker B.V. //Copyright (C) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. //Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import UM 1.2 as UM import UM 1.2 as UM
@ -224,4 +222,4 @@ Item
x: Math.round((parent.width - width) / 2) x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2) y: Math.round((parent.height - height) / 2)
} }
} }

View file

@ -0,0 +1,203 @@
//Copyright (C) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import Qt.labs.qmlmodels 1.0
import QtQuick 2.15
import QtQuick.Controls 2.15
import UM 1.2 as UM
/*
* A re-sizeable table of data.
*
* This table combines a list of headers with a TableView to show certain roles in a table.
* The columns of the table can be resized.
* When the table becomes too big, you can scroll through the table. When a column becomes too small, the contents of
* the table are elided.
* The table gets Cura's themeing.
*/
Item
{
id: tableBase
required property var columnHeaders //The text to show in the headers of each column.
property alias model: tableView.model //A TableModel to display in this table. To use a ListModel for the rows, use "rows: listModel.items"
property int currentRow: -1 //The selected row index.
property var onDoubleClicked: function(row) {} //Something to execute when double clicked. Accepts one argument: The index of the row that was clicked on.
property bool allowSelection: true //Whether to allow the user to select items.
Row
{
id: headerBar
Repeater
{
id: headerRepeater
model: columnHeaders
Rectangle
{
//minimumWidth: Math.max(1, Math.round(tableBase.width / headerRepeater.count))
width: 300
height: UM.Theme.getSize("section").height
color: UM.Theme.getColor("secondary")
Label
{
id: contentText
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("narrow_margin").width
text: modelData
font: UM.Theme.getFont("medium_bold")
color: UM.Theme.getColor("text")
elide: Text.ElideRight
}
Rectangle //Resize handle.
{
anchors
{
right: parent.right
top: parent.top
bottom: parent.bottom
}
width: UM.Theme.getSize("thick_lining").width
color: UM.Theme.getColor("thick_lining")
MouseArea
{
anchors.fill: parent
cursorShape: Qt.SizeHorCursor
drag
{
target: parent
axis: Drag.XAxis
}
onMouseXChanged:
{
if(drag.active)
{
let new_width = parent.parent.width + mouseX;
let sum_widths = mouseX;
for(let i = 0; i < headerBar.children.length; ++i)
{
sum_widths += headerBar.children[i].width;
}
if(sum_widths > tableBase.width)
{
new_width -= sum_widths - tableBase.width; //Limit the total width to not exceed the view.
}
let width_fraction = new_width / tableBase.width; //Scale with the same fraction along with the total width, if the table is resized.
parent.parent.width = Qt.binding(function() { return Math.max(10, Math.round(tableBase.width * width_fraction)) });
}
}
}
}
onWidthChanged:
{
tableView.forceLayout(); //Rescale table cells underneath as well.
}
}
}
}
TableView
{
id: tableView
anchors
{
top: headerBar.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
}
flickableDirection: Flickable.AutoFlickIfNeeded
clip: true
ScrollBar.vertical: ScrollBar
{
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
id: verticalScrollBar
visible: tableView.contentHeight > tableView.height
background: Rectangle
{
implicitWidth: UM.Theme.getSize("scrollbar").width
radius: Math.round(implicitWidth / 2)
color: UM.Theme.getColor("scrollbar_background")
}
contentItem: Rectangle
{
id: scrollViewHandle
implicitWidth: UM.Theme.getSize("scrollbar").width
radius: Math.round(implicitWidth / 2)
color: verticalScrollBar.pressed ? UM.Theme.getColor("scrollbar_handle_down") : verticalScrollBar.hovered ? UM.Theme.getColor("scrollbar_handle_hover") : UM.Theme.getColor("scrollbar_handle")
Behavior on color { ColorAnimation { duration: 50; } }
}
}
columnWidthProvider: function(column)
{
return headerBar.children[column].width; //Cells get the same width as their column header.
}
delegate: Rectangle
{
implicitHeight: Math.max(1, cellContent.height)
color: UM.Theme.getColor((tableBase.currentRow == row) ? "primary" : ((row % 2 == 0) ? "main_background" : "viewport_background"))
Label
{
id: cellContent
width: parent.width
text: display
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
}
TextMetrics
{
id: cellTextMetrics
text: cellContent.text
font: cellContent.font
elide: cellContent.elide
elideWidth: cellContent.width
}
UM.TooltipArea
{
anchors.fill: parent
acceptedButtons: Qt.LeftButton
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
onClicked:
{
if(tableBase.allowSelection)
{
tableBase.currentRow = row; //Select this row.
}
}
onDoubleClicked:
{
tableBase.onDoubleClicked(row);
}
}
}
Connections
{
target: model
function onRowCountChanged()
{
tableView.contentY = 0; //When the number of rows is reduced, make sure to scroll back to the start.
}
}
}
}

View file

@ -1,19 +1,19 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import QtQuick.Dialogs 1.2 // For filedialog import QtQuick.Dialogs 1.2 // For filedialog
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Cura.MachineAction Cura.MachineAction
{ {
anchors.fill: parent; anchors.fill: parent
property bool printerConnected: Cura.MachineManager.printerConnected property bool printerConnected: Cura.MachineManager.printerConnected
property var activeOutputDevice: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null property var activeOutputDevice: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null
property bool canUpdateFirmware: activeOutputDevice ? activeOutputDevice.activePrinter.canUpdateFirmware : false property bool canUpdateFirmware: activeOutputDevice ? activeOutputDevice.activePrinter.canUpdateFirmware : false
@ -25,25 +25,22 @@ Cura.MachineAction
UM.I18nCatalog { id: catalog; name: "cura"} UM.I18nCatalog { id: catalog; name: "cura"}
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Label UM.Label
{ {
width: parent.width width: parent.width
text: catalog.i18nc("@title", "Update Firmware") text: catalog.i18nc("@title", "Update Firmware")
wrapMode: Text.WordWrap
font.pointSize: 18 font.pointSize: 18
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.") text: catalog.i18nc("@label", "Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.")
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap text: catalog.i18nc("@label", "The firmware shipping with new printers works, but new versions tend to have more features and improvements.")
text: catalog.i18nc("@label", "The firmware shipping with new printers works, but new versions tend to have more features and improvements.");
} }
Row Row
@ -52,10 +49,10 @@ Cura.MachineAction
width: childrenRect.width width: childrenRect.width
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
property string firmwareName: Cura.MachineManager.activeMachine.getDefaultFirmwareName() property string firmwareName: Cura.MachineManager.activeMachine.getDefaultFirmwareName()
Button Cura.SecondaryButton
{ {
id: autoUpgradeButton id: autoUpgradeButton
text: catalog.i18nc("@action:button", "Automatically upgrade Firmware"); text: catalog.i18nc("@action:button", "Automatically upgrade Firmware")
enabled: parent.firmwareName != "" && canUpdateFirmware enabled: parent.firmwareName != "" && canUpdateFirmware
onClicked: onClicked:
{ {
@ -63,10 +60,10 @@ Cura.MachineAction
activeOutputDevice.updateFirmware(parent.firmwareName); activeOutputDevice.updateFirmware(parent.firmwareName);
} }
} }
Button Cura.SecondaryButton
{ {
id: manualUpgradeButton id: manualUpgradeButton
text: catalog.i18nc("@action:button", "Upload custom Firmware"); text: catalog.i18nc("@action:button", "Upload custom Firmware")
enabled: canUpdateFirmware enabled: canUpdateFirmware
onClicked: onClicked:
{ {
@ -75,20 +72,18 @@ Cura.MachineAction
} }
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
visible: !printerConnected && !updateProgressDialog.visible visible: !printerConnected && !updateProgressDialog.visible
text: catalog.i18nc("@label", "Firmware can not be updated because there is no connection with the printer."); text: catalog.i18nc("@label", "Firmware can not be updated because there is no connection with the printer.")
} }
Label Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
visible: printerConnected && !canUpdateFirmware visible: printerConnected && !canUpdateFirmware
text: catalog.i18nc("@label", "Firmware can not be updated because the connection with the printer does not support upgrading firmware."); text: catalog.i18nc("@label", "Firmware can not be updated because the connection with the printer does not support upgrading firmware.")
} }
} }
@ -122,7 +117,7 @@ Cura.MachineAction
{ {
anchors.fill: parent anchors.fill: parent
Label UM.Label
{ {
anchors anchors
{ {
@ -157,12 +152,10 @@ Cura.MachineAction
wrapMode: Text.Wrap wrapMode: Text.Wrap
} }
ProgressBar UM.ProgressBar
{ {
id: prog id: prog
value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress : 0 value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress / 100 : 0
minimumValue: 0
maximumValue: 100
indeterminate: indeterminate:
{ {
if(manager.firmwareUpdater == null) if(manager.firmwareUpdater == null)
@ -173,18 +166,18 @@ Cura.MachineAction
} }
anchors anchors
{ {
left: parent.left; left: parent.left
right: parent.right; right: parent.right
} }
} }
} }
rightButtons: [ rightButtons: [
Button Cura.SecondaryButton
{ {
text: catalog.i18nc("@action:button","Close"); text: catalog.i18nc("@action:button", "Close")
enabled: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareUpdateState != 1 : true; enabled: manager.firmwareUpdater != null ? manager.firmwareUpdater.firmwareUpdateState != 1 : true
onClicked: updateProgressDialog.visible = false; onClicked: updateProgressDialog.visible = false
} }
] ]
} }

View file

@ -1,4 +1,4 @@
# Copyright (c) 2021 Ultimaker B.V. # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
import math import math
@ -31,6 +31,8 @@ Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f
class FlavorParser: class FlavorParser:
"""This parser is intended to interpret the common firmware codes among all the different flavors""" """This parser is intended to interpret the common firmware codes among all the different flavors"""
MAX_EXTRUDER_COUNT = 16
def __init__(self) -> None: def __init__(self) -> None:
CuraApplication.getInstance().hideMessageSignal.connect(self._onHideMessage) CuraApplication.getInstance().hideMessageSignal.connect(self._onHideMessage)
self._cancelled = False self._cancelled = False
@ -53,7 +55,7 @@ class FlavorParser:
def _clearValues(self) -> None: def _clearValues(self) -> None:
self._extruder_number = 0 self._extruder_number = 0
self._extrusion_length_offset = [0] # type: List[float] self._extrusion_length_offset = [0] * self.MAX_EXTRUDER_COUNT # type: List[float]
self._layer_type = LayerPolygon.Inset0Type self._layer_type = LayerPolygon.Inset0Type
self._layer_number = 0 self._layer_number = 0
self._previous_z = 0 # type: float self._previous_z = 0 # type: float
@ -283,8 +285,9 @@ class FlavorParser:
return func(position, params, path) return func(position, params, path)
return position return position
def processTCode(self, T: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: def processTCode(self, global_stack, T: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position:
self._extruder_number = T self._extruder_number = T
self._filament_diameter = global_stack.extruderList[self._extruder_number].getProperty("material_diameter", "value")
if self._extruder_number + 1 > len(position.e): if self._extruder_number + 1 > len(position.e):
self._extrusion_length_offset.extend([0] * (self._extruder_number - len(position.e) + 1)) self._extrusion_length_offset.extend([0] * (self._extruder_number - len(position.e) + 1))
position.e.extend([0] * (self._extruder_number - len(position.e) + 1)) position.e.extend([0] * (self._extruder_number - len(position.e) + 1))
@ -354,7 +357,7 @@ class FlavorParser:
Logger.log("d", "Parsing g-code...") Logger.log("d", "Parsing g-code...")
current_position = Position(0, 0, 0, 0, [0]) current_position = Position(0, 0, 0, 0, [0] * self.MAX_EXTRUDER_COUNT)
current_path = [] #type: List[List[float]] current_path = [] #type: List[List[float]]
min_layer_number = 0 min_layer_number = 0
negative_layers = 0 negative_layers = 0
@ -444,7 +447,7 @@ class FlavorParser:
# When changing tool, store the end point of the previous path, then process the code and finally # When changing tool, store the end point of the previous path, then process the code and finally
# add another point with the new position of the head. # add another point with the new position of the head.
current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType])
current_position = self.processTCode(T, line, current_position, current_path) current_position = self.processTCode(global_stack, T, line, current_position, current_path)
current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType])
if line.startswith("M"): if line.startswith("M"):

View file

@ -1,239 +1,333 @@
// Copyright (c) 2015 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Controls 1.1 import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.3
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import UM 1.1 as UM import UM 1.5 as UM
import Cura 1.0 as Cura
UM.Dialog UM.Dialog
{ {
width: minimumWidth; title: catalog.i18nc("@title:window", "Convert Image")
minimumWidth: 350 * screenScaleFactor;
height: minimumHeight; minimumWidth: grid.width + 2 * UM.Theme.getSize("default_margin").height
minimumHeight: 250 * screenScaleFactor; minimumHeight: UM.Theme.getSize("modal_window_minimum").height
width: minimumWidth
title: catalog.i18nc("@title:window", "Convert Image...") height: minimumHeight
GridLayout GridLayout
{ {
UM.I18nCatalog{id: catalog; name: "cura"} UM.I18nCatalog { id: catalog; name: "cura" }
anchors.fill: parent; id: grid
Layout.fillWidth: true columnSpacing: UM.Theme.getSize("narrow_margin").width
columnSpacing: 16 * screenScaleFactor rowSpacing: UM.Theme.getSize("narrow_margin").height
rowSpacing: 4 * screenScaleFactor columns: 2
columns: 1
UM.TooltipArea { UM.Label
Layout.fillWidth:true {
height: childrenRect.height Layout.fillWidth: true
text: catalog.i18nc("@info:tooltip","The maximum distance of each pixel from \"Base.\"") Layout.minimumWidth: UM.Theme.getSize("setting_control").width
Row { text: catalog.i18nc("@action:label", "Height (mm)")
width: parent.width Layout.alignment: Qt.AlignVCenter
Label { MouseArea {
text: catalog.i18nc("@action:label", "Height (mm)") id: peak_height_label
width: 150 * screenScaleFactor anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter hoverEnabled: true
}
TextField {
id: peak_height
objectName: "Peak_Height"
validator: RegExpValidator {regExp: /^\d{0,3}([\,|\.]\d*)?$/}
width: 180 * screenScaleFactor
onTextChanged: { manager.onPeakHeightChanged(text) }
}
} }
} }
UM.TooltipArea { Cura.TextField
Layout.fillWidth:true {
height: childrenRect.height id: peak_height
text: catalog.i18nc("@info:tooltip","The base height from the build plate in millimeters.") Layout.fillWidth: true
Row { Layout.minimumWidth: UM.Theme.getSize("setting_control").width
width: parent.width selectByMouse: true
objectName: "Peak_Height"
validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ }
onTextChanged: manager.onPeakHeightChanged(text)
}
Label { UM.ToolTip
text: catalog.i18nc("@action:label", "Base (mm)") {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "The maximum distance of each pixel from \"Base.\"")
anchors.verticalCenter: parent.verticalCenter visible: peak_height.hovered || peak_height_label.containsMouse
} targetPoint: Qt.point(peak_height.x + Math.round(peak_height.width / 2), 0)
y: peak_height.y + peak_height.height + UM.Theme.getSize("default_margin").height
}
TextField { UM.Label
id: base_height {
objectName: "Base_Height" Layout.fillWidth: true
validator: RegExpValidator {regExp: /^\d{0,3}([\,|\.]\d*)?$/} Layout.minimumWidth: UM.Theme.getSize("setting_control").width
width: 180 * screenScaleFactor text: catalog.i18nc("@action:label", "Base (mm)")
onTextChanged: { manager.onBaseHeightChanged(text) } Layout.alignment: Qt.AlignVCenter
}
MouseArea
{
id: base_height_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.TextField
Layout.fillWidth:true {
height: childrenRect.height id: base_height
text: catalog.i18nc("@info:tooltip","The width in millimeters on the build plate.") selectByMouse: true
Row { Layout.fillWidth: true
width: parent.width Layout.minimumWidth: UM.Theme.getSize("setting_control").width
objectName: "Base_Height"
validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ }
onTextChanged: manager.onBaseHeightChanged(text)
}
Label { UM.ToolTip
text: catalog.i18nc("@action:label", "Width (mm)") {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "The base height from the build plate in millimeters.")
anchors.verticalCenter: parent.verticalCenter visible: base_height.hovered || base_height_label.containsMouse
} targetPoint: Qt.point(base_height.x + Math.round(base_height.width / 2), 0)
y: base_height.y + base_height.height + UM.Theme.getSize("default_margin").height
}
TextField { UM.Label
id: width {
objectName: "Width" Layout.fillWidth: true
focus: true Layout.minimumWidth: UM.Theme.getSize("setting_control").width
validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} text: catalog.i18nc("@action:label", "Width (mm)")
width: 180 * screenScaleFactor Layout.alignment: Qt.AlignVCenter
onTextChanged: { manager.onWidthChanged(text) }
} MouseArea {
id: width_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.TextField
Layout.fillWidth:true {
height: childrenRect.height id: width
text: catalog.i18nc("@info:tooltip","The depth in millimeters on the build plate") selectByMouse: true
Row { objectName: "Width"
width: parent.width Layout.fillWidth: true
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
focus: true
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
onTextChanged: manager.onWidthChanged(text)
}
Label { UM.ToolTip
text: catalog.i18nc("@action:label", "Depth (mm)") {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "The width in millimeters on the build plate")
anchors.verticalCenter: parent.verticalCenter visible: width.hovered || width_label.containsMouse
} targetPoint: Qt.point(width.x + Math.round(width.width / 2), 0)
TextField { y: width.y + width.height + UM.Theme.getSize("default_margin").height
id: depth }
objectName: "Depth"
focus: true UM.Label
validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} {
width: 180 * screenScaleFactor Layout.fillWidth: true
onTextChanged: { manager.onDepthChanged(text) } Layout.minimumWidth: UM.Theme.getSize("setting_control").width
} text: catalog.i18nc("@action:label", "Depth (mm)")
Layout.alignment: Qt.AlignVCenter
MouseArea {
id: depth_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.TextField
Layout.fillWidth:true {
height: childrenRect.height id: depth
text: catalog.i18nc("@info:tooltip","For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.") Layout.fillWidth: true
Row { Layout.minimumWidth: UM.Theme.getSize("setting_control").width
width: parent.width selectByMouse: true
objectName: "Depth"
focus: true
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
onTextChanged: manager.onDepthChanged(text)
}
//Empty label so 2 column layout works. UM.ToolTip
Label { {
text: "" text: catalog.i18nc("@info:tooltip", "The depth in millimeters on the build plate")
width: 150 * screenScaleFactor visible: depth.hovered || depth_label.containsMouse
anchors.verticalCenter: parent.verticalCenter targetPoint: Qt.point(depth.x + Math.round(depth.width / 2), 0)
} y: depth.y + depth.height + UM.Theme.getSize("default_margin").height
ComboBox { }
id: lighter_is_higher
objectName: "Lighter_Is_Higher" UM.Label
model: [ catalog.i18nc("@item:inlistbox","Darker is higher"), catalog.i18nc("@item:inlistbox","Lighter is higher") ] {
width: 180 * screenScaleFactor Layout.fillWidth: true
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) } Layout.minimumWidth: UM.Theme.getSize("setting_control").width
} text: ""
Layout.alignment: Qt.AlignVCenter
MouseArea {
id: lighter_is_higher_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.ComboBox
Layout.fillWidth:true {
height: childrenRect.height id: lighter_is_higher
text: catalog.i18nc("@info:tooltip","For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.") Layout.fillWidth: true
Row { Layout.minimumWidth: UM.Theme.getSize("setting_control").width
width: parent.width Layout.preferredHeight: UM.Theme.getSize("setting_control").height
objectName: "Lighter_Is_Higher"
textRole: "text"
model: [
{ text: catalog.i18nc("@item:inlistbox", "Darker is higher") },
{ text: catalog.i18nc("@item:inlistbox", "Lighter is higher") }
]
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
}
Label { UM.ToolTip
text: "Color Model" {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.")
anchors.verticalCenter: parent.verticalCenter visible: lighter_is_higher.hovered || lighter_is_higher_label.containsMouse
} targetPoint: Qt.point(lighter_is_higher.x + Math.round(lighter_is_higher.width / 2), 0)
ComboBox { y: lighter_is_higher.y + lighter_is_higher.height + UM.Theme.getSize("default_margin").height
id: color_model }
objectName: "ColorModel"
model: [ catalog.i18nc("@item:inlistbox","Linear"), catalog.i18nc("@item:inlistbox","Translucency") ] UM.Label
width: 180 * screenScaleFactor {
onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) } Layout.fillWidth: true
} Layout.minimumWidth: UM.Theme.getSize("setting_control").width
text: catalog.i18nc("@action:label", "Color Model")
Layout.alignment: Qt.AlignVCenter
MouseArea {
id: color_model_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.ComboBox
Layout.fillWidth:true {
height: childrenRect.height id: color_model
text: catalog.i18nc("@info:tooltip","The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") Layout.fillWidth: true
visible: color_model.currentText == catalog.i18nc("@item:inlistbox","Translucency") Layout.minimumWidth: UM.Theme.getSize("setting_control").width
Row { Layout.preferredHeight: UM.Theme.getSize("setting_control").height
width: parent.width objectName: "ColorModel"
textRole: "text"
model: [
{ text: catalog.i18nc("@item:inlistbox", "Linear") },
{ text: catalog.i18nc("@item:inlistbox", "Translucency") }
]
onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) }
}
Label { UM.ToolTip
text: catalog.i18nc("@action:label", "1mm Transmittance (%)") {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.")
anchors.verticalCenter: parent.verticalCenter visible: color_model.hovered || color_model_label.containsMouse
} targetPoint: Qt.point(color_model.x + Math.round(color_model.width / 2), 0)
TextField { y: color_model.y + color_model.height + UM.Theme.getSize("default_margin").height
id: transmittance }
objectName: "Transmittance"
focus: true UM.Label
validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} {
width: 180 * screenScaleFactor Layout.fillWidth: true
onTextChanged: { manager.onTransmittanceChanged(text) } Layout.minimumWidth: UM.Theme.getSize("setting_control").width
} text: catalog.i18nc("@action:label", "1mm Transmittance (%)")
Layout.alignment: Qt.AlignVCenter
MouseArea {
id: transmittance_label
anchors.fill: parent
hoverEnabled: true
} }
} }
UM.TooltipArea { Cura.TextField
Layout.fillWidth:true {
height: childrenRect.height Layout.fillWidth: true
text: catalog.i18nc("@info:tooltip","The amount of smoothing to apply to the image.") Layout.minimumWidth: UM.Theme.getSize("setting_control").width
Row { selectByMouse: true
width: parent.width objectName: "Transmittance"
validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ }
onTextChanged: manager.onTransmittanceChanged(text)
Label { UM.ToolTip
text: catalog.i18nc("@action:label", "Smoothing") {
width: 150 * screenScaleFactor text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.")
anchors.verticalCenter: parent.verticalCenter visible: parent.hovered || transmittance_label.containsMouse
} targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), 0)
y: parent.y + parent.height + UM.Theme.getSize("default_margin").height
Item {
width: 180 * screenScaleFactor
height: 20 * screenScaleFactor
Layout.fillWidth: true
Slider {
id: smoothing
objectName: "Smoothing"
maximumValue: 100.0
stepSize: 1.0
width: 180
onValueChanged: { manager.onSmoothingChanged(value) }
}
}
} }
} }
UM.Label
{
Layout.fillWidth: true
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
text: catalog.i18nc("@action:label", "Smoothing")
Layout.alignment: Qt.AlignVCenter
MouseArea
{
id: smoothing_label
anchors.fill: parent
hoverEnabled: true
}
}
Cura.SpinBox
{
id: smoothing
Layout.fillWidth: true
Layout.minimumWidth: UM.Theme.getSize("setting_control").width
objectName: "Smoothing"
to: 100.0
stepSize: 1.0
onValueChanged: manager.onSmoothingChanged(value)
}
UM.ToolTip
{
text: catalog.i18nc("@info:tooltip", "The amount of smoothing to apply to the image.")
visible: smoothing.hovered || smoothing_label.containsMouse
targetPoint: Qt.point(smoothing.x + Math.round(smoothing.width / 2), 0)
y: smoothing.y + smoothing.height + UM.Theme.getSize("default_margin").height
}
} }
Item
{
ButtonGroup
{
buttons: [ok_button, cancel_button]
checkedButton: ok_button
}
}
onAccepted: manager.onOkButtonClicked()
onRejected: manager.onCancelButtonClicked()
buttonSpacing: UM.Theme.getSize("default_margin").width
rightButtons: [ rightButtons: [
Button Cura.TertiaryButton
{ {
id:ok_button id: cancel_button
text: catalog.i18nc("@action:button","OK"); text: catalog.i18nc("@action:button", "Cancel")
onClicked: { manager.onOkButtonClicked() } onClicked: manager.onCancelButtonClicked()
enabled: true
}, },
Button Cura.PrimaryButton
{ {
id:cancel_button id: ok_button
text: catalog.i18nc("@action:button","Cancel"); text: catalog.i18nc("@action:button", "OK")
onClicked: { manager.onCancelButtonClicked() } onClicked: manager.onOkButtonClicked()
enabled: true
} }
] ]
} }

View file

@ -1,11 +1,11 @@
// Copyright (c) 2019 Ultimaker B.V. //Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. //Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -88,7 +88,7 @@ Cura.MachineAction
} }
} }
Label UM.Label
{ {
id: machineNameLabel id: machineNameLabel
anchors.top: parent.top anchors.top: parent.top
@ -97,7 +97,6 @@ Cura.MachineAction
text: Cura.MachineManager.activeMachine.name text: Cura.MachineManager.activeMachine.name
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
renderType: Text.NativeRendering
} }
UM.TabRow UM.TabRow
@ -111,6 +110,7 @@ Cura.MachineAction
model: tabNameModel model: tabNameModel
delegate: UM.TabRowButton delegate: UM.TabRowButton
{ {
checked: model.index == 0
text: model.name text: model.name
} }
} }

View file

@ -31,8 +31,11 @@ class Marketplace(Extension, QObject):
# Not entirely the cleanest code, since the localPackage list also checks the server if there are updates # Not entirely the cleanest code, since the localPackage list also checks the server if there are updates
# Since that in turn will trigger notifications to be shown, we do need to construct it here and make sure # Since that in turn will trigger notifications to be shown, we do need to construct it here and make sure
# that it checks for updates... # that it checks for updates...
preferences = CuraApplication.getInstance().getPreferences()
preferences.addPreference("info/automatic_plugin_update_check", True)
self._local_package_list = LocalPackageList(self) self._local_package_list = LocalPackageList(self)
self._local_package_list.checkForUpdates(self._package_manager.local_packages) if preferences.getValue("info/automatic_plugin_update_check"):
self._local_package_list.checkForUpdates(self._package_manager.local_packages)
self._package_manager.installedPackagesChanged.connect(self.checkIfRestartNeeded) self._package_manager.installedPackagesChanged.connect(self.checkIfRestartNeeded)

View file

@ -39,6 +39,7 @@ class PackageModel(QObject):
self._package_type = package_data.get("package_type", "") self._package_type = package_data.get("package_type", "")
self._is_bundled = package_data.get("is_bundled", False) self._is_bundled = package_data.get("is_bundled", False)
self._icon_url = package_data.get("icon_url", "") self._icon_url = package_data.get("icon_url", "")
self._marketplace_url = package_data.get("marketplace_url", "")
self._display_name = package_data.get("display_name", catalog.i18nc("@label:property", "Unknown Package")) self._display_name = package_data.get("display_name", catalog.i18nc("@label:property", "Unknown Package"))
tags = package_data.get("tags", []) tags = package_data.get("tags", [])
self._is_checked_by_ultimaker = (self._package_type == "plugin" and "verified" in tags) or ( self._is_checked_by_ultimaker = (self._package_type == "plugin" and "verified" in tags) or (
@ -210,6 +211,10 @@ class PackageModel(QObject):
def packageId(self) -> str: def packageId(self) -> str:
return self._package_id return self._package_id
@pyqtProperty(str, constant=True)
def marketplaceURL(self)-> str:
return self._marketplace_url
@pyqtProperty(str, constant = True) @pyqtProperty(str, constant = True)
def packageType(self) -> str: def packageType(self) -> str:
return self._package_type return self._package_type

View file

@ -117,9 +117,6 @@ class RemotePackageList(PackageList):
return return
for package_data in response_data["data"]: for package_data in response_data["data"]:
package_id = package_data["package_id"]
if package_id in self._package_manager.local_packages_ids:
continue # We should only show packages which are not already installed
try: try:
package = PackageModel(package_data, parent = self) package = PackageModel(package_data, parent = self)
self._connectManageButtonSignals(package) self._connectManageButtonSignals(package)

View file

@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39 14V8H27V14H21V8H9V14H7C6.20435 14 5.44129 14.3161 4.87868 14.8787C4.31607 15.4413 4 16.2044 4 17V37C4 37.7956 4.31607 38.5587 4.87868 39.1213C5.44129 39.6839 6.20435 40 7 40H41C41.7957 40 42.5587 39.6839 43.1213 39.1213C43.6839 38.5587 44 37.7956 44 37V17C44 16.2044 43.6839 15.4413 43.1213 14.8787C42.5587 14.3161 41.7957 14 41 14H39ZM29 10H37V14H29V10ZM11 10H19V14H11V10ZM42 38H6V16H42V38Z" fill="#000E1A"/>
</svg>

After

Width:  |  Height:  |  Size: 526 B

View file

@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24 4C18.6975 4.00609 13.614 6.11518 9.86459 9.86459C6.11518 13.614 4.00609 18.6975 4 24V42H6V32.66C7.54979 35.8792 9.93405 38.6241 12.9046 40.6092C15.8752 42.5942 19.3236 43.7468 22.8908 43.947C26.4579 44.1472 30.0136 43.3876 33.1876 41.7474C36.3616 40.1071 39.038 37.6462 40.9382 34.6206C42.8385 31.595 43.893 28.1155 43.9922 24.544C44.0914 20.9726 43.2315 17.4399 41.5021 14.3136C39.7727 11.1872 37.237 8.5815 34.1589 6.76765C31.0808 4.9538 27.5728 3.99809 24 4ZM24 42C20.4399 42 16.9598 40.9443 13.9997 38.9665C11.0397 36.9886 8.73255 34.1774 7.37017 30.8883C6.00779 27.5992 5.65133 23.98 6.34586 20.4884C7.0404 16.9967 8.75473 13.7894 11.2721 11.2721C13.7894 8.75473 16.9967 7.0404 20.4884 6.34587C23.98 5.65133 27.5992 6.00779 30.8883 7.37017C34.1774 8.73255 36.9886 11.0397 38.9665 13.9997C40.9443 16.9598 42 20.4399 42 24C41.9947 28.7723 40.0966 33.3476 36.7221 36.7221C33.3476 40.0966 28.7723 41.9947 24 42ZM24 17C22.6155 17 21.2622 17.4105 20.111 18.1797C18.9599 18.9489 18.0627 20.0421 17.5328 21.3212C17.003 22.6003 16.8644 24.0078 17.1345 25.3656C17.4046 26.7235 18.0713 27.9708 19.0503 28.9498C20.0292 29.9287 21.2765 30.5954 22.6344 30.8655C23.9922 31.1356 25.3997 30.997 26.6788 30.4672C27.9579 29.9373 29.0511 29.0401 29.8203 27.889C30.5895 26.7379 31 25.3845 31 24C30.9979 22.1441 30.2598 20.3648 28.9475 19.0525C27.6352 17.7402 25.8559 17.0021 24 17ZM24 29C23.0111 29 22.0444 28.7068 21.2221 28.1574C20.3999 27.6079 19.759 26.8271 19.3806 25.9134C19.0022 24.9998 18.9031 23.9945 19.0961 23.0246C19.289 22.0546 19.7652 21.1637 20.4645 20.4645C21.1637 19.7652 22.0546 19.289 23.0245 19.0961C23.9945 18.9031 24.9998 19.0022 25.9134 19.3806C26.827 19.759 27.6079 20.3999 28.1573 21.2222C28.7068 22.0444 29 23.0111 29 24C28.9984 25.3256 28.4712 26.5965 27.5338 27.5338C26.5965 28.4712 25.3256 28.9984 24 29ZM24 11C25.7079 10.9954 27.3997 11.3295 28.9776 11.9831C30.5554 12.6367 31.988 13.5967 33.1924 14.8076L31.7783 16.2217C30.7592 15.1971 29.547 14.3848 28.2118 13.8318C26.8767 13.2788 25.4451 12.9961 24 13V11Z" fill="#000E1A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -14,8 +14,8 @@ UM.Dialog
{ {
id: licenseDialog id: licenseDialog
title: catalog.i18nc("@button", "Plugin license agreement") title: catalog.i18nc("@button", "Plugin license agreement")
minimumWidth: UM.Theme.getSize("license_window_minimum").width minimumWidth: UM.Theme.getSize("modal_window_minimum").width
minimumHeight: UM.Theme.getSize("license_window_minimum").height minimumHeight: UM.Theme.getSize("modal_window_minimum").height
width: minimumWidth width: minimumWidth
height: minimumHeight height: minimumHeight
backgroundColor: UM.Theme.getColor("main_background") backgroundColor: UM.Theme.getColor("main_background")

View file

@ -1,7 +1,7 @@
// Copyright (c) 2021 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.6 as Cura import Cura 1.6 as Cura
import QtQuick 2.15 import QtQuick 2.15
@ -25,7 +25,7 @@ TabButton
radius: Math.round(width * 0.5) radius: Math.round(width * 0.5)
} }
Cura.ToolTip UM.ToolTip
{ {
id: tooltip id: tooltip

View file

@ -13,13 +13,14 @@ Packages
bannerVisible: UM.Preferences.getValue("cura/market_place_show_manage_packages_banner"); bannerVisible: UM.Preferences.getValue("cura/market_place_show_manage_packages_banner");
bannerIcon: UM.Theme.getIcon("ArrowDoubleCircleRight") bannerIcon: UM.Theme.getIcon("ArrowDoubleCircleRight")
bannerText: catalog.i18nc("@text", "Manage your Ultimaker Cura plugins and material profiles here. Make sure to keep your plugins up to date and backup your setup regularly.") bannerText: catalog.i18nc("@text", "Manage your Ultimaker Cura plugins and material profiles here. Make sure to keep your plugins up to date and backup your setup regularly.")
bannerReadMoreUrl: "" // TODO add when support page is ready bannerReadMoreUrl: "https://support.ultimaker.com/hc/en-us/articles/4411125921426/?utm_source=cura&utm_medium=software&utm_campaign=marketplace-learn-manage"
onRemoveBanner: function() { onRemoveBanner: function() {
UM.Preferences.setValue("cura/market_place_show_manage_packages_banner", false); UM.Preferences.setValue("cura/market_place_show_manage_packages_banner", false);
bannerVisible = false; bannerVisible = false;
} }
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser" searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
packagesManageableInListView: true showUpdateButton: true
showInstallButton: true
showDisableButton: true
model: manager.LocalPackageList model: manager.LocalPackageList
} }

View file

@ -46,198 +46,182 @@ Window
{ {
anchors.fill: parent anchors.fill: parent
color: UM.Theme.getColor("main_background") color: UM.Theme.getColor("main_background")
}
//The Marketplace can have a page in front of everything with package details. The stack view controls its visibility.
StackView
{
id: contextStack
anchors.fill: parent
//The Marketplace can have a page in front of everything with package details. The stack view controls its visibility. initialItem: packageBrowse
StackView
ColumnLayout
{ {
id: contextStack id: packageBrowse
anchors.fill: parent
initialItem: packageBrowse spacing: UM.Theme.getSize("narrow_margin").height
ColumnLayout // Page title.
Item
{ {
id: packageBrowse Layout.preferredWidth: parent.width
Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height
spacing: UM.Theme.getSize("default_margin").height Label
// Page title.
Item
{ {
Layout.preferredWidth: parent.width id: pageTitle
Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height anchors
Label
{ {
id: pageTitle left: parent.left
anchors leftMargin: UM.Theme.getSize("default_margin").width
{ right: parent.right
left: parent.left rightMargin: UM.Theme.getSize("default_margin").width
leftMargin: UM.Theme.getSize("default_margin").width bottom: parent.bottom
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
bottom: parent.bottom
}
font: UM.Theme.getFont("large")
color: UM.Theme.getColor("text")
text: content.item ? content.item.pageTitle: catalog.i18nc("@title", "Loading...")
} }
}
OnboardBanner font: UM.Theme.getFont("large")
{ color: UM.Theme.getColor("text")
visible: content.item && content.item.bannerVisible text: content.item ? content.item.pageTitle: catalog.i18nc("@title", "Loading...")
text: content.item && content.item.bannerText
icon: content.item && content.item.bannerIcon
onRemove: content.item && content.item.onRemoveBanner
readMoreUrl: content.item && content.item.bannerReadMoreUrl
} }
}
// Search & Top-Level Tabs OnboardBanner
Item {
visible: content.item && content.item.bannerVisible
text: content.item && content.item.bannerText
icon: content.item && content.item.bannerIcon
onRemove: content.item && content.item.onRemoveBanner
readMoreUrl: content.item && content.item.bannerReadMoreUrl
Layout.fillWidth: true
Layout.leftMargin: UM.Theme.getSize("default_margin").width
Layout.rightMargin: UM.Theme.getSize("default_margin").width
}
// Search & Top-Level Tabs
Item
{
implicitHeight: childrenRect.height
implicitWidth: parent.width - 2 * UM.Theme.getSize("default_margin").width
Layout.alignment: Qt.AlignHCenter
RowLayout
{ {
Layout.preferredHeight: childrenRect.height width: parent.width
Layout.preferredWidth: parent.width - 2 * UM.Theme.getSize("thin_margin").width height: UM.Theme.getSize("button_icon").height + UM.Theme.getSize("default_margin").height
RowLayout spacing: UM.Theme.getSize("thin_margin").width
Cura.SearchBar
{ {
width: parent.width id: searchBar
height: UM.Theme.getSize("button_icon").height + UM.Theme.getSize("default_margin").height implicitHeight: UM.Theme.getSize("button_icon").height
spacing: UM.Theme.getSize("thin_margin").width Layout.fillWidth: true
onTextEdited: searchStringChanged(text)
}
Item // Page selection.
TabBar
{
id: pageSelectionTabBar
Layout.alignment: Qt.AlignRight
height: UM.Theme.getSize("button_icon").height
spacing: 0
background: Rectangle { color: "transparent" }
currentIndex: manager.tabShown
onCurrentIndexChanged:
{ {
Layout.preferredHeight: parent.height manager.tabShown = currentIndex
Layout.preferredWidth: searchBar.visible ? UM.Theme.getSize("thin_margin").width : 0 searchBar.text = "";
Layout.fillWidth: ! searchBar.visible searchBar.visible = currentItem.hasSearch;
content.source = currentItem.sourcePage;
} }
Cura.SearchBar PackageTypeTab
{ {
id: searchBar id: pluginTabText
Layout.preferredHeight: UM.Theme.getSize("button_icon").height width: implicitWidth
Layout.fillWidth: true text: catalog.i18nc("@button", "Plugins")
onTextEdited: searchStringChanged(text) property string sourcePage: "Plugins.qml"
property bool hasSearch: true
} }
PackageTypeTab
// Page selection.
TabBar
{ {
id: pageSelectionTabBar id: materialsTabText
Layout.alignment: Qt.AlignRight width: implicitWidth
height: UM.Theme.getSize("button_icon").height text: catalog.i18nc("@button", "Materials")
spacing: 0 property string sourcePage: "Materials.qml"
background: Rectangle { color: "transparent" } property bool hasSearch: true
currentIndex: manager.tabShown }
ManagePackagesButton
{
property string sourcePage: "ManagedPackages.qml"
property bool hasSearch: false
onCurrentIndexChanged: Cura.NotificationIcon
{ {
manager.tabShown = currentIndex anchors
searchBar.text = "";
searchBar.visible = currentItem.hasSearch;
content.source = currentItem.sourcePage;
}
PackageTypeTab
{
id: pluginTabText
width: implicitWidth
text: catalog.i18nc("@button", "Plugins")
property string sourcePage: "Plugins.qml"
property bool hasSearch: true
}
PackageTypeTab
{
id: materialsTabText
width: implicitWidth
text: catalog.i18nc("@button", "Materials")
property string sourcePage: "Materials.qml"
property bool hasSearch: true
}
ManagePackagesButton
{
property string sourcePage: "ManagedPackages.qml"
property bool hasSearch: false
Cura.NotificationIcon
{ {
anchors horizontalCenter: parent.right
{ verticalCenter: parent.top
horizontalCenter: parent.right }
verticalCenter: parent.top visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0
}
visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0
labelText: labelText:
{ {
const itemCount = CuraApplication.getPackageManager().packagesWithUpdate.length const itemCount = CuraApplication.getPackageManager().packagesWithUpdate.length
return itemCount > 9 ? "9+" : itemCount return itemCount > 9 ? "9+" : itemCount
}
} }
} }
} }
TextMetrics
{
id: pluginTabTextMetrics
text: pluginTabText.text
font: pluginTabText.font
}
TextMetrics
{
id: materialsTabTextMetrics
text: materialsTabText.text
font: materialsTabText.font
}
} }
} }
}
FontMetrics FontMetrics
{ {
id: fontMetrics id: fontMetrics
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
} }
Cura.TertiaryButton Cura.TertiaryButton
{ {
text: catalog.i18nc("@info", "Search in the browser") text: catalog.i18nc("@info", "Search in the browser")
iconSource: UM.Theme.getIcon("LinkExternal") iconSource: UM.Theme.getIcon("LinkExternal")
visible: pageSelectionTabBar.currentItem.hasSearch visible: pageSelectionTabBar.currentItem.hasSearch
isIconOnRightSide: true isIconOnRightSide: true
height: fontMetrics.height height: fontMetrics.height
textFont: fontMetrics.font textFont: fontMetrics.font
textColor: UM.Theme.getColor("text") textColor: UM.Theme.getColor("text")
onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl) onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl)
} }
// Page contents.
Rectangle
{
Layout.preferredWidth: parent.width
Layout.fillHeight: true
color: UM.Theme.getColor("detail_background")
// Page contents. // Page contents.
Rectangle Loader
{ {
Layout.preferredWidth: parent.width id: content
Layout.fillHeight: true anchors.fill: parent
color: UM.Theme.getColor("detail_background") anchors.margins: UM.Theme.getSize("default_margin").width
source: "Plugins.qml"
// Page contents. Connections
Loader
{ {
id: content target: content
anchors.fill: parent function onLoaded()
anchors.margins: UM.Theme.getSize("default_margin").width
source: "Plugins.qml"
Connections
{ {
target: content pageTitle.text = content.item.pageTitle
function onLoaded() searchStringChanged.connect(handleSearchStringChanged)
{ }
pageTitle.text = content.item.pageTitle function handleSearchStringChanged(new_search)
searchStringChanged.connect(handleSearchStringChanged) {
} content.item.model.searchString = new_search
function handleSearchStringChanged(new_search)
{
content.item.model.searchString = new_search
}
} }
} }
} }

View file

@ -10,13 +10,14 @@ Packages
bannerVisible: UM.Preferences.getValue("cura/market_place_show_material_banner") bannerVisible: UM.Preferences.getValue("cura/market_place_show_material_banner")
bannerIcon: UM.Theme.getIcon("Spool") bannerIcon: UM.Theme.getIcon("Spool")
bannerText: catalog.i18nc("@text", "Select and install material profiles optimised for your Ultimaker 3D printers.") bannerText: catalog.i18nc("@text", "Select and install material profiles optimised for your Ultimaker 3D printers.")
bannerReadMoreUrl: "" // TODO add when support page is ready bannerReadMoreUrl: "https://support.ultimaker.com/hc/en-us/articles/360011968360/?utm_source=cura&utm_medium=software&utm_campaign=marketplace-learn-materials"
onRemoveBanner: function() { onRemoveBanner: function() {
UM.Preferences.setValue("cura/market_place_show_material_banner", false); UM.Preferences.setValue("cura/market_place_show_material_banner", false);
bannerVisible = false; bannerVisible = false;
} }
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/materials?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-materials-browser" searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/materials?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-materials-browser"
packagesManageableInListView: false showUpdateButton: true
showInstallButton: true
model: manager.MaterialPackageList model: manager.MaterialPackageList
} }

View file

@ -16,10 +16,7 @@ Rectangle
property var onRemove property var onRemove
property string readMoreUrl property string readMoreUrl
Layout.preferredHeight: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height implicitHeight: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height
Layout.fillWidth: true
Layout.margins: UM.Theme.getSize("default_margin").width
color: UM.Theme.getColor("action_panel_secondary") color: UM.Theme.getColor("action_panel_secondary")
// Icon // Icon

View file

@ -11,7 +11,9 @@ import Cura 1.6 as Cura
Rectangle Rectangle
{ {
property alias packageData: packageCardHeader.packageData property alias packageData: packageCardHeader.packageData
property alias manageableInListView: packageCardHeader.showManageButtons property alias showUpdateButton: packageCardHeader.showUpdateButton
property alias showDisableButton: packageCardHeader.showDisableButton
property alias showInstallButton: packageCardHeader.showInstallButton
height: childrenRect.height height: childrenRect.height
color: UM.Theme.getColor("main_background") color: UM.Theme.getColor("main_background")
@ -31,64 +33,14 @@ Rectangle
{ {
id: descriptionLabel id: descriptionLabel
width: parent.width width: parent.width
property real lastLineWidth: 0; //Store the width of the last line, to properly position the elision.
text: packageData.description text: packageData.description
textFormat: Text.PlainText //Must be plain text, or we won't get onLineLaidOut signals. Don't auto-detect!
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
maximumLineCount: 2 maximumLineCount: 2
wrapMode: Text.Wrap wrapMode: Text.Wrap
elide: Text.ElideRight elide: Text.ElideRight
visible: text !== "" visible: text !== ""
onLineLaidOut:
{
if(truncated && line.isLast)
{
let max_line_width = parent.width - readMoreButton.width - fontMetrics.advanceWidth("… ") - 2 * UM.Theme.getSize("default_margin").width;
if(line.implicitWidth > max_line_width)
{
line.width = max_line_width;
}
else
{
line.width = line.implicitWidth - fontMetrics.advanceWidth("…"); //Truncate the ellipsis. We're adding this ourselves.
}
descriptionLabel.lastLineWidth = line.implicitWidth;
}
}
}
Label
{
id: tripleDotLabel
anchors.left: parent.left
anchors.leftMargin: descriptionLabel.lastLineWidth
anchors.bottom: descriptionLabel.bottom
text: "… "
font: descriptionLabel.font
color: descriptionLabel.color
visible: descriptionLabel.truncated && descriptionLabel.text !== ""
}
Cura.TertiaryButton
{
id: readMoreButton
anchors.right: parent.right
anchors.bottom: descriptionLabel.bottom
height: fontMetrics.height //Height of a single line.
text: catalog.i18nc("@info", "Read more")
iconSource: UM.Theme.getIcon("LinkExternal")
visible: descriptionLabel.truncated && descriptionLabel.text !== ""
enabled: visible
leftPadding: UM.Theme.getSize("default_margin").width
rightPadding: UM.Theme.getSize("wide_margin").width
textFont: descriptionLabel.font
isIconOnRightSide: true
onClicked: Qt.openUrlExternally(packageData.packageInfoUrl)
} }
} }
} }

View file

@ -12,16 +12,19 @@ import Cura 1.6 as Cura
// are combined into the reusable "PackageCardHeader" component // are combined into the reusable "PackageCardHeader" component
Item Item
{ {
default property alias contents: contentItem.children; default property alias contents: contentItem.children
property var packageData property var packageData
property bool showManageButtons: false property bool showDisableButton: false
property bool showInstallButton: false
property bool showUpdateButton: false
width: parent.width width: parent.width
height: UM.Theme.getSize("card").height height: UM.Theme.getSize("card").height
// card icon // card icon
Image Item
{ {
id: packageItem id: packageItem
anchors anchors
@ -33,7 +36,37 @@ Item
width: UM.Theme.getSize("card_icon").width width: UM.Theme.getSize("card_icon").width
height: width height: width
source: packageData.iconUrl != "" ? packageData.iconUrl : "../images/placeholder.svg" property bool packageHasIcon: packageData.iconUrl != ""
Image
{
visible: parent.packageHasIcon
anchors.fill: parent
source: packageData.iconUrl
sourceSize.height: height
sourceSize.width: width
}
UM.RecolorImage
{
visible: !parent.packageHasIcon
anchors.fill: parent
sourceSize.height: height
sourceSize.width: width
color: UM.Theme.getColor("text")
source:
{
switch (packageData.packageType)
{
case "plugin":
return "../images/Plugin.svg";
case "material":
return "../images/Spool.svg";
default:
return "../images/placeholder.svg";
}
}
}
} }
ColumnLayout ColumnLayout
@ -103,7 +136,7 @@ Item
color: externalLinkButton.hovered ? UM.Theme.getColor("action_button_hovered"): "transparent" color: externalLinkButton.hovered ? UM.Theme.getColor("action_button_hovered"): "transparent"
radius: externalLinkButton.width / 2 radius: externalLinkButton.width / 2
} }
onClicked: Qt.openUrlExternally(packageData.authorInfoUrl) onClicked: Qt.openUrlExternally(packageData.marketplaceURL)
} }
} }
@ -157,7 +190,7 @@ Item
ManageButton ManageButton
{ {
id: enableManageButton id: enableManageButton
visible: showManageButtons && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material" visible: showDisableButton && packageData.isInstalled && !packageData.isToBeInstalled && packageData.packageType != "material"
enabled: !packageData.busy enabled: !packageData.busy
button_style: !packageData.isActive button_style: !packageData.isActive
@ -171,7 +204,7 @@ Item
ManageButton ManageButton
{ {
id: installManageButton id: installManageButton
visible: showManageButtons && (packageData.canDowngrade || !packageData.isBundled) visible: showInstallButton && (packageData.canDowngrade || !packageData.isBundled)
enabled: !packageData.busy enabled: !packageData.busy
busy: packageData.busy busy: packageData.busy
button_style: !(packageData.isInstalled || packageData.isToBeInstalled) button_style: !(packageData.isInstalled || packageData.isToBeInstalled)
@ -201,7 +234,7 @@ Item
ManageButton ManageButton
{ {
id: updateManageButton id: updateManageButton
visible: showManageButtons && packageData.canUpdate visible: showUpdateButton && packageData.canUpdate
enabled: !packageData.busy enabled: !packageData.busy
busy: packageData.busy busy: packageData.busy
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop

View file

@ -6,7 +6,7 @@ import QtQuick.Controls 2.15
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import Cura 1.0 as Cura import Cura 1.0 as Cura
import UM 1.0 as UM import UM 1.5 as UM
Item Item
{ {
@ -38,7 +38,7 @@ Item
onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it. onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it.
tooltip: catalog.i18nc("@button:tooltip", "Back") tooltip: catalog.i18nc("@button:tooltip", "Back")
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight toolTipContentAlignment: UM.Enums.ContentAlignment.AlignRight
leftPadding: UM.Theme.getSize("narrow_margin").width leftPadding: UM.Theme.getSize("narrow_margin").width
rightPadding: leftPadding rightPadding: leftPadding
iconSource: UM.Theme.getIcon("ArrowLeft") iconSource: UM.Theme.getIcon("ArrowLeft")

View file

@ -31,7 +31,9 @@ Rectangle
PackageCardHeader PackageCardHeader
{ {
id: packageCardHeader id: packageCardHeader
showManageButtons: true showUpdateButton: true
showInstallButton: true
showDisableButton: true
anchors.fill: parent anchors.fill: parent
@ -40,7 +42,10 @@ Rectangle
id: downloadCount id: downloadCount
Layout.preferredWidth: parent.width Layout.preferredWidth: parent.width
Layout.fillHeight: true Layout.fillHeight: true
// It's not the perfect way to handle this, since a package really can have 0 downloads
// But we re-use the package page for the manage plugins as well. The one user that doesn't see
// the num downloads is an acceptable "sacrifice" to make this easy to fix.
visible: packageData.downloadCount != "0"
UM.RecolorImage UM.RecolorImage
{ {
id: downloadsIcon id: downloadsIcon
@ -53,6 +58,7 @@ Rectangle
Label Label
{ {
anchors.verticalCenter: downloadsIcon.verticalCenter anchors.verticalCenter: downloadsIcon.verticalCenter
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")

View file

@ -19,7 +19,10 @@ ListView
property string bannerText property string bannerText
property string bannerReadMoreUrl property string bannerReadMoreUrl
property var onRemoveBanner property var onRemoveBanner
property bool packagesManageableInListView
property bool showUpdateButton
property bool showDisableButton
property bool showInstallButton
clip: true clip: true
@ -53,8 +56,8 @@ ListView
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel // Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
id: verticalScrollBar id: verticalScrollBar
visible: packages.contentHeight > packages.height visible: packages.contentHeight > packages.height
anchors.right: parent.right
background: Item{} background: Item {}
contentItem: Rectangle contentItem: Rectangle
{ {
@ -81,9 +84,20 @@ ListView
PackageCard PackageCard
{ {
manageableInListView: packages.packagesManageableInListView showUpdateButton: packages.showUpdateButton
showDisableButton: packages.showDisableButton
showInstallButton: packages.showInstallButton
packageData: model.package packageData: model.package
width: parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("narrow_margin").width width: {
if (verticalScrollBar.visible)
{
return parent.width - UM.Theme.getSize("default_margin").width - UM.Theme.getSize("default_margin").width
}
else
{
return parent.width - UM.Theme.getSize("default_margin").width
}
}
color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background") color: cardMouseArea.containsMouse ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("main_background")
} }
} }

View file

@ -10,13 +10,14 @@ Packages
bannerVisible: UM.Preferences.getValue("cura/market_place_show_plugin_banner") bannerVisible: UM.Preferences.getValue("cura/market_place_show_plugin_banner")
bannerIcon: UM.Theme.getIcon("Shop") bannerIcon: UM.Theme.getIcon("Shop")
bannerText: catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.") bannerText: catalog.i18nc("@text", "Streamline your workflow and customize your Ultimaker Cura experience with plugins contributed by our amazing community of users.")
bannerReadMoreUrl: "" // TODO add when support page is ready bannerReadMoreUrl: "https://support.ultimaker.com/hc/en-us/articles/360011968360/?utm_source=cura&utm_medium=software&utm_campaign=marketplace-learn-plugins"
onRemoveBanner: function() { onRemoveBanner: function() {
UM.Preferences.setValue("cura/market_place_show_plugin_banner", false) UM.Preferences.setValue("cura/market_place_show_plugin_banner", false)
bannerVisible = false; bannerVisible = false;
} }
searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser" searchInBrowserUrl: "https://marketplace.ultimaker.com/app/cura/plugins?utm_source=cura&utm_medium=software&utm_campaign=marketplace-search-plugins-browser"
packagesManageableInListView: false showUpdateButton: true
showInstallButton: true
model: manager.PluginPackageList model: manager.PluginPackageList
} }

View file

@ -12,7 +12,7 @@ Control
implicitWidth: UM.Theme.getSize("card_tiny_icon").width implicitWidth: UM.Theme.getSize("card_tiny_icon").width
implicitHeight: UM.Theme.getSize("card_tiny_icon").height implicitHeight: UM.Theme.getSize("card_tiny_icon").height
Cura.ToolTip UM.ToolTip
{ {
tooltipText: tooltipText:
{ {

View file

@ -2,43 +2,20 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.2 as UM import UM 1.2 as UM
Button UM.SimpleButton
{ {
id: modelCheckerButton id: modelCheckerButton
UM.I18nCatalog
{
id: catalog
name: "cura"
}
visible: manager.hasWarnings visible: manager.hasWarnings
tooltip: catalog.i18nc("@info:tooltip", "Some things could be problematic in this print. Click to see tips for adjustment.")
onClicked: manager.showWarnings() onClicked: manager.showWarnings()
width: UM.Theme.getSize("save_button_specs_icons").width width: UM.Theme.getSize("save_button_specs_icons").width
height: UM.Theme.getSize("save_button_specs_icons").height height: UM.Theme.getSize("save_button_specs_icons").height
iconSource: "model_checker.svg"
anchors.verticalCenter: parent ? parent.verticalCenter : undefined anchors.verticalCenter: parent ? parent.verticalCenter : undefined
color: UM.Theme.getColor("text_scene")
style: ButtonStyle hoverColor: UM.Theme.getColor("text_scene_hover")
{
background: Item
{
UM.RecolorImage
{
width: UM.Theme.getSize("save_button_specs_icons").width;
height: UM.Theme.getSize("save_button_specs_icons").height;
sourceSize.height: width;
color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene");
source: "model_checker.svg"
}
}
}
} }

View file

@ -3,7 +3,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
// We show a nice overlay on the 3D viewer when the current output device has no monitor view // We show a nice overlay on the 3D viewer when the current output device has no monitor view
@ -90,7 +90,7 @@ Rectangle
visible: monitorViewComponent.sourceComponent == null visible: monitorViewComponent.sourceComponent == null
// CASE 2: CAN MONITOR & NOT CONNECTED // CASE 2: CAN MONITOR & NOT CONNECTED
Label UM.Label
{ {
anchors anchors
{ {
@ -99,14 +99,10 @@ Rectangle
visible: isNetworkConfigured && !isConnected visible: isNetworkConfigured && !isConnected
text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.") text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
wrapMode: Text.WordWrap
lineHeight: UM.Theme.getSize("monitor_text_line_large").height
lineHeightMode: Text.FixedHeight
width: contentWidth width: contentWidth
} }
Label UM.Label
{ {
id: noNetworkLabel id: noNetworkLabel
anchors anchors
@ -116,11 +112,7 @@ Rectangle
visible: !isNetworkConfigured && isNetworkConfigurable visible: !isNetworkConfigured && isNetworkConfigurable
text: catalog.i18nc("@info", "Please connect your printer to the network.") text: catalog.i18nc("@info", "Please connect your printer to the network.")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
wrapMode: Text.WordWrap
width: contentWidth width: contentWidth
lineHeight: UM.Theme.getSize("monitor_text_line_large").height
lineHeightMode: Text.FixedHeight
} }
Item Item
{ {
@ -129,7 +121,6 @@ Rectangle
left: noNetworkLabel.left left: noNetworkLabel.left
} }
visible: !isNetworkConfigured && isNetworkConfigurable visible: !isNetworkConfigured && isNetworkConfigurable
height: UM.Theme.getSize("monitor_text_line").height
width: childrenRect.width width: childrenRect.width
UM.RecolorImage UM.RecolorImage
@ -138,8 +129,8 @@ Rectangle
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("LinkExternal") source: UM.Theme.getIcon("LinkExternal")
width: UM.Theme.getSize("monitor_external_link_icon").width width: UM.Theme.getSize("icon_indicator").width
height: UM.Theme.getSize("monitor_external_link_icon").height height: UM.Theme.getSize("icon_indicator").height
} }
Label Label
{ {

View file

@ -1,62 +1,24 @@
// Copyright (c) 2015 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher. // Uranium is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
import UM 1.1 as UM
import Cura 1.5 as Cura
import UM 1.5 as UM
import ".." import ".."
Button { Cura.CategoryButton
{
id: base; id: base;
style: ButtonStyle { categoryIcon: definition ? UM.Theme.getIcon(definition.icon) : ""
background: Item { } labelText: definition ? definition.label : ""
label: Row expanded: definition ? definition.expanded : false
{
spacing: UM.Theme.getSize("default_lining").width
UM.RecolorImage signal showTooltip(string text)
{ signal hideTooltip()
anchors.verticalCenter: parent.verticalCenter
height: (label.height / 2) | 0
width: height
source: control.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight");
color: control.hovered ? palette.highlight : palette.buttonText
}
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
height: label.height
width: height
source: control.iconSource
color: control.hovered ? palette.highlight : palette.buttonText
}
Label
{
id: label
anchors.verticalCenter: parent.verticalCenter
text: control.text
color: control.hovered ? palette.highlight : palette.buttonText
font.bold: true
}
SystemPalette { id: palette }
}
}
signal showTooltip(string text);
signal hideTooltip();
signal contextMenuRequested() signal contextMenuRequested()
text: definition.label onClicked: expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key)
iconSource: UM.Theme.getIcon(definition.icon)
checkable: true
checked: definition.expanded
onClicked: definition.expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key)
} }

View file

@ -3,25 +3,22 @@
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1 import QtQuick.Controls 2.1
import QtQuick.Controls.Styles 1.1
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.TooltipArea UM.TooltipArea
{ {
x: model.depth * UM.Theme.getSize("default_margin").width; x: model.depth * UM.Theme.getSize("narrow_margin").width
text: model.description; text: model.description
width: childrenRect.width; width: childrenRect.width
height: childrenRect.height; height: childrenRect.height
UM.CheckBox UM.CheckBox
{ {
id: check id: check
text: definition.label text: definition.label
checked: addedSettingsModel.getVisible(model.key) checked: addedSettingsModel.getVisible(model.key)

View file

@ -1,11 +1,10 @@
// Copyright (c) 2021 Ultimaker B.V. //Copyright (c) 2022 Ultimaker B.V.
// Uranium is released under the terms of the LGPLv3 or higher. //Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.2 import QtQuick.Controls 2.15
import QtQuick.Controls.Styles 1.2
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
import ".." import ".."
@ -76,63 +75,72 @@ Item
id: meshTypeButtons id: meshTypeButtons
spacing: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width
Button UM.ToolbarButton
{ {
id: normalButton id: normalButton
text: catalog.i18nc("@label", "Normal model") text: catalog.i18nc("@label", "Normal model")
iconSource: UM.Theme.getIcon("Infill0"); toolItem: UM.RecolorImage
{
source: UM.Theme.getIcon("Infill0")
color: UM.Theme.getColor("icon")
}
property bool needBorder: true property bool needBorder: true
checkable: true checkable: true
onClicked: setMeshType(normalMeshType); onClicked: setMeshType(normalMeshType);
style: UM.Theme.styles.tool_button;
z: 4 z: 4
} }
Button UM.ToolbarButton
{ {
id: supportMeshButton id: supportMeshButton
text: catalog.i18nc("@label", "Print as support") text: catalog.i18nc("@label", "Print as support")
iconSource: UM.Theme.getIcon("MeshTypeSupport"); toolItem: UM.RecolorImage
{
source: UM.Theme.getIcon("MeshTypeSupport")
color: UM.Theme.getColor("icon")
}
property bool needBorder: true property bool needBorder: true
checkable:true checkable:true
onClicked: setMeshType(supportMeshType) onClicked: setMeshType(supportMeshType)
style: UM.Theme.styles.tool_button;
z: 3 z: 3
} }
Button UM.ToolbarButton
{ {
id: overlapMeshButton id: overlapMeshButton
text: catalog.i18nc("@label", "Modify settings for overlaps") text: catalog.i18nc("@label", "Modify settings for overlaps")
iconSource: UM.Theme.getIcon("MeshTypeIntersect"); toolItem: UM.RecolorImage
{
source: UM.Theme.getIcon("MeshTypeIntersect")
color: UM.Theme.getColor("icon")
}
property bool needBorder: true property bool needBorder: true
checkable:true checkable:true
onClicked: setMeshType(infillMeshType) onClicked: setMeshType(infillMeshType)
style: UM.Theme.styles.tool_button;
z: 2 z: 2
} }
Button UM.ToolbarButton
{ {
id: antiOverhangMeshButton id: antiOverhangMeshButton
text: catalog.i18nc("@label", "Don't support overlaps") text: catalog.i18nc("@label", "Don't support overlaps")
iconSource: UM.Theme.getIcon("BlockSupportOverlaps"); toolItem: UM.RecolorImage
{
source: UM.Theme.getIcon("BlockSupportOverlaps")
color: UM.Theme.getColor("icon")
}
property bool needBorder: true property bool needBorder: true
checkable: true checkable: true
onClicked: setMeshType(antiOverhangMeshType) onClicked: setMeshType(antiOverhangMeshType)
style: UM.Theme.styles.tool_button;
z: 1 z: 1
} }
} }
Label UM.Label
{ {
id: meshTypeLabel id: meshTypeLabel
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: UM.Theme.getSize("setting").height height: UM.Theme.getSize("setting").height
verticalAlignment: Text.AlignVCenter
} }
@ -179,192 +187,187 @@ Item
// It kinda looks ugly otherwise (big panel, no content on it) // It kinda looks ugly otherwise (big panel, no content on it)
id: currentSettings id: currentSettings
property int maximumHeight: 200 * screenScaleFactor property int maximumHeight: 200 * screenScaleFactor
height: Math.min(contents.count * (UM.Theme.getSize("section").height + UM.Theme.getSize("default_lining").height), maximumHeight) height: Math.min(contents.count * (UM.Theme.getSize("section").height + UM.Theme.getSize("narrow_margin").height + UM.Theme.getSize("default_lining").height), maximumHeight)
visible: currentMeshType != "anti_overhang_mesh" visible: currentMeshType != "anti_overhang_mesh"
ScrollView ListView
{ {
id: contents
height: parent.height height: parent.height
width: UM.Theme.getSize("setting").width + UM.Theme.getSize("default_margin").width width: UM.Theme.getSize("setting").width + UM.Theme.getSize("default_margin").width
style: UM.Theme.styles.scrollview
ListView ScrollBar.vertical: UM.ScrollBar {}
clip: true
spacing: UM.Theme.getSize("default_lining").height
model: UM.SettingDefinitionsModel
{ {
id: contents id: addedSettingsModel
spacing: UM.Theme.getSize("default_lining").height containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: ""
expanded: [ "*" ]
model: UM.SettingDefinitionsModel filter:
{ {
id: addedSettingsModel if (printSequencePropertyProvider.properties.value == "one_at_a_time")
containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: ""
expanded: [ "*" ]
filter:
{ {
if (printSequencePropertyProvider.properties.value == "one_at_a_time") return {"settable_per_meshgroup": true}
}
return {"settable_per_mesh": true}
}
exclude:
{
var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ]
if (currentMeshType == "support_mesh")
{
excluded_settings = excluded_settings.concat(base.allCategoriesExceptSupport)
}
return excluded_settings
}
visibilityHandler: Cura.PerObjectSettingVisibilityHandler
{
id: visibility_handler
selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId")
}
// For some reason the model object is updated after removing him from the memory and
// it happens only on Windows. For this reason, set the destroyed value manually.
Component.onDestruction:
{
setDestroyed(true)
}
}
delegate: Row
{
spacing: - UM.Theme.getSize("default_margin").width
Loader
{
id: settingLoader
width: UM.Theme.getSize("setting").width
height: UM.Theme.getSize("section").height + UM.Theme.getSize("narrow_margin").height
enabled: provider.properties.enabled === "True"
property var definition: model
property var settingDefinitionsModel: addedSettingsModel
property var propertyProvider: provider
property var globalPropertyProvider: inheritStackProvider
property var externalResetHandler: false
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,
//causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely.
asynchronous: model.type != "enum" && model.type != "extruder"
onLoaded:
{
settingLoader.item.showRevertButton = false
settingLoader.item.showInheritButton = false
settingLoader.item.showLinkedSettingIcon = false
settingLoader.item.doDepthIndentation = false
settingLoader.item.doQualityUserSettingEmphasis = false
}
sourceComponent:
{
switch(model.type)
{ {
return {"settable_per_meshgroup": true} case "int":
return settingTextField
case "[int]":
return settingTextField
case "float":
return settingTextField
case "enum":
return settingComboBox
case "extruder":
return settingExtruder
case "optional_extruder":
return settingOptionalExtruder
case "bool":
return settingCheckBox
case "str":
return settingTextField
case "category":
return settingCategory
default:
return settingUnknown
} }
return {"settable_per_mesh": true}
}
exclude:
{
var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ]
if (currentMeshType == "support_mesh")
{
excluded_settings = excluded_settings.concat(base.allCategoriesExceptSupport)
}
return excluded_settings
}
visibilityHandler: Cura.PerObjectSettingVisibilityHandler
{
id: visibility_handler
selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId")
}
// For some reason the model object is updated after removing him from the memory and
// it happens only on Windows. For this reason, set the destroyed value manually.
Component.onDestruction:
{
setDestroyed(true)
} }
} }
delegate: Row Button
{ {
spacing: - UM.Theme.getSize("default_margin").width width: Math.round(UM.Theme.getSize("setting").height / 2)
Loader height: UM.Theme.getSize("setting").height
onClicked: addedSettingsModel.setVisible(model.key, false)
background: Item
{ {
id: settingLoader UM.RecolorImage
width: UM.Theme.getSize("setting").width
height: UM.Theme.getSize("section").height
enabled: provider.properties.enabled === "True"
property var definition: model
property var settingDefinitionsModel: addedSettingsModel
property var propertyProvider: provider
property var globalPropertyProvider: inheritStackProvider
property var externalResetHandler: false
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,
//causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely.
asynchronous: model.type != "enum" && model.type != "extruder"
onLoaded:
{ {
settingLoader.item.showRevertButton = false anchors.verticalCenter: parent.verticalCenter
settingLoader.item.showInheritButton = false width: parent.width
settingLoader.item.showLinkedSettingIcon = false height: width
settingLoader.item.doDepthIndentation = false sourceSize.height: width
settingLoader.item.doQualityUserSettingEmphasis = false color: parent.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button")
} source: UM.Theme.getIcon("Minus")
sourceComponent:
{
switch(model.type)
{
case "int":
return settingTextField
case "[int]":
return settingTextField
case "float":
return settingTextField
case "enum":
return settingComboBox
case "extruder":
return settingExtruder
case "optional_extruder":
return settingOptionalExtruder
case "bool":
return settingCheckBox
case "str":
return settingTextField
case "category":
return settingCategory
default:
return settingUnknown
}
} }
} }
}
Button // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events
// so we bypass that to make a dedicated provider).
UM.SettingPropertyProvider
{
id: provider
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
key: model.key
watchedProperties: [ "value", "enabled", "validationState" ]
storeIndex: 0
removeUnusedValue: false
}
UM.SettingPropertyProvider
{
id: inheritStackProvider
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
key: model.key
watchedProperties: [ "limit_to_extruder" ]
}
Connections
{
target: inheritStackProvider
function onPropertiesChanged() { provider.forcePropertiesChanged() }
}
Connections
{
target: UM.ActiveTool
function onPropertiesChanged()
{ {
width: Math.round(UM.Theme.getSize("setting").height / 2) // the values cannot be bound with UM.ActiveTool.properties.getValue() calls,
height: UM.Theme.getSize("setting").height // so here we connect to the signal and update the those values.
if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined")
onClicked: addedSettingsModel.setVisible(model.key, false)
style: ButtonStyle
{ {
background: Item const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId")
if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId)
{ {
UM.RecolorImage addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId
{
anchors.verticalCenter: parent.verticalCenter
width: parent.width
height: width
sourceSize.height: width
color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button")
source: UM.Theme.getIcon("Minus")
}
} }
} }
} if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined")
// Specialty provider that only watches global_inherits (we can't filter on what property changed we get events
// so we bypass that to make a dedicated provider).
UM.SettingPropertyProvider
{
id: provider
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
key: model.key
watchedProperties: [ "value", "enabled", "validationState" ]
storeIndex: 0
removeUnusedValue: false
}
UM.SettingPropertyProvider
{
id: inheritStackProvider
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
key: model.key
watchedProperties: [ "limit_to_extruder" ]
}
Connections
{
target: inheritStackProvider
function onPropertiesChanged() { provider.forcePropertiesChanged() }
}
Connections
{
target: UM.ActiveTool
function onPropertiesChanged()
{ {
// the values cannot be bound with UM.ActiveTool.properties.getValue() calls, const containerId = UM.ActiveTool.properties.getValue("ContainerID")
// so here we connect to the signal and update the those values. if (provider.containerStackId != containerId)
if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined")
{ {
const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId") provider.containerStackId = containerId
if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId)
{
addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId
}
} }
if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined") if (inheritStackProvider.containerStackId != containerId)
{ {
const containerId = UM.ActiveTool.properties.getValue("ContainerID") inheritStackProvider.containerStackId = containerId
if (provider.containerStackId != containerId)
{
provider.containerStackId = containerId
}
if (inheritStackProvider.containerStackId != containerId)
{
inheritStackProvider.containerStackId = containerId
}
} }
} }
} }
@ -422,8 +425,6 @@ Item
storeIndex: 0 storeIndex: 0
} }
SystemPalette { id: palette }
Component Component
{ {
id: settingTextField id: settingTextField

View file

@ -1,6 +1,8 @@
//Copyright (c) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.2 import QtQuick.Controls 2.2
import QtQuick.Controls.Styles 1.2
import UM 1.5 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -10,8 +12,11 @@ UM.Dialog
{ {
id: settingPickDialog id: settingPickDialog
margin: UM.Theme.getSize("default_margin").width
title: catalog.i18nc("@title:window", "Select Settings to Customize for this model") title: catalog.i18nc("@title:window", "Select Settings to Customize for this model")
width: screenScaleFactor * 360 width: UM.Theme.getSize("small_popup_dialog").width
backgroundColor: UM.Theme.getColor("background_1")
property var additional_excluded_settings property var additional_excluded_settings
@ -40,9 +45,10 @@ UM.Dialog
listview.model.filter = new_filter listview.model.filter = new_filter
} }
TextField Cura.TextField
{ {
id: filterInput id: filterInput
selectByMouse: true
anchors anchors
{ {
@ -69,65 +75,65 @@ UM.Dialog
text: catalog.i18nc("@label:checkbox", "Show all") text: catalog.i18nc("@label:checkbox", "Show all")
} }
ScrollView ListView
{ {
id: scrollView id: listview
anchors anchors
{ {
top: filterInput.bottom top: filterInput.bottom
topMargin: UM.Theme.getSize("default_margin").height
left: parent.left left: parent.left
right: parent.right right: parent.right
bottom: parent.bottom bottom: parent.bottom
} }
ListView
ScrollBar.vertical: UM.ScrollBar { id: scrollBar }
clip: true
model: UM.SettingDefinitionsModel
{ {
id: listview id: definitionsModel
model: UM.SettingDefinitionsModel containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: ""
visibilityHandler: UM.SettingPreferenceVisibilityHandler {}
expanded: [ "*" ]
exclude:
{ {
id: definitionsModel var excluded_settings = [ "machine_settings", "command_line_settings", "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ]
containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" excluded_settings = excluded_settings.concat(settingPickDialog.additional_excluded_settings)
visibilityHandler: UM.SettingPreferenceVisibilityHandler {} return excluded_settings
expanded: [ "*" ]
exclude:
{
var excluded_settings = [ "machine_settings", "command_line_settings", "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ]
excluded_settings = excluded_settings.concat(settingPickDialog.additional_excluded_settings)
return excluded_settings
}
showAll: toggleShowAll.checked || filterInput.text !== ""
} }
delegate: Loader showAll: toggleShowAll.checked || filterInput.text !== ""
{
id: loader
width: listview.width
height: model.type != undefined ? UM.Theme.getSize("section").height : 0
property var definition: model
property var settingDefinitionsModel: definitionsModel
asynchronous: true
source:
{
switch(model.type)
{
case "category":
return "PerObjectCategory.qml"
default:
return "PerObjectItem.qml"
}
}
}
Component.onCompleted: settingPickDialog.updateFilter()
} }
delegate: Loader
{
id: loader
width: listview.width - scrollBar.width
height: model.type != undefined ? UM.Theme.getSize("section").height : 0
property var definition: model
property var settingDefinitionsModel: definitionsModel
asynchronous: true
source:
{
switch(model.type)
{
case "category":
return "PerObjectCategory.qml"
default:
return "PerObjectItem.qml"
}
}
}
Component.onCompleted: settingPickDialog.updateFilter()
} }
rightButtons: [ rightButtons: [
Button Cura.TertiaryButton
{ {
text: catalog.i18nc("@action:button", "Close") text: catalog.i18nc("@action:button", "Close")
onClicked: settingPickDialog.visible = false onClicked: reject()
} }
] ]
} }

View file

@ -1,16 +1,13 @@
// Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V. // Copyright (c) 2022 Jaime van Kessel, Ultimaker B.V.
// The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. // The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Controls.Styles 1.1
import QtQml.Models 2.15 as Models import QtQml.Models 2.15 as Models
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.Dialog UM.Dialog
@ -18,14 +15,15 @@ UM.Dialog
id: dialog id: dialog
title: catalog.i18nc("@title:window", "Post Processing Plugin") title: catalog.i18nc("@title:window", "Post Processing Plugin")
width: 700 * screenScaleFactor; width: 700 * screenScaleFactor
height: 500 * screenScaleFactor; height: 500 * screenScaleFactor
minimumWidth: 400 * screenScaleFactor; minimumWidth: 400 * screenScaleFactor
minimumHeight: 250 * screenScaleFactor; minimumHeight: 250 * screenScaleFactor
onVisibleChanged: onVisibleChanged:
{ {
if(!visible) //Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack. // Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack.
if (!visible)
{ {
manager.writeScriptsToStack() manager.writeScriptsToStack()
} }
@ -36,234 +34,211 @@ UM.Dialog
UM.I18nCatalog{id: catalog; name: "cura"} UM.I18nCatalog{id: catalog; name: "cura"}
id: base id: base
property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width) property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width)
property int textMargin: Math.round(UM.Theme.getSize("default_margin").width / 2) property int textMargin: UM.Theme.getSize("narrow_margin").width
property string activeScriptName property string activeScriptName
SystemPalette{ id: palette }
SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled }
anchors.fill: parent anchors.fill: parent
ExclusiveGroup ButtonGroup
{ {
id: selectedScriptGroup id: selectedScriptGroup
} }
Item Column
{ {
id: activeScripts id: activeScripts
anchors.left: parent.left
width: base.columnWidth width: base.columnWidth
height: parent.height height: parent.height
Label spacing: base.textMargin
UM.Label
{ {
id: activeScriptsHeader id: activeScriptsHeader
text: catalog.i18nc("@label", "Post Processing Scripts") text: catalog.i18nc("@label", "Post Processing Scripts")
anchors.top: parent.top
anchors.topMargin: base.textMargin
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: base.textMargin
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: base.textMargin
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
elide: Text.ElideRight elide: Text.ElideRight
} }
ListView ListView
{ {
id: activeScriptsList id: activeScriptsList
anchors anchors
{ {
top: activeScriptsHeader.bottom
left: parent.left left: parent.left
right: parent.right right: parent.right
rightMargin: base.textMargin rightMargin: base.textMargin
topMargin: base.textMargin
leftMargin: UM.Theme.getSize("default_margin").width
} }
height: Math.min(contentHeight, parent.height - parent.spacing * 2 - activeScriptsHeader.height - addButton.height) //At the window height, start scrolling this one.
height: childrenRect.height clip: true
model: manager.scriptList ScrollBar.vertical: UM.ScrollBar
delegate: Item
{ {
width: parent.width id: activeScriptsScrollBar
height: activeScriptButton.height }
Button model: manager.scriptList
{
id: activeScriptButton
text: manager.getScriptLabelByKey(modelData.toString())
exclusiveGroup: selectedScriptGroup
width: parent.width
height: UM.Theme.getSize("setting").height
checkable: true
checked: delegate: Button
{
id: activeScriptButton
width: parent.width - activeScriptsScrollBar.width
height: UM.Theme.getSize("standard_list_lineheight").height
ButtonGroup.group: selectedScriptGroup
checkable: true
checked:
{
if (manager.selectedScriptIndex == index)
{ {
if (manager.selectedScriptIndex == index)
{
base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
return true
}
else
{
return false
}
}
onClicked:
{
forceActiveFocus()
manager.setSelectedScriptIndex(index)
base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
return true
} }
else
style: ButtonStyle
{ {
background: Rectangle return false
{
color: activeScriptButton.checked ? palette.highlight : "transparent"
width: parent.width
height: parent.height
}
label: Label
{
wrapMode: Text.Wrap
text: control.text
elide: Text.ElideRight
color: activeScriptButton.checked ? palette.highlightedText : palette.text
}
} }
} }
Button background: Rectangle
{ {
id: removeButton color: activeScriptButton.checked ? UM.Theme.getColor("background_3") : "transparent"
text: "x"
width: 20 * screenScaleFactor
height: 20 * screenScaleFactor
anchors.right:parent.right
anchors.rightMargin: base.textMargin
anchors.verticalCenter: parent.verticalCenter
onClicked: manager.removeScriptByIndex(index)
style: ButtonStyle
{
label: Item
{
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(control.width / 2.7)
height: Math.round(control.height / 2.7)
sourceSize.height: width
color: palette.text
source: UM.Theme.getIcon("Cancel")
}
}
}
} }
Button
onClicked:
{ {
id: downButton forceActiveFocus()
text: "" manager.setSelectedScriptIndex(index)
anchors.right: removeButton.left base.activeScriptName = manager.getScriptLabelByKey(modelData.toString())
anchors.verticalCenter: parent.verticalCenter
enabled: index != manager.scriptList.length - 1
width: 20 * screenScaleFactor
height: 20 * screenScaleFactor
onClicked:
{
if (manager.selectedScriptIndex == index)
{
manager.setSelectedScriptIndex(index + 1)
}
return manager.moveScript(index, index + 1)
}
style: ButtonStyle
{
label: Item
{
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: Math.round(control.width / 2.5)
height: Math.round(control.height / 2.5)
sourceSize.height: width
color: control.enabled ? palette.text : disabledPalette.text
source: UM.Theme.getIcon("ChevronSingleDown")
}
}
}
} }
Button
RowLayout
{ {
id: upButton anchors.fill: parent
text: ""
enabled: index != 0 UM.Label
width: 20 * screenScaleFactor
height: 20 * screenScaleFactor
anchors.right: downButton.left
anchors.verticalCenter: parent.verticalCenter
onClicked:
{ {
if (manager.selectedScriptIndex == index) Layout.fillWidth: true
{ text: manager.getScriptLabelByKey(modelData.toString())
manager.setSelectedScriptIndex(index - 1)
}
return manager.moveScript(index, index - 1)
} }
style: ButtonStyle
Item
{ {
label: Item id: downButton
{ Layout.preferredWidth: height
UM.RecolorImage Layout.fillHeight: true
enabled: index != manager.scriptList.length - 1
MouseArea
{
anchors.fill: parent
onClicked:
{ {
anchors.verticalCenter: parent.verticalCenter if (manager.selectedScriptIndex == index)
anchors.horizontalCenter: parent.horizontalCenter {
width: Math.round(control.width / 2.5) manager.setSelectedScriptIndex(index + 1)
height: Math.round(control.height / 2.5) }
sourceSize.height: width return manager.moveScript(index, index + 1)
color: control.enabled ? palette.text : disabledPalette.text
source: UM.Theme.getIcon("ChevronSingleUp")
} }
} }
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
source: UM.Theme.getIcon("ChevronSingleDown")
}
}
Item
{
id: upButton
Layout.preferredWidth: height
Layout.fillHeight: true
enabled: index != 0
MouseArea
{
anchors.fill: parent
onClicked:
{
if (manager.selectedScriptIndex == index)
{
manager.setSelectedScriptIndex(index - 1)
}
return manager.moveScript(index, index - 1)
}
}
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
source: UM.Theme.getIcon("ChevronSingleUp")
}
}
Item
{
id: removeButton
Layout.preferredWidth: height
Layout.fillHeight: true
MouseArea
{
anchors.fill: parent
onClicked: manager.removeScriptByIndex(index)
}
UM.RecolorImage
{
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.getSize("standard_arrow").width
height: UM.Theme.getSize("standard_arrow").height
sourceSize.width: width
sourceSize.height: height
color: UM.Theme.getColor("text")
source: UM.Theme.getIcon("Cancel")
}
} }
} }
} }
} }
Button Cura.SecondaryButton
{ {
id: addButton id: addButton
text: catalog.i18nc("@action", "Add a script") text: catalog.i18nc("@action", "Add a script")
anchors.left: parent.left
anchors.leftMargin: base.textMargin
anchors.top: activeScriptsList.bottom
anchors.topMargin: base.textMargin
onClicked: scriptsMenu.open() onClicked: scriptsMenu.open()
style: ButtonStyle
{
label: Label
{
text: control.text
}
}
} }
QQC2.Menu }
Cura.Menu
{
id: scriptsMenu
Models.Instantiator
{ {
id: scriptsMenu model: manager.loadedScriptList
width: parent.width
Models.Instantiator Cura.MenuItem
{ {
model: manager.loadedScriptList text: manager.getScriptLabelByKey(modelData.toString())
onTriggered: manager.addScriptToList(modelData.toString())
QQC2.MenuItem
{
text: manager.getScriptLabelByKey(modelData.toString())
onTriggered: manager.addScriptToList(modelData.toString())
}
onObjectAdded: scriptsMenu.insertItem(index, object)
onObjectRemoved: scriptsMenu.removeItem(object)
} }
onObjectAdded: scriptsMenu.insertItem(index, object)
onObjectRemoved: scriptsMenu.removeItem(object)
} }
} }
@ -296,9 +271,9 @@ UM.Dialog
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
} }
ScrollView ListView
{ {
id: scrollView id: listview
anchors anchors
{ {
top: scriptSpecsHeader.bottom top: scriptSpecsHeader.bottom
@ -309,124 +284,114 @@ UM.Dialog
bottom: parent.bottom bottom: parent.bottom
} }
ScrollBar.vertical: UM.ScrollBar {}
clip: true
visible: manager.selectedScriptDefinitionId != "" visible: manager.selectedScriptDefinitionId != ""
style: UM.Theme.styles.scrollview; spacing: UM.Theme.getSize("default_lining").height
ListView model: UM.SettingDefinitionsModel
{ {
id: listview id: definitionsModel
spacing: UM.Theme.getSize("default_lining").height containerId: manager.selectedScriptDefinitionId
model: UM.SettingDefinitionsModel showAll: true
}
delegate: Loader
{
id: settingLoader
width: listview.width
height:
{ {
id: definitionsModel if (provider.properties.enabled == "True" && model.type != undefined)
containerId: manager.selectedScriptDefinitionId {
showAll: true return UM.Theme.getSize("section").height;
}
else
{
return 0
}
}
Behavior on height { NumberAnimation { duration: 100 } }
opacity: provider.properties.enabled == "True" ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } }
enabled: opacity > 0
property var definition: model
property var settingDefinitionsModel: definitionsModel
property var propertyProvider: provider
property var globalPropertyProvider: inheritStackProvider
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,
//causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely.
asynchronous: model.type != "enum" && model.type != "extruder"
onLoaded:
{
settingLoader.item.showRevertButton = false
settingLoader.item.showInheritButton = false
settingLoader.item.showLinkedSettingIcon = false
settingLoader.item.doDepthIndentation = false
settingLoader.item.doQualityUserSettingEmphasis = false
} }
delegate: Loader sourceComponent:
{ {
id: settingLoader switch(model.type)
width: parent.width
height:
{ {
if(provider.properties.enabled == "True") case "int":
{ return settingTextField
if(model.type != undefined) case "float":
{ return settingTextField
return UM.Theme.getSize("section").height case "enum":
} return settingComboBox
else case "extruder":
{ return settingExtruder
return 0 case "bool":
} return settingCheckBox
} case "str":
else return settingTextField
{ case "category":
return 0 return settingCategory
} default:
return settingUnknown
} }
Behavior on height { NumberAnimation { duration: 100 } } }
opacity: provider.properties.enabled == "True" ? 1 : 0
Behavior on opacity { NumberAnimation { duration: 100 } } UM.SettingPropertyProvider
enabled: opacity > 0 {
id: provider
containerStackId: manager.selectedScriptStackId
key: model.key ? model.key : "None"
watchedProperties: [ "value", "enabled", "state", "validationState" ]
storeIndex: 0
}
property var definition: model // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events
property var settingDefinitionsModel: definitionsModel // so we bypass that to make a dedicated provider).
property var propertyProvider: provider UM.SettingPropertyProvider
property var globalPropertyProvider: inheritStackProvider {
id: inheritStackProvider
containerStack: Cura.MachineManager.activeMachine
key: model.key ? model.key : "None"
watchedProperties: [ "limit_to_extruder" ]
}
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 Connections
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, {
//causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. target: item
asynchronous: model.type != "enum" && model.type != "extruder"
onLoaded: function onShowTooltip(text)
{ {
settingLoader.item.showRevertButton = false tooltip.text = text;
settingLoader.item.showInheritButton = false var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0);
settingLoader.item.showLinkedSettingIcon = false tooltip.show(position);
settingLoader.item.doDepthIndentation = false tooltip.target.x = position.x + 1;
settingLoader.item.doQualityUserSettingEmphasis = false
} }
sourceComponent: function onHideTooltip() { tooltip.hide() }
{
switch(model.type)
{
case "int":
return settingTextField
case "float":
return settingTextField
case "enum":
return settingComboBox
case "extruder":
return settingExtruder
case "bool":
return settingCheckBox
case "str":
return settingTextField
case "category":
return settingCategory
default:
return settingUnknown
}
}
UM.SettingPropertyProvider
{
id: provider
containerStackId: manager.selectedScriptStackId
key: model.key ? model.key : "None"
watchedProperties: [ "value", "enabled", "state", "validationState" ]
storeIndex: 0
}
// Specialty provider that only watches global_inherits (we can't filter on what property changed we get events
// so we bypass that to make a dedicated provider).
UM.SettingPropertyProvider
{
id: inheritStackProvider
containerStack: Cura.MachineManager.activeMachine
key: model.key ? model.key : "None"
watchedProperties: [ "limit_to_extruder" ]
}
Connections
{
target: item
function onShowTooltip(text)
{
tooltip.text = text
var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0)
tooltip.show(position)
tooltip.target.x = position.x + 1
}
function onHideTooltip() { tooltip.hide() }
}
} }
} }
} }
@ -480,10 +445,9 @@ UM.Dialog
} }
} }
rightButtons: Button rightButtons: Cura.TertiaryButton
{ {
text: catalog.i18nc("@action:button", "Close") text: catalog.i18nc("@action:button", "Close")
iconName: "dialog-close"
onClicked: dialog.accept() onClicked: dialog.accept()
} }
@ -515,7 +479,7 @@ UM.Dialog
} }
return tipText return tipText
} }
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft
onClicked: dialog.show() onClicked: dialog.show()
iconSource: "Script.svg" iconSource: "Script.svg"
fixedWidthMode: false fixedWidthMode: false

View file

@ -298,7 +298,7 @@ class ChangeAtZ(Script):
}, },
"caz_change_retract": { "caz_change_retract": {
"label": "Change Retraction", "label": "Change Retraction",
"description": "Indicates you would like to modify retraction properties.", "description": "Indicates you would like to modify retraction properties. Does not work when using relative extrusion.",
"type": "bool", "type": "bool",
"default_value": false "default_value": false
}, },

View file

@ -1,10 +1,7 @@
//Copyright (c) 2020 Ultimaker B.V. //Copyright (c) 2021 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher. //Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM import UM 1.0 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -5,7 +5,7 @@ import QtQuick 2.9
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.1 as Cura import Cura 1.1 as Cura
@ -131,14 +131,10 @@ Item
height: UM.Theme.getSize("action_button").height height: UM.Theme.getSize("action_button").height
hoverEnabled: true hoverEnabled: true
contentItem: Label contentItem: UM.Label
{ {
text: model.displayText text: model.displayText
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
width: contentWidth width: contentWidth
height: parent.height height: parent.height
} }

View file

@ -1,11 +1,7 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM import UM 1.0 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -1,10 +1,8 @@
// Copyright (c) 2017 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM import UM 1.0 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -1,10 +1,8 @@
// Copyright (c) 2017 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM import UM 1.0 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -1,14 +1,15 @@
// Copyright (c) 2017 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 1.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.0 as UM import UM 1.0 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
UM.PointingRectangle { UM.PointingRectangle
{
id: sliderLabelRoot id: sliderLabelRoot
// custom properties // custom properties
@ -28,47 +29,41 @@ UM.PointingRectangle {
borderColor: UM.Theme.getColor("lining") borderColor: UM.Theme.getColor("lining")
borderWidth: UM.Theme.getSize("default_lining").width borderWidth: UM.Theme.getSize("default_lining").width
Behavior on height { Behavior on height { NumberAnimation { duration: 50 } }
NumberAnimation {
duration: 50
}
}
// catch all mouse events so they're not handled by underlying 3D scene // catch all mouse events so they're not handled by underlying 3D scene
MouseArea { MouseArea
{
anchors.fill: parent anchors.fill: parent
} }
TextMetrics { TextMetrics
{
id: maxValueMetrics id: maxValueMetrics
font: valueLabel.font font: valueLabel.font
text: maximumValue + 1 // layers are 0 based, add 1 for display value text: maximumValue + 1 // layers are 0 based, add 1 for display value
} }
TextField { TextField
{
id: valueLabel id: valueLabel
anchors { anchors.centerIn: parent
verticalCenter: parent.verticalCenter
horizontalCenter: parent.horizontalCenter
alignWhenCentered: false
}
width: maxValueMetrics.width + UM.Theme.getSize("default_margin").width //width: maxValueMetrics.contentWidth + 2 * UM.Theme.getSize("default_margin").width
text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array
horizontalAlignment: TextInput.AlignHCenter horizontalAlignment: TextInput.AlignHCenter
leftPadding: UM.Theme.getSize("narrow_margin").width
rightPadding: UM.Theme.getSize("narrow_margin").width
// key bindings, work when label is currently focused (active handle in LayerSlider) // key bindings, work when label is currently focused (active handle in LayerSlider)
Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1)) Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
Keys.onDownPressed: sliderLabelRoot.setValue(sliderLabelRoot.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1)) Keys.onDownPressed: sliderLabelRoot.setValue(sliderLabelRoot.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
color: UM.Theme.getColor("text")
style: TextFieldStyle { font: UM.Theme.getFont("default")
textColor: UM.Theme.getColor("text") renderType: Text.NativeRendering
font: UM.Theme.getFont("default") background: Item {}
renderType: Text.NativeRendering selectByMouse: true
background: Item { }
}
onEditingFinished: { onEditingFinished: {
@ -84,16 +79,18 @@ UM.PointingRectangle {
} }
} }
validator: IntValidator { validator: IntValidator
{
bottom: startFrom bottom: startFrom
top: sliderLabelRoot.maximumValue + startFrom // +startFrom because maybe we want to start in a different value rather than 0 top: sliderLabelRoot.maximumValue + startFrom // +startFrom because maybe we want to start in a different value rather than 0
} }
} }
BusyIndicator
BusyIndicator { {
id: busyIndicator id: busyIndicator
anchors { anchors
{
left: parent.right left: parent.right
leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2) leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter

View file

@ -2,9 +2,6 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UM 1.4 as UM import UM 1.4 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -1,13 +1,12 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1 import QtQuick.Controls 2.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import UM 1.0 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -43,22 +42,19 @@ Cura.ExpandableComponent
headerItem: Item headerItem: Item
{ {
Label UM.Label
{ {
id: colorSchemeLabel id: colorSchemeLabel
text: catalog.i18nc("@label", "Color scheme") text: catalog.i18nc("@label", "Color scheme")
verticalAlignment: Text.AlignVCenter
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
text: layerTypeCombobox.currentText text: layerTypeCombobox.currentText
verticalAlignment: Text.AlignVCenter
anchors anchors
{ {
left: colorSchemeLabel.right left: colorSchemeLabel.right
@ -68,8 +64,6 @@ Cura.ExpandableComponent
height: parent.height height: parent.height
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
} }
} }
@ -99,7 +93,8 @@ Cura.ExpandableComponent
spacing: UM.Theme.getSize("layerview_row_spacing").height spacing: UM.Theme.getSize("layerview_row_spacing").height
ListModel // matches SimulationView.py // matches SimulationView.py
ListModel
{ {
id: layerViewTypes id: layerViewTypes
} }
@ -132,18 +127,17 @@ Cura.ExpandableComponent
}) })
} }
ComboBox Cura.ComboBox
{ {
id: layerTypeCombobox id: layerTypeCombobox
textRole: "text"
valueRole: "type_id"
width: parent.width width: parent.width
implicitHeight: UM.Theme.getSize("setting_control").height
model: layerViewTypes model: layerViewTypes
visible: !UM.SimulationView.compatibilityMode visible: !UM.SimulationView.compatibilityMode
style: UM.Theme.styles.combobox
onActivated: onActivated: UM.Preferences.setValue("layerview/layer_view_type", index)
{
UM.Preferences.setValue("layerview/layer_view_type", index);
}
Component.onCompleted: Component.onCompleted:
{ {
@ -165,16 +159,13 @@ Cura.ExpandableComponent
} }
} }
Label UM.Label
{ {
id: compatibilityModeLabel id: compatibilityModeLabel
text: catalog.i18nc("@label", "Compatibility Mode") text: catalog.i18nc("@label", "Compatibility Mode")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
visible: UM.SimulationView.compatibilityMode visible: UM.SimulationView.compatibilityMode
height: UM.Theme.getSize("layerview_row").height height: UM.Theme.getSize("layerview_row").height
width: parent.width width: parent.width
renderType: Text.NativeRendering
} }
Item // Spacer Item // Spacer
@ -187,7 +178,7 @@ Cura.ExpandableComponent
{ {
model: CuraApplication.getExtrudersModel() model: CuraApplication.getExtrudersModel()
CheckBox UM.CheckBox
{ {
id: extrudersModelCheckBox id: extrudersModelCheckBox
checked: viewSettings.extruder_opacities[index] > 0.5 || viewSettings.extruder_opacities[index] == undefined || viewSettings.extruder_opacities[index] == "" checked: viewSettings.extruder_opacities[index] > 0.5 || viewSettings.extruder_opacities[index] == undefined || viewSettings.extruder_opacities[index] == ""
@ -201,8 +192,6 @@ Cura.ExpandableComponent
UM.Preferences.setValue("layerview/extruder_opacities", viewSettings.extruder_opacities.join("|")); UM.Preferences.setValue("layerview/extruder_opacities", viewSettings.extruder_opacities.join("|"));
} }
style: UM.Theme.styles.checkbox
Rectangle Rectangle
{ {
id: swatch id: swatch
@ -215,12 +204,11 @@ Cura.ExpandableComponent
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
} }
Label UM.Label
{ {
text: model.name text: model.name
elide: Text.ElideRight elide: Text.ElideRight
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
@ -229,7 +217,6 @@ Cura.ExpandableComponent
leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2) leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2)
rightMargin: UM.Theme.getSize("default_margin").width * 2 rightMargin: UM.Theme.getSize("default_margin").width * 2
} }
renderType: Text.NativeRendering
} }
} }
} }
@ -277,7 +264,7 @@ Cura.ExpandableComponent
} }
} }
CheckBox UM.CheckBox
{ {
id: legendModelCheckBox id: legendModelCheckBox
checked: model.initialValue checked: model.initialValue
@ -285,8 +272,6 @@ Cura.ExpandableComponent
height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
width: parent.width width: parent.width
style: UM.Theme.styles.checkbox
Rectangle Rectangle
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -299,7 +284,7 @@ Cura.ExpandableComponent
visible: viewSettings.show_legend visible: viewSettings.show_legend
} }
Label UM.Label
{ {
text: label text: label
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
@ -315,24 +300,22 @@ Cura.ExpandableComponent
} }
} }
CheckBox UM.CheckBox
{ {
checked: viewSettings.only_show_top_layers checked: viewSettings.only_show_top_layers
onClicked: UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0) onClicked: UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0)
text: catalog.i18nc("@label", "Only Show Top Layers") text: catalog.i18nc("@label", "Only Show Top Layers")
visible: UM.SimulationView.compatibilityMode visible: UM.SimulationView.compatibilityMode
style: UM.Theme.styles.checkbox
width: parent.width width: parent.width
} }
CheckBox UM.CheckBox
{ {
checked: viewSettings.top_layer_count == 5 checked: viewSettings.top_layer_count == 5
onClicked: UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1) onClicked: UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1)
text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top") text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top")
width: parent.width width: parent.width
visible: UM.SimulationView.compatibilityMode visible: UM.SimulationView.compatibilityMode
style: UM.Theme.styles.checkbox
} }
Repeater Repeater
@ -353,7 +336,7 @@ Cura.ExpandableComponent
} }
} }
Label UM.Label
{ {
text: label text: label
visible: viewSettings.show_legend visible: viewSettings.show_legend
@ -362,8 +345,6 @@ Cura.ExpandableComponent
height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
width: parent.width width: parent.width
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
Rectangle Rectangle
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
@ -388,7 +369,7 @@ Cura.ExpandableComponent
width: parent.width width: parent.width
height: UM.Theme.getSize("layerview_row").height height: UM.Theme.getSize("layerview_row").height
Label //Minimum value. UM.Label //Minimum value.
{ {
text: text:
{ {
@ -419,12 +400,9 @@ Cura.ExpandableComponent
return catalog.i18nc("@label","min") return catalog.i18nc("@label","min")
} }
anchors.left: parent.left anchors.left: parent.left
color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
} }
Label //Unit in the middle. UM.Label //Unit in the middle.
{ {
text: text:
{ {
@ -456,10 +434,9 @@ Cura.ExpandableComponent
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
} }
Label //Maximum value. UM.Label //Maximum value.
{ {
text: { text: {
if (UM.SimulationView.layerActivity && CuraApplication.platformActivity) if (UM.SimulationView.layerActivity && CuraApplication.platformActivity)
@ -490,7 +467,6 @@ Cura.ExpandableComponent
anchors.right: parent.right anchors.right: parent.right
color: UM.Theme.getColor("setting_control_text") color: UM.Theme.getColor("setting_control_text")
font: UM.Theme.getFont("default")
} }
} }

View file

@ -3,7 +3,6 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.4 import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.3
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -19,7 +18,7 @@ Button
{ {
anchors.fill: parent anchors.fill: parent
radius: 0.5 * width radius: 0.5 * width
color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled") color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_card_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled")
} }
UM.RecolorImage UM.RecolorImage

View file

@ -1,14 +1,13 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import UM 1.2 as UM import UM 1.5 as UM
import Cura 1.5 as Cura import Cura 1.5 as Cura
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.9
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Window 2.1 import QtQuick.Window 2.1
import QtQuick.Dialogs 1.2
Cura.MachineAction Cura.MachineAction
{ {
@ -36,32 +35,27 @@ Cura.MachineAction
id: discoverUM3Action id: discoverUM3Action
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
SystemPalette { id: palette }
UM.I18nCatalog { id: catalog; name:"cura" } UM.I18nCatalog { id: catalog; name:"cura" }
Label
UM.Label
{ {
id: pageTitle id: pageTitle
width: parent.width width: parent.width
text: catalog.i18nc("@title:window", "Connect to Networked Printer") text: catalog.i18nc("@title:window", "Connect to Networked Printer")
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
font.pointSize: 18
} }
Label UM.Label
{ {
id: pageDescription id: pageDescription
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.") + "\n\n" + catalog.i18nc("@label", "Select your printer from the list below:") text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.") + "\n\n" + catalog.i18nc("@label", "Select your printer from the list below:")
} }
Row Row
{ {
spacing: UM.Theme.getSize("default_lining").width spacing: UM.Theme.getSize("thin_margin").width
Button Cura.SecondaryButton
{ {
id: addButton id: addButton
text: catalog.i18nc("@action:button", "Add"); text: catalog.i18nc("@action:button", "Add");
@ -71,7 +65,7 @@ Cura.MachineAction
} }
} }
Button Cura.SecondaryButton
{ {
id: editButton id: editButton
text: catalog.i18nc("@action:button", "Edit") text: catalog.i18nc("@action:button", "Edit")
@ -82,7 +76,7 @@ Cura.MachineAction
} }
} }
Button Cura.SecondaryButton
{ {
id: removeButton id: removeButton
text: catalog.i18nc("@action:button", "Remove") text: catalog.i18nc("@action:button", "Remove")
@ -90,7 +84,7 @@ Cura.MachineAction
onClicked: manager.removeManualDevice(base.selectedDevice.key, base.selectedDevice.ipAddress) onClicked: manager.removeManualDevice(base.selectedDevice.key, base.selectedDevice.ipAddress)
} }
Button Cura.SecondaryButton
{ {
id: rediscoverButton id: rediscoverButton
text: catalog.i18nc("@action:button", "Refresh") text: catalog.i18nc("@action:button", "Refresh")
@ -109,70 +103,61 @@ Cura.MachineAction
width: Math.round(parent.width * 0.5) width: Math.round(parent.width * 0.5)
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
ScrollView ListView
{ {
id: objectListContainer id: listview
frameVisible: true
width: parent.width width: parent.width
height: base.height - contentRow.y - discoveryTip.height height: base.height - contentRow.y - discoveryTip.height
Rectangle ScrollBar.vertical: UM.ScrollBar {}
clip: true
model: manager.foundDevices
currentIndex: -1
onCurrentIndexChanged:
{ {
parent: viewport base.selectedDevice = listview.model[currentIndex];
anchors.fill: parent // Only allow connecting if the printer has responded to API query since the last refresh
color: palette.light base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true";
} }
Component.onCompleted: manager.startDiscovery()
ListView delegate: UM.Label
{ {
id: listview id: printNameLabel
model: manager.foundDevices width: listview.width
width: parent.width height: contentHeight
currentIndex: -1 anchors.left: parent.left
onCurrentIndexChanged: anchors.leftMargin: UM.Theme.getSize("default_margin").width
{
base.selectedDevice = listview.model[currentIndex];
// Only allow connecting if the printer has responded to API query since the last refresh
base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true";
}
Component.onCompleted: manager.startDiscovery()
delegate: Rectangle
{
height: childrenRect.height
color: ListView.isCurrentItem ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
width: parent.width
Label
{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
anchors.right: parent.right
text: listview.model[index].name
color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text
elide: Text.ElideRight
renderType: Text.NativeRendering
}
MouseArea anchors.right: parent.right
text: listview.model[index].name
elide: Text.ElideRight
MouseArea
{
anchors.fill: parent;
onClicked:
{ {
anchors.fill: parent; if(!parent.ListView.isCurrentItem)
onClicked:
{ {
if(!parent.ListView.isCurrentItem) parent.ListView.view.currentIndex = index;
{
parent.ListView.view.currentIndex = index;
}
} }
} }
} }
background: Rectangle
{
color: parent.ListView.isCurrentItem ? UM.Theme.getColor("background_3") : "transparent"
}
} }
} }
Label UM.Label
{ {
id: discoveryTip id: discoveryTip
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer"); text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer");
onLinkActivated: Qt.openUrlExternally(link) onLinkActivated: Qt.openUrlExternally(link)
} }
@ -183,32 +168,26 @@ Cura.MachineAction
width: Math.round(parent.width * 0.5) width: Math.round(parent.width * 0.5)
visible: base.selectedDevice ? true : false visible: base.selectedDevice ? true : false
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
text: base.selectedDevice ? base.selectedDevice.name : "" text: base.selectedDevice ? base.selectedDevice.name : ""
font: UM.Theme.getFont("large_bold") font: UM.Theme.getFont("large_bold")
elide: Text.ElideRight elide: Text.ElideRight
renderType: Text.NativeRendering
} }
Grid GridLayout
{ {
visible: base.completeProperties visible: base.completeProperties
width: parent.width width: parent.width
columns: 2 columns: 2
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Type") text: catalog.i18nc("@label", "Type")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: text:
{ {
if (base.selectedDevice) { if (base.selectedDevice) {
@ -217,41 +196,31 @@ Cura.MachineAction
return "" return ""
} }
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Firmware version") text: catalog.i18nc("@label", "Firmware version")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.firmwareVersion : "" text: base.selectedDevice ? base.selectedDevice.firmwareVersion : ""
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Address") text: catalog.i18nc("@label", "Address")
} }
Label UM.Label
{ {
width: Math.round(parent.width * 0.5) Layout.fillWidth: true
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.ipAddress : "" text: base.selectedDevice ? base.selectedDevice.ipAddress : ""
} }
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text:{ text:{
// The property cluster size does not exist for older UM3 devices. // The property cluster size does not exist for older UM3 devices.
if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1) if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1)
@ -269,16 +238,14 @@ Cura.MachineAction
} }
} }
Label UM.Label
{ {
width: parent.width width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
visible: base.selectedDevice != null && !base.completeProperties visible: base.selectedDevice != null && !base.completeProperties
text: catalog.i18nc("@label", "The printer at this address has not yet responded." ) text: catalog.i18nc("@label", "The printer at this address has not yet responded." )
} }
Button Cura.SecondaryButton
{ {
text: catalog.i18nc("@action:button", "Connect") text: catalog.i18nc("@action:button", "Connect")
enabled: (base.selectedDevice && base.completeProperties && base.selectedDevice.clusterSize > 0) ? true : false enabled: (base.selectedDevice && base.completeProperties && base.selectedDevice.clusterSize > 0) ? true : false
@ -288,18 +255,15 @@ Cura.MachineAction
} }
} }
MessageDialog Cura.MessageDialog
{ {
id: invalidIPAddressMessageDialog id: invalidIPAddressMessageDialog
x: parent ? (parent.x + (parent.width) / 2) : 0
y: parent ? (parent.y + (parent.height) / 2) : 0
title: catalog.i18nc("@title:window", "Invalid IP address") title: catalog.i18nc("@title:window", "Invalid IP address")
text: catalog.i18nc("@text", "Please enter a valid IP address.") text: catalog.i18nc("@text", "Please enter a valid IP address.")
icon: StandardIcon.Warning standardButtons: Dialog.Ok
standardButtons: StandardButton.Ok
} }
UM.Dialog Cura.MessageDialog
{ {
id: manualPrinterDialog id: manualPrinterDialog
property string printerKey property string printerKey
@ -307,17 +271,19 @@ Cura.MachineAction
title: catalog.i18nc("@title:window", "Printer Address") title: catalog.i18nc("@title:window", "Printer Address")
minimumWidth: 400 * screenScaleFactor width: UM.Theme.getSize("small_popup_dialog").width
minimumHeight: 130 * screenScaleFactor height: UM.Theme.getSize("small_popup_dialog").height
width: minimumWidth
height: minimumHeight anchors.centerIn: Overlay.overlay
standardButtons: Dialog.Yes | Dialog.No
signal showDialog(string key, string address) signal showDialog(string key, string address)
onShowDialog: onShowDialog:
{ {
printerKey = key; printerKey = key;
addressText = address; addressText = address;
manualPrinterDialog.show(); manualPrinterDialog.open();
addressField.selectAll(); addressField.selectAll();
addressField.focus = true; addressField.focus = true;
} }
@ -326,67 +292,45 @@ Cura.MachineAction
anchors.fill: parent anchors.fill: parent
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
Label UM.Label
{ {
text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.") text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.")
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
TextField Cura.TextField
{ {
id: addressField id: addressField
width: parent.width width: parent.width
validator: RegExpValidator validator: RegExpValidator { regExp: /[a-zA-Z0-9\.\-\_]*/ }
{
regExp: /[a-zA-Z0-9\.\-\_]*/
}
onAccepted: btnOk.clicked()
} }
} }
rightButtons: [ onAccepted:
Button { {
text: catalog.i18nc("@action:button","Cancel") // Validate the input first
onClicked: if (!networkingUtil.isValidIP(manualPrinterDialog.addressText))
{ {
manualPrinterDialog.reject() // prefent closing of element, as we want to keep the dialog active after a wrongly entered IP adress
manualPrinterDialog.hide() manualPrinterDialog.open()
} // show invalid ip warning
}, invalidIPAddressMessageDialog.open();
Button { return;
id: btnOk
text: catalog.i18nc("@action:button", "OK")
onClicked:
{
// Validate the input first
if (!networkingUtil.isValidIP(manualPrinterDialog.addressText))
{
invalidIPAddressMessageDialog.open()
return
}
// if the entered IP address has already been discovered, switch the current item to that item
// and do nothing else.
for (var i = 0; i < manager.foundDevices.length; i++)
{
var device = manager.foundDevices[i]
if (device.address == manualPrinterDialog.addressText)
{
currentItemIndex = i
manualPrinterDialog.hide()
return
}
}
manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText)
manualPrinterDialog.hide()
}
enabled: manualPrinterDialog.addressText.trim() != ""
isDefault: true
} }
]
// if the entered IP address has already been discovered, switch the current item to that item
// and do nothing else.
for (var i = 0; i < manager.foundDevices.length; i++)
{
var device = manager.foundDevices[i]
if (device.address == manualPrinterDialog.addressText)
{
currentItemIndex = i;
return;
}
}
manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText);
}
} }
} }

View file

@ -3,8 +3,6 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import UM 1.3 as UM import UM 1.3 as UM

View file

@ -3,7 +3,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
/** /**
* This component comprises a buildplate icon and the buildplate name. It is * This component comprises a buildplate icon and the buildplate name. It is
@ -57,19 +57,15 @@ Item
} }
} }
Label UM.Label
{ {
id: buildplateLabel id: buildplateLabel
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: buildplate ? buildplate : "" text: buildplate ? buildplate : ""
visible: text !== "" visible: text !== ""
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -2,10 +2,10 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 1.4 import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import UM 1.5 as UM
import UM 1.3 as UM import Cura 1.5 as Cura
UM.Dialog UM.Dialog
{ {
@ -18,12 +18,21 @@ UM.Dialog
width: minimumWidth width: minimumWidth
height: minimumHeight height: minimumHeight
title: catalog.i18nc("@title:window", "Configuration Changes") title: catalog.i18nc("@title:window", "Configuration Changes")
buttonSpacing: UM.Theme.getSize("narrow_margin").width
rightButtons: rightButtons:
[ [
Button Cura.TertiaryButton
{
id: cancelButton
text: catalog.i18nc("@action:button", "Cancel")
onClicked:
{
overrideConfirmationDialog.reject()
}
},
Cura.PrimaryButton
{ {
id: overrideButton id: overrideButton
anchors.margins: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@action:button", "Override") text: catalog.i18nc("@action:button", "Override")
onClicked: onClicked:
{ {
@ -50,20 +59,10 @@ UM.Dialog
} }
return true return true
} }
},
Button
{
id: cancelButton
anchors.margins: UM.Theme.getSize("default_margin").width
text: catalog.i18nc("@action:button", "Cancel")
onClicked:
{
overrideConfirmationDialog.reject()
}
} }
] ]
Label UM.Label
{ {
anchors anchors
{ {
@ -72,7 +71,6 @@ UM.Dialog
bottomMargin: 56 * screenScaleFactor // TODO: Theme! bottomMargin: 56 * screenScaleFactor // TODO: Theme!
} }
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: text:
{ {
if (!printer || !printer.activePrintJob) if (!printer || !printer.activePrintJob)

View file

@ -1,10 +1,10 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.0 import QtQuick.Controls 2.15
import QtQuick.Dialogs 1.1 import UM 1.5 as UM
import UM 1.3 as UM import Cura 1.6 as Cura
/** /**
* A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context * A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context
@ -134,32 +134,29 @@ Item
} }
} }
MessageDialog { Cura.MessageDialog
{
id: sendToTopConfirmationDialog id: sendToTopConfirmationDialog
Component.onCompleted: visible = false onAccepted: OutputDevice.sendJobToTop(printJob.key)
icon: StandardIcon.Warning standardButtons: Dialog.Yes | Dialog.No
onYes: OutputDevice.sendJobToTop(printJob.key)
standardButtons: StandardButton.Yes | StandardButton.No
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to move %1 to the top of the queue?").arg(printJob.name) : "" text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to move %1 to the top of the queue?").arg(printJob.name) : ""
title: catalog.i18nc("@window:title", "Move print job to top") title: catalog.i18nc("@window:title", "Move print job to top")
} }
MessageDialog { Cura.MessageDialog
{
id: deleteConfirmationDialog id: deleteConfirmationDialog
Component.onCompleted: visible = false onAccepted: OutputDevice.deleteJobFromQueue(printJob.key)
icon: StandardIcon.Warning standardButtons: Dialog.Yes | Dialog.No
onYes: OutputDevice.deleteJobFromQueue(printJob.key)
standardButtons: StandardButton.Yes | StandardButton.No
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to delete %1?").arg(printJob.name) : "" text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to delete %1?").arg(printJob.name) : ""
title: catalog.i18nc("@window:title", "Delete print job") title: catalog.i18nc("@window:title", "Delete print job")
} }
MessageDialog { Cura.MessageDialog
{
id: abortConfirmationDialog id: abortConfirmationDialog
Component.onCompleted: visible = false onAccepted: printJob.setState("abort")
icon: StandardIcon.Warning standardButtons: Dialog.Yes | Dialog.No
onYes: printJob.setState("abort")
standardButtons: StandardButton.Yes | StandardButton.No
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to abort %1?").arg(printJob.name) : "" text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to abort %1?").arg(printJob.name) : ""
title: catalog.i18nc("@window:title", "Abort print") title: catalog.i18nc("@window:title", "Abort print")
} }

View file

@ -3,7 +3,7 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
Button Button
@ -17,13 +17,12 @@ Button
radius: Math.round(0.5 * width) radius: Math.round(0.5 * width)
width: base.width width: base.width
} }
contentItem: Label { contentItem: UM.Label
{
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
font.pixelSize: 32 * screenScaleFactor font.pixelSize: 32 * screenScaleFactor
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: base.text text: base.text
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering;
} }
height: width height: width
hoverEnabled: enabled hoverEnabled: enabled

View file

@ -3,7 +3,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
/** /**
* This component is a sort of "super icon" which includes a colored SVG image * This component is a sort of "super icon" which includes a colored SVG image
@ -35,18 +35,16 @@ Item
width: size width: size
} }
Label UM.Label
{ {
id: positionLabel id: positionLabel
anchors.centerIn: icon anchors.centerIn: icon
font: UM.Theme.getFont("small") font: UM.Theme.getFont("small")
color: UM.Theme.getColor("text")
height: Math.round(size / 2) height: Math.round(size / 2)
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: position + 1 text: position + 1
verticalAlignment: Text.AlignVCenter
width: Math.round(size / 2) width: Math.round(size / 2)
visible: position >= 0 visible: position >= 0
renderType: Text.NativeRendering
} }
} }

View file

@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.5 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -55,10 +55,9 @@ Item
visible: !printJob visible: !printJob
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
text: printJob && printJob.name ? printJob.name : "" text: printJob && printJob.name ? printJob.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
@ -66,8 +65,6 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
width: parent.width width: parent.width
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -86,18 +83,15 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
visible: printJob visible: printJob
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: Math.round(18 * screenScaleFactor) // TODO: Theme! height: Math.round(18 * screenScaleFactor) // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -116,11 +110,10 @@ Item
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label UM.Label
{ {
id: printerAssignmentLabel id: printerAssignmentLabel
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: { text: {
@ -143,8 +136,6 @@ Item
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Row Row
@ -186,17 +177,15 @@ Item
height: Math.round(72 * screenScaleFactor) // TODO: Theme! height: Math.round(72 * screenScaleFactor) // TODO: Theme!
} }
Label { UM.Label
{
text: printJob && printJob.owner ? printJob.owner : "" text: printJob && printJob.owner ? printJob.owner : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.top: printerConfiguration.top anchors.top: printerConfiguration.top
// FIXED-LINE-HEIGHT: // FIXED-LINE-HEIGHT:
height: Math.round(18 * screenScaleFactor) // TODO: Theme! height: Math.round(18 * screenScaleFactor) // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
} }

View file

@ -2,9 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls.Styles 1.3 import UM 1.5 as UM
import QtQuick.Controls 1.4
import UM 1.3 as UM
/** /**
* NOTE: For most labels, a fixed height with vertical alignment is used to make * NOTE: For most labels, a fixed height with vertical alignment is used to make
@ -20,7 +18,7 @@ Item
property var printJob: null property var printJob: null
width: childrenRect.width width: childrenRect.width
height: UM.Theme.getSize("monitor_text_line").height height: percentLabel.height
UM.ProgressBar UM.ProgressBar
{ {
@ -34,36 +32,28 @@ Item
width: UM.Theme.getSize("monitor_progress_bar").width width: UM.Theme.getSize("monitor_progress_bar").width
} }
Label UM.Label
{ {
id: percentLabel id: percentLabel
anchors anchors
{ {
left: progressBar.right left: progressBar.right
leftMargin: UM.Theme.getSize("monitor_margin").width leftMargin: UM.Theme.getSize("default_margin").width
verticalCenter: parent.verticalCenter
} }
text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%"
color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
width: contentWidth width: contentWidth
font: UM.Theme.getFont("default") // 12pt, regular wrapMode: Text.NoWrap
// FIXED-LINE-HEIGHT:
height: UM.Theme.getSize("monitor_text_line").height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: statusLabel id: statusLabel
anchors anchors
{ {
left: percentLabel.right left: percentLabel.right
leftMargin: UM.Theme.getSize("monitor_margin").width leftMargin: UM.Theme.getSize("default_margin").width
verticalCenter: parent.verticalCenter
} }
color: UM.Theme.getColor("text") wrapMode: Text.NoWrap
font: UM.Theme.getFont("default")
text: text:
{ {
if (!printJob) if (!printJob)
@ -117,10 +107,5 @@ Item
} }
} }
width: contentWidth width: contentWidth
// FIXED-LINE-HEIGHT:
height: UM.Theme.getSize("monitor_text_line").height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }

View file

@ -3,8 +3,7 @@
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.1 import UM 1.5 as UM
import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -64,7 +63,7 @@ Item
leftMargin: 36 * screenScaleFactor // TODO: Theme! leftMargin: 36 * screenScaleFactor // TODO: Theme!
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: UM.Theme.getSize("default_margin").width
Rectangle Rectangle
{ {
@ -96,23 +95,18 @@ Item
{ {
id: printerNameLabel id: printerNameLabel
color: printer ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading") color: printer ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
height: 18 * screenScaleFactor // TODO: Theme! height: UM.Theme.getSize("default_margin").width
width: parent.width width: parent.width
radius: 2 * screenScaleFactor // TODO: Theme! radius: UM.Theme.getSize("default_radius").width
Label UM.Label
{ {
text: printer && printer.name ? printer.name : "" text: printer && printer.name ? printer.name : ""
color: UM.Theme.getColor("text")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("large") // 16pt, bold font: UM.Theme.getFont("large") // 16pt, bold
width: parent.width width: parent.width
visible: printer visible: printer
// FIXED-LINE-HEIGHT:
height: parent.height height: parent.height
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -120,7 +114,7 @@ Item
{ {
color: UM.Theme.getColor("monitor_skeleton_loading") color: UM.Theme.getColor("monitor_skeleton_loading")
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
radius: 2 * screenScaleFactor // TODO: Theme! radius: UM.Theme.getSize("default_radius").width
visible: !printer visible: !printer
width: 48 * screenScaleFactor // TODO: Theme! width: 48 * screenScaleFactor // TODO: Theme!
} }
@ -138,21 +132,20 @@ Item
Item Item
{ {
id: managePrinterLink id: managePrinterLink
anchors { anchors
{
top: printerFamilyPill.bottom top: printerFamilyPill.bottom
topMargin: UM.Theme.getSize("narrow_margin").height topMargin: UM.Theme.getSize("narrow_margin").height
} }
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: childrenRect.width width: childrenRect.width
Label UM.Label
{ {
id: managePrinterText id: managePrinterText
anchors.verticalCenter: managePrinterLink.verticalCenter anchors.verticalCenter: managePrinterLink.verticalCenter
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer") text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer")
renderType: Text.NativeRendering
} }
UM.RecolorImage UM.RecolorImage
{ {
@ -165,22 +158,16 @@ Item
} }
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
source: UM.Theme.getIcon("LinkExternal") source: UM.Theme.getIcon("LinkExternal")
width: 12 * screenScaleFactor width: UM.Theme.getSize("icon").width
height: 12 * screenScaleFactor height: UM.Theme.getSize("icon").height
} }
} }
MouseArea MouseArea
{ {
anchors.fill: managePrinterLink anchors.fill: managePrinterLink
onClicked: OutputDevice.openPrinterControlPanel() onClicked: OutputDevice.openPrinterControlPanel()
onEntered: onEntered: manageQueueText.font.underline = true
{ onExited: manageQueueText.font.underline = false
manageQueueText.font.underline = true
}
onExited:
{
manageQueueText.font.underline = false
}
} }
} }
@ -332,9 +319,9 @@ Item
leftMargin: 36 * screenScaleFactor // TODO: Theme! leftMargin: 36 * screenScaleFactor // TODO: Theme!
} }
height: childrenRect.height height: childrenRect.height
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: UM.Theme.getSize("default_margin").width
Label UM.Label
{ {
id: printerStatus id: printerStatus
anchors anchors
@ -371,7 +358,6 @@ Item
return "" return ""
} }
visible: text !== "" visible: text !== ""
renderType: Text.NativeRendering
} }
Item Item
@ -401,22 +387,18 @@ Item
height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme! height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme!
visible: printer && printer.activePrintJob && !printerStatus.visible visible: printer && printer.activePrintJob && !printerStatus.visible
Label UM.Label
{ {
id: printerJobNameLabel id: printerJobNameLabel
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap
font: UM.Theme.getFont("large") // 16pt, bold font: UM.Theme.getFont("large") // 16pt, bold
text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled") text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled")
width: parent.width width: parent.width
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
Label UM.Label
{ {
id: printerJobOwnerLabel id: printerJobOwnerLabel
anchors anchors
@ -427,14 +409,8 @@ Item
} }
color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
elide: Text.ElideRight elide: Text.ElideRight
font: UM.Theme.getFont("default") // 12pt, regular
text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous") text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous")
width: parent.width width: parent.width
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
@ -448,59 +424,27 @@ Item
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length === 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length === 0 && !printerStatus.visible
} }
Label UM.Label
{ {
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
} }
font: UM.Theme.getFont("default")
text: catalog.i18nc("@label:status", "Requires configuration changes") text: catalog.i18nc("@label:status", "Requires configuration changes")
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
color: UM.Theme.getColor("text")
// FIXED-LINE-HEIGHT:
height: 18 * screenScaleFactor // TODO: Theme!
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
} }
} }
Button Cura.SecondaryButton
{ {
id: detailsButton id: detailsButton
anchors anchors
{ {
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
rightMargin: 18 * screenScaleFactor // TODO: Theme! rightMargin: UM.Theme.getSize("default_margin").width
} }
background: Rectangle text: catalog.i18nc("@action:button", "Details")
{
color: UM.Theme.getColor("monitor_secondary_button_shadow")
radius: 2 * screenScaleFactor // Todo: Theme!
Rectangle
{
anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: detailsButton.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : UM.Theme.getColor("monitor_secondary_button")
radius: 2 * screenScaleFactor // Todo: Theme!
}
}
contentItem: Label
{
anchors.fill: parent
anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme!
color: UM.Theme.getColor("monitor_secondary_button_text")
font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@action:button", "Details");
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
height: 18 * screenScaleFactor // TODO: Theme!
renderType: Text.NativeRendering
}
implicitHeight: 32 * screenScaleFactor // TODO: Theme!
implicitWidth: 96 * screenScaleFactor // TODO: Theme!
visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible
onClicked: base.enabled ? overrideConfirmationDialog.open() : {} onClicked: base.enabled ? overrideConfirmationDialog.open() : {}
enabled: OutputDevice.supportsPrintJobActions enabled: OutputDevice.supportsPrintJobActions

View file

@ -2,8 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4 import UM 1.5 as UM
import UM 1.2 as UM
/** /**
* A MonitorPrinterPill is a blue-colored tag indicating which printers a print * A MonitorPrinterPill is a blue-colored tag indicating which printers a print
@ -17,20 +16,19 @@ Item
implicitHeight: 18 * screenScaleFactor // TODO: Theme! implicitHeight: 18 * screenScaleFactor // TODO: Theme!
implicitWidth: Math.max(printerNameLabel.contentWidth + 12 * screenScaleFactor, 36 * screenScaleFactor) // TODO: Theme! implicitWidth: Math.max(printerNameLabel.contentWidth + 12 * screenScaleFactor, 36 * screenScaleFactor) // TODO: Theme!
Rectangle { Rectangle
{
id: background id: background
anchors.fill: parent anchors.fill: parent
color: printerNameLabel.visible ? UM.Theme.getColor("monitor_printer_family_tag") : UM.Theme.getColor("monitor_skeleton_loading") color: printerNameLabel.visible ? UM.Theme.getColor("monitor_printer_family_tag") : UM.Theme.getColor("monitor_skeleton_loading")
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label { UM.Label
{
id: printerNameLabel id: printerNameLabel
anchors.centerIn: parent anchors.centerIn: parent
color: UM.Theme.getColor("text")
text: monitorPrinterPill.text text: monitorPrinterPill.text
font.pointSize: 10 // TODO: Theme!
visible: monitorPrinterPill.text !== "" visible: monitorPrinterPill.text !== ""
renderType: Text.NativeRendering
} }
} }

View file

@ -1,10 +1,9 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4 import QtQuick.Controls 2.15
import QtQuick.Controls.Styles 1.4 import UM 1.5 as UM
import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
/** /**
@ -18,18 +17,16 @@ Item
// they might not need to though. // they might not need to though.
property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection
Label UM.Label
{ {
id: queuedLabel id: queuedLabel
anchors anchors
{ {
left: queuedPrintJobs.left left: printJobList.left
top: parent.top top: parent.top
} }
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
text: catalog.i18nc("@label", "Queued") text: catalog.i18nc("@label", "Queued")
renderType: Text.NativeRendering
} }
Item Item
@ -37,7 +34,7 @@ Item
id: manageQueueLabel id: manageQueueLabel
anchors anchors
{ {
right: queuedPrintJobs.right right: printJobList.right
verticalCenter: queuedLabel.verticalCenter verticalCenter: queuedLabel.verticalCenter
} }
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
@ -52,7 +49,7 @@ Item
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
} }
Label UM.Label
{ {
id: manageQueueText id: manageQueueText
anchors anchors
@ -64,7 +61,6 @@ Item
color: UM.Theme.getColor("text_link") color: UM.Theme.getColor("text_link")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
text: catalog.i18nc("@label link to connect manager", "Manage in browser") text: catalog.i18nc("@label link to connect manager", "Manage in browser")
renderType: Text.NativeRendering
} }
} }
@ -72,14 +68,9 @@ Item
{ {
anchors.fill: manageQueueLabel anchors.fill: manageQueueLabel
onClicked: OutputDevice.openPrintJobControlPanel() onClicked: OutputDevice.openPrintJobControlPanel()
onEntered: onEntered: manageQueueText.font.underline = true
{
manageQueueText.font.underline = true onExited: manageQueueText.font.underline = false
}
onExited:
{
manageQueueText.font.underline = false
}
} }
Row Row
@ -87,96 +78,85 @@ Item
id: printJobQueueHeadings id: printJobQueueHeadings
anchors anchors
{ {
left: queuedPrintJobs.left left: printJobList.left
leftMargin: UM.Theme.getSize("narrow_margin").width leftMargin: UM.Theme.getSize("narrow_margin").width
top: queuedLabel.bottom top: queuedLabel.bottom
topMargin: 24 * screenScaleFactor // TODO: Theme! topMargin: 24 * screenScaleFactor // TODO: Theme!
} }
spacing: 18 * screenScaleFactor // TODO: Theme! spacing: 18 * screenScaleFactor // TODO: Theme!
Label UM.Label
{ {
text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
renderType: Text.NativeRendering
visible: printJobList.count === 0 visible: printJobList.count === 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Print jobs") text: catalog.i18nc("@label", "Print jobs")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: 284 * screenScaleFactor // TODO: Theme! (Should match column size) width: 284 * screenScaleFactor // TODO: Theme! (Should match column size)
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Total print time") text: catalog.i18nc("@label", "Total print time")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.getSize("monitor_column").width width: UM.Theme.getSize("monitor_column").width
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
Label UM.Label
{ {
text: catalog.i18nc("@label", "Waiting for") text: catalog.i18nc("@label", "Waiting for")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium") // 14pt, regular font: UM.Theme.getFont("medium") // 14pt, regular
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: UM.Theme.getSize("monitor_column").width width: UM.Theme.getSize("monitor_column").width
renderType: Text.NativeRendering
visible: printJobList.count > 0 visible: printJobList.count > 0
} }
} }
ScrollView ListView
{ {
id: queuedPrintJobs id: printJobList
anchors anchors
{ {
bottom: parent.bottom bottom: parent.bottom
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
top: printJobQueueHeadings.bottom top: printJobQueueHeadings.bottom
topMargin: 12 * screenScaleFactor // TODO: Theme! topMargin: UM.Theme.getSize("default_margin").width
} }
style: UM.Theme.styles.scrollview
width: parent.width width: parent.width
ListView ScrollBar.vertical: UM.ScrollBar
{ {
id: printJobList id: printJobScrollBar
anchors.fill: parent }
delegate: MonitorPrintJobCard spacing: UM.Theme.getSize("narrow_margin").width
clip: true
delegate: MonitorPrintJobCard
{
anchors
{ {
anchors left: parent.left
{ right: parent.right
left: parent.left rightMargin: printJobScrollBar.width
right: parent.right
}
printJob: modelData
} }
model: printJob: modelData
}
model:
{
if (OutputDevice.receivedData)
{ {
if (OutputDevice.receivedData) return OutputDevice.queuedPrintJobs
{
return OutputDevice.queuedPrintJobs
}
return [null, null]
} }
spacing: 6 // TODO: Theme! return [null, null]
} }
} }
} }

View file

@ -2,8 +2,6 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -1,24 +1,24 @@
// Copyright (c) 2019 Ultimaker B.V. // Copyright (c) 2021 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4 import UM 1.5 as UM
import UM 1.3 as UM
Button { Button
background: Rectangle { {
opacity: parent.down || parent.hovered ? 1 : 0; background: Rectangle
{
opacity: parent.down || parent.hovered ? 1 : 0
color: UM.Theme.getColor("monitor_context_menu_hover") color: UM.Theme.getColor("monitor_context_menu_hover")
} }
contentItem: Label { contentItem: UM.Label
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled"); {
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
text: parent.text text: parent.text
horizontalAlignment: Text.AlignLeft; horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter;
renderType: Text.NativeRendering;
} }
height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme! height: visible ? 39 * screenScaleFactor : 0 // TODO: Theme!
hoverEnabled: true; hoverEnabled: true
width: parent.width; width: parent.width
} }

View file

@ -2,8 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.1 import QtQuick.Controls 2.15
import QtQuick.Controls 2.15 as NewControls
import UM 1.1 as UM import UM 1.1 as UM
@ -84,7 +83,7 @@ UM.Dialog {
renderType: Text.NativeRendering; renderType: Text.NativeRendering;
} }
NewControls.ComboBox { ComboBox {
id: printerComboBox; id: printerComboBox;
currentIndex: 0; currentIndex: 0;
Behavior on height { NumberAnimation { duration: 100 } } Behavior on height { NumberAnimation { duration: 100 } }

View file

@ -2,8 +2,6 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM import UM 1.3 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View file

@ -3,7 +3,6 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -22,7 +21,10 @@ Component
Cura.PrintMonitor Cura.PrintMonitor
{ {
anchors.fill: parent anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: footerSeparator.top
} }
Rectangle Rectangle

View file

@ -29,9 +29,10 @@ class VersionUpgrade48to49(VersionUpgrade):
parser["general"]["version"] = "7" parser["general"]["version"] = "7"
# Update visibility settings to include new top_bottom category # Update visibility settings to include new top_bottom category
parser["general"]["visible_settings"] += ";top_bottom" if "visible_settings" in parser["general"]:
parser["general"]["visible_settings"] += ";top_bottom"
if "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]): if "cura" in parser and "categories_expanded" in parser["cura"] and any([setting in parser["cura"]["categories_expanded"] for setting in self._moved_visibility_settings]):
parser["cura"]["categories_expanded"] += ";top_bottom" parser["cura"]["categories_expanded"] += ";top_bottom"
# If the account scope in 4.8 is outdated, delete it so that the user is enforced to log in again and get the # If the account scope in 4.8 is outdated, delete it so that the user is enforced to log in again and get the

View file

@ -1092,38 +1092,6 @@
"default_value": "inward_distributed", "default_value": "inward_distributed",
"limit_to_extruder": "wall_0_extruder_nr" "limit_to_extruder": "wall_0_extruder_nr"
}, },
"wall_transition_threshold": {
"label": "Middle Line Threshold",
"description": "The smallest line width, as a factor of the normal line width, below which it will choose to use fewer, but wider lines to fill the available space the wall needs to occupy. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.",
"type": "float",
"unit": "%",
"default_value": 90,
"minimum_value": "1",
"maximum_value": "99",
"children":
{
"wall_split_middle_threshold": {
"label": "Split Middle Line Threshold",
"description": "The smallest line width, as a factor of the normal line width, above which the middle line (if there is one) will be split into two. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.",
"type": "float",
"unit": "%",
"default_value": 90,
"value": "wall_transition_threshold",
"minimum_value": "1",
"maximum_value": "99"
},
"wall_add_middle_threshold": {
"label": "Add Middle Line Threshold",
"description": "The smallest line width, as a factor of the normal line width, above which a middle line (if there wasn't one already) will be added. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.",
"type": "float",
"unit": "%",
"default_value": 80,
"value": "wall_transition_threshold * 8 / 9",
"minimum_value": "1",
"maximum_value": "99"
}
}
},
"wall_transition_length": "wall_transition_length":
{ {
"label": "Wall Transition Length", "label": "Wall Transition Length",
@ -1142,14 +1110,15 @@
"label": "Wall Distribution Count", "label": "Wall Distribution Count",
"description": "The number of walls, counted from the center, over which the variation needs to be spread. Lower values mean that the outer walls don't change in width.", "description": "The number of walls, counted from the center, over which the variation needs to be spread. Lower values mean that the outer walls don't change in width.",
"type": "int", "type": "int",
"maximum_value": "999999",
"default_value": 1, "default_value": 1,
"minimum_value": "1", "minimum_value": "1",
"enabled": "beading_strategy_type == 'inward_distributed'" "enabled": "beading_strategy_type == 'inward_distributed'"
}, },
"wall_transition_angle": "wall_transition_angle":
{ {
"label": "Wall Transition Angle", "label": "Wall Transitioning Threshold Angle",
"description": "When transitioning between different numbers of walls as the part becomes thinner, two adjacent walls will join together at this angle. This can make the walls come together faster than what the Wall Transition Length indicates, filling the space better.", "description": "When to create transitions between even and odd numbers of walls. A wedge shape with an angle greater than this setting will not have transitions and no walls will be printed in the center to fill the remaining space. Reducing this setting reduces the number and length of these center walls, but may leave gaps or overextrude.",
"type": "float", "type": "float",
"unit": "°", "unit": "°",
"default_value": 10, "default_value": 10,
@ -1198,8 +1167,8 @@
}, },
"optimize_wall_printing_order": "optimize_wall_printing_order":
{ {
"label": "Order Inner Walls By Inset", "label": "Optimize Wall Printing Order",
"description": "Order inner wall printing by inset-index, instead of by (hole) region.", "description": "Optimize the order in which walls are printed so as to reduce the number of retractions and the distance travelled. Most parts will benefit from this being enabled but some may actually take longer so please compare the print time estimates with and without optimization. First layer is not optimized when choosing brim as build plate adhesion type.",
"type": "bool", "type": "bool",
"default_value": false, "default_value": false,
"settable_per_mesh": true "settable_per_mesh": true
@ -1235,6 +1204,74 @@
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true "settable_per_mesh": true
}, },
"min_wall_line_width":
{
"label": "Minimum Wall Line Width",
"description": "For thin structures around once or twice the nozzle size, the line widths need to be altered to adhere to the thickness of the model. This setting controls the minimum line width allowed for the walls. The minimum line widths inherently also determine the maximum line widths, since we transition from N to N+1 walls at some geometry thickness where the N walls are wide and the N+1 walls are narrow. The widest possible wall line is twice the Minimum Wall Line Width.",
"unit": "mm",
"minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)",
"maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)",
"minimum_value_warning_old": "(0.1 + 0.4 * machine_nozzle_size) if inset_direction == \"outside_in\" else 0.1 * machine_nozzle_size",
"maximum_value_warning_old": "2 * machine_nozzle_size",
"default_value": 0.3,
"value": "machine_nozzle_size * .75",
"type": "float",
"settable_per_mesh": true,
"children":
{
"min_even_wall_line_width":
{
"label": "Minimum Even Wall Line Width",
"description": "The minimum line width for normal polygonal walls. This setting determines at which model thickness we switch from printing a single thin wall line, to printing two wall lines. A higher Minimum Even Wall Line Width leads to a higher maximum odd wall line width. The maximum even wall line width is calculated as Outer Wall Line Width + 0.5 * Minimum Odd Wall Line Width.",
"unit": "mm",
"minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)",
"maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)",
"default_value": 0.3,
"value": "min_wall_line_width",
"type": "float",
"settable_per_mesh": true,
"children":
{
"wall_split_middle_threshold": {
"label": "Split Middle Line Threshold",
"description": "The smallest line width, as a factor of the normal line width, above which the middle line (if there is one) will be split into two. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.",
"type": "float",
"unit": "%",
"default_value": 50,
"value": "max(1, min(99, 100 * (2 * min_even_wall_line_width - wall_line_width_0) / wall_line_width_0))",
"value_explicit": "100 * (2 * min_even_wall_line_width - wall_line_width_0) / (wall_line_width_0 + wall_line_width_x - wall_line_width_0)",
"minimum_value": "1",
"maximum_value": "99"
}
}
},
"min_odd_wall_line_width":
{
"label": "Minimum Odd Wall Line Width",
"description": "The minimum line width for middle line gap filler polyline walls. This setting determines at which model thickness we switch from printing two wall lines, to printing two outer walls and a single central wall in the middle. A higher Minimum Odd Wall Line Width leads to a higher maximum even wall line width. The maximum odd wall line width is calculated as 2 * Minimum Even Wall Line Width,",
"unit": "mm",
"minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)",
"maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)",
"default_value": 0.3,
"value": "min_wall_line_width",
"type": "float",
"settable_per_mesh": true,
"children":
{
"wall_add_middle_threshold": {
"label": "Add Middle Line Threshold",
"description": "The smallest line width, as a factor of the normal line width, above which a middle line (if there wasn't one already) will be added. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.",
"type": "float",
"unit": "%",
"default_value": 75,
"value": "max(1, min(99, 100 * min_odd_wall_line_width / wall_line_width_x))",
"minimum_value": "1",
"maximum_value": "99"
}
}
}
}
},
"fill_outline_gaps": { "fill_outline_gaps": {
"label": "Print Thin Walls", "label": "Print Thin Walls",
"description": "Print pieces of the model which are horizontally thinner than the nozzle size.", "description": "Print pieces of the model which are horizontally thinner than the nozzle size.",
@ -1259,10 +1296,10 @@
}, },
"min_bead_width": "min_bead_width":
{ {
"label": "Minimum Wall Line Width", "label": "Minimum Thin Wall Line Width",
"description": "Width of the wall that will replace thin features (according to the Minimum Feature Size) of the model. If the Minimum Wall Line Width is thinner than the thickness of the feature, the wall will become as thick as the feature itself.", "description": "Width of the wall that will replace thin features (according to the Minimum Feature Size) of the model. If the Minimum Wall Line Width is thinner than the thickness of the feature, the wall will become as thick as the feature itself.",
"unit": "mm", "unit": "mm",
"value": "wall_line_width_0 * (100.0 + wall_split_middle_threshold)/200", "value": "machine_nozzle_size * .75",
"default_value": 0.2, "default_value": 0.2,
"minimum_value": "0.001", "minimum_value": "0.001",
"minimum_value_warning": "min_feature_size", "minimum_value_warning": "min_feature_size",
@ -1433,6 +1470,7 @@
"minimum_value": "0", "minimum_value": "0",
"maximum_value_warning": "top_layers - 1", "maximum_value_warning": "top_layers - 1",
"type": "int", "type": "int",
"maximum_value": "999999",
"value": "0", "value": "0",
"limit_to_extruder": "roofing_extruder_nr", "limit_to_extruder": "roofing_extruder_nr",
"settable_per_mesh": true, "settable_per_mesh": true,
@ -1486,6 +1524,7 @@
"default_value": 8, "default_value": 8,
"minimum_value": "0", "minimum_value": "0",
"maximum_value_warning": "100", "maximum_value_warning": "100",
"maximum_value": "999999",
"type": "int", "type": "int",
"minimum_value_warning": "2", "minimum_value_warning": "2",
"value": "0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))", "value": "0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))",
@ -1516,8 +1555,9 @@
"minimum_value": "0", "minimum_value": "0",
"minimum_value_warning": "2", "minimum_value_warning": "2",
"default_value": 6, "default_value": 6,
"maximum_value": "999999",
"type": "int", "type": "int",
"value": "999999 if infill_sparse_density == 100 else math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))", "value": "999999 if infill_sparse_density == 100 and not magic_spiralize else math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))",
"limit_to_extruder": "top_bottom_extruder_nr", "limit_to_extruder": "top_bottom_extruder_nr",
"settable_per_mesh": true "settable_per_mesh": true
}, },
@ -1527,6 +1567,7 @@
"description": "The number of initial bottom layers, from the build-plate upwards. When calculated by the bottom thickness, this value is rounded to a whole number.", "description": "The number of initial bottom layers, from the build-plate upwards. When calculated by the bottom thickness, this value is rounded to a whole number.",
"minimum_value": "0", "minimum_value": "0",
"minimum_value_warning": "2", "minimum_value_warning": "2",
"maximum_value": "999999",
"default_value": 6, "default_value": 6,
"type": "int", "type": "int",
"value": "bottom_layers", "value": "bottom_layers",
@ -2048,6 +2089,7 @@
"description": "Convert each infill line to this many lines. The extra lines do not cross over each other, but avoid each other. This makes the infill stiffer, but increases print time and material usage.", "description": "Convert each infill line to this many lines. The extra lines do not cross over each other, but avoid each other. This makes the infill stiffer, but increases print time and material usage.",
"default_value": 1, "default_value": 1,
"type": "int", "type": "int",
"maximum_value": "999999",
"minimum_value": "1", "minimum_value": "1",
"maximum_value_warning": "infill_line_distance / infill_line_width", "maximum_value_warning": "infill_line_distance / infill_line_width",
"enabled": "infill_sparse_density > 0 and infill_pattern != 'zigzag' and (gradual_infill_steps == 0 or not zig_zaggify_infill)", "enabled": "infill_sparse_density > 0 and infill_pattern != 'zigzag' and (gradual_infill_steps == 0 or not zig_zaggify_infill)",
@ -2233,6 +2275,7 @@
"minimum_value": "0", "minimum_value": "0",
"maximum_value_warning": "10", "maximum_value_warning": "10",
"type": "int", "type": "int",
"maximum_value": "999999",
"value": "math.ceil(round(skin_edge_support_thickness / resolveOrValue('infill_sparse_thickness'), 4))", "value": "math.ceil(round(skin_edge_support_thickness / resolveOrValue('infill_sparse_thickness'), 4))",
"limit_to_extruder": "infill_extruder_nr", "limit_to_extruder": "infill_extruder_nr",
"enabled": "infill_sparse_density > 0", "enabled": "infill_sparse_density > 0",
@ -3257,6 +3300,7 @@
"default_value": 2, "default_value": 2,
"resolve": "round(sum(extruderValues('speed_slowdown_layers')) / len(extruderValues('speed_slowdown_layers')))", "resolve": "round(sum(extruderValues('speed_slowdown_layers')) / len(extruderValues('speed_slowdown_layers')))",
"minimum_value": "0", "minimum_value": "0",
"maximum_value": "999999",
"maximum_value_warning": "3.2 / resolveOrValue('layer_height')", "maximum_value_warning": "3.2 / resolveOrValue('layer_height')",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
@ -4358,6 +4402,7 @@
"default_value": "0", "default_value": "0",
"value": "support_extruder_nr", "value": "support_extruder_nr",
"enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1",
"resolve": "max(extruderValues('support_interface_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false, "settable_per_extruder": false,
"children": "children":
@ -4370,6 +4415,7 @@
"default_value": "0", "default_value": "0",
"value": "support_interface_extruder_nr", "value": "support_interface_extruder_nr",
"enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1",
"resolve": "max(extruderValues('support_roof_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
}, },
@ -4381,6 +4427,7 @@
"default_value": "0", "default_value": "0",
"value": "support_interface_extruder_nr", "value": "support_interface_extruder_nr",
"enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1",
"resolve": "max(extruderValues('support_bottom_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
} }
@ -5413,6 +5460,7 @@
"default_value": "0", "default_value": "0",
"value": "int(defaultExtruderPosition())", "value": "int(defaultExtruderPosition())",
"enabled": "extruders_enabled_count > 1 and (resolveOrValue('adhesion_type') != 'none' or resolveOrValue('prime_tower_brim_enable'))", "enabled": "extruders_enabled_count > 1 and (resolveOrValue('adhesion_type') != 'none' or resolveOrValue('prime_tower_brim_enable'))",
"resolve": "max(extruderValues('adhesion_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false, "settable_per_extruder": false,
"children": "children":
@ -5436,6 +5484,7 @@
"default_value": "0", "default_value": "0",
"value": "adhesion_extruder_nr", "value": "adhesion_extruder_nr",
"enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'",
"resolve": "max(extruderValues('raft_base_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
}, },
@ -5447,6 +5496,7 @@
"default_value": "0", "default_value": "0",
"value": "adhesion_extruder_nr", "value": "adhesion_extruder_nr",
"enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'",
"resolve": "max(extruderValues('raft_interface_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
}, },
@ -5458,6 +5508,7 @@
"default_value": "0", "default_value": "0",
"value": "adhesion_extruder_nr", "value": "adhesion_extruder_nr",
"enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'",
"resolve": "max(extruderValues('raft_surface_extruder_nr'))",
"settable_per_mesh": false, "settable_per_mesh": false,
"settable_per_extruder": false "settable_per_extruder": false
} }
@ -6955,7 +7006,6 @@
"type": "bool", "type": "bool",
"default_value": false, "default_value": false,
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"enabled": false,
"settable_per_mesh": true "settable_per_mesh": true
}, },
"magic_fuzzy_skin_outside_only": "magic_fuzzy_skin_outside_only":
@ -6964,7 +7014,7 @@
"description": "Jitter only the parts' outlines and not the parts' holes.", "description": "Jitter only the parts' outlines and not the parts' holes.",
"type": "bool", "type": "bool",
"default_value": false, "default_value": false,
"enabled": "magic_fuzzy_skin_enabled and False" , "enabled": "magic_fuzzy_skin_enabled",
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true "settable_per_mesh": true
}, },
@ -6977,7 +7027,7 @@
"default_value": 0.3, "default_value": 0.3,
"minimum_value": "0.001", "minimum_value": "0.001",
"maximum_value_warning": "wall_line_width_0", "maximum_value_warning": "wall_line_width_0",
"enabled": "magic_fuzzy_skin_enabled and False", "enabled": "magic_fuzzy_skin_enabled",
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true "settable_per_mesh": true
}, },
@ -6992,7 +7042,7 @@
"minimum_value_warning": "0.1", "minimum_value_warning": "0.1",
"maximum_value_warning": "10", "maximum_value_warning": "10",
"maximum_value": "2 / magic_fuzzy_skin_thickness", "maximum_value": "2 / magic_fuzzy_skin_thickness",
"enabled": "magic_fuzzy_skin_enabled and False", "enabled": "magic_fuzzy_skin_enabled",
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true, "settable_per_mesh": true,
"children": "children":
@ -7008,7 +7058,7 @@
"minimum_value_warning": "0.1", "minimum_value_warning": "0.1",
"maximum_value_warning": "10", "maximum_value_warning": "10",
"value": "10000 if magic_fuzzy_skin_point_density == 0 else 1 / magic_fuzzy_skin_point_density", "value": "10000 if magic_fuzzy_skin_point_density == 0 else 1 / magic_fuzzy_skin_point_density",
"enabled": "magic_fuzzy_skin_enabled and False", "enabled": "magic_fuzzy_skin_enabled",
"limit_to_extruder": "wall_0_extruder_nr", "limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true "settable_per_mesh": true
} }

View file

@ -29,7 +29,7 @@
"default_value": "M104 S{material_print_temperature_layer_0} ;Set Hotend Temperature\nM140 S{material_bed_temperature_layer_0} ;Set Bed Temperature\nG28 ;home\nG90 ;absolute positioning\nG1 X-10 Y-10 F3000 ;Move to corner \nG1 Z0 F1800 ;Go to zero offset\nM109 S{material_print_temperature_layer_0} ;Wait for Hotend Temperature\nM190 S{material_bed_temperature_layer_0} ;Wait for Bed Temperature\nG92 E0 ;Zero set extruder position\nG1 E20 F200 ;Feed filament to clear nozzle\nG92 E0 ;Zero set extruder position" "default_value": "M104 S{material_print_temperature_layer_0} ;Set Hotend Temperature\nM140 S{material_bed_temperature_layer_0} ;Set Bed Temperature\nG28 ;home\nG90 ;absolute positioning\nG1 X-10 Y-10 F3000 ;Move to corner \nG1 Z0 F1800 ;Go to zero offset\nM109 S{material_print_temperature_layer_0} ;Wait for Hotend Temperature\nM190 S{material_bed_temperature_layer_0} ;Wait for Bed Temperature\nG92 E0 ;Zero set extruder position\nG1 E20 F200 ;Feed filament to clear nozzle\nG92 E0 ;Zero set extruder position"
}, },
"machine_end_gcode": { "machine_end_gcode": {
"default_value": "M104 S0 ;Extruder heater off\nM140 S0 ;Heated bed heater off\nG90 ;absolute positioning\nG92 E0 ;Retract the filament\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z{machine_width} E-1 F3000 ;move Z up a bit and retract filament even more\nG1 X0 F3000 ;move X to min endstops, so the head is out of the way\nG1 Y{machine_depth} F3000 ;so the head is out of the way and Plate is moved forward" "default_value": "M104 S0 ;Extruder heater off\nM140 S0 ;Heated bed heater off\nG90 ;absolute positioning\nG92 E0 ;Retract the filament\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z{machine_height} E-1 F3000 ;move Z up a bit and retract filament even more\nG1 X0 F3000 ;move X to min endstops, so the head is out of the way\nG1 Y{machine_depth} F3000 ;so the head is out of the way and Plate is moved forward"
}, },
"machine_nozzle_size": { "machine_nozzle_size": {
"default_value": 0.4 "default_value": 0.4

View file

@ -47,6 +47,9 @@
"line_width": { "line_width": {
"value": "machine_nozzle_size" "value": "machine_nozzle_size"
}, },
"wall_thickness": {
"value": "wall_line_width_0 + wall_line_width_x"
},
"infill_before_walls": { "infill_before_walls": {
"value": "False" "value": "False"
}, },
@ -67,6 +70,9 @@
}, },
"bottom_layers": { "bottom_layers": {
"value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))" "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))"
},
"xy_offset": {
"value": "-layer_height * 0.2"
} }
} }
} }

View file

@ -84,6 +84,8 @@
"meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" }, "meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" },
"meshfix_maximum_deviation": { "value": "layer_height / 4" }, "meshfix_maximum_deviation": { "value": "layer_height / 4" },
"meshfix_maximum_travel_resolution": { "value": 0.5 }, "meshfix_maximum_travel_resolution": { "value": 0.5 },
"prime_blob_enable": { "enabled": true, "default_value": true, "value": "resolveOrValue('print_sequence') != 'one_at_a_time'" } "prime_blob_enable": { "enabled": true, "default_value": true, "value": "resolveOrValue('print_sequence') != 'one_at_a_time'" },
"retraction_prime_speed": { "value": "15" },
"retraction_speed": {"value": "45" }
} }
} }

View file

@ -166,7 +166,6 @@
"top_bottom_thickness": { "value": "1" }, "top_bottom_thickness": { "value": "1" },
"travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" },
"wall_0_inset": { "value": "0" }, "wall_0_inset": { "value": "0" },
"wall_thickness": { "value": "1" },
"zig_zaggify_infill": { "value": "gradual_infill_steps == 0" } "zig_zaggify_infill": { "value": "gradual_infill_steps == 0" }
} }
} }

View file

@ -136,6 +136,7 @@
"retraction_hop_only_when_collides": { "value": "True" }, "retraction_hop_only_when_collides": { "value": "True" },
"retraction_min_travel": { "value": "5" }, "retraction_min_travel": { "value": "5" },
"retraction_prime_speed": { "value": "15" }, "retraction_prime_speed": { "value": "15" },
"retraction_speed": {"value": "45" },
"skin_overlap": { "value": "10" }, "skin_overlap": { "value": "10" },
"speed_layer_0": { "value": "20" }, "speed_layer_0": { "value": "20" },
"speed_prime_tower": { "value": "speed_topbottom" }, "speed_prime_tower": { "value": "speed_topbottom" },
@ -158,7 +159,6 @@
"travel_avoid_supports": { "value": "True" }, "travel_avoid_supports": { "value": "True" },
"travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" },
"wall_0_inset": { "value": "0" }, "wall_0_inset": { "value": "0" },
"wall_thickness": { "value": "1" },
"meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" }, "meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" },
"meshfix_maximum_deviation": { "value": "layer_height / 4" }, "meshfix_maximum_deviation": { "value": "layer_height / 4" },
"initial_layer_line_width_factor": { "value": "120" }, "initial_layer_line_width_factor": { "value": "120" },

View file

@ -138,6 +138,7 @@
"retraction_hop_only_when_collides": { "value": "True" }, "retraction_hop_only_when_collides": { "value": "True" },
"retraction_min_travel": { "value": "5" }, "retraction_min_travel": { "value": "5" },
"retraction_prime_speed": { "value": "15" }, "retraction_prime_speed": { "value": "15" },
"retraction_speed": {"value": "45" },
"skin_overlap": { "value": "10" }, "skin_overlap": { "value": "10" },
"speed_layer_0": { "value": "20" }, "speed_layer_0": { "value": "20" },
"speed_prime_tower": { "value": "speed_topbottom" }, "speed_prime_tower": { "value": "speed_topbottom" },
@ -160,7 +161,6 @@
"travel_avoid_supports": { "value": "True" }, "travel_avoid_supports": { "value": "True" },
"travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" },
"wall_0_inset": { "value": "0" }, "wall_0_inset": { "value": "0" },
"wall_thickness": { "value": "1" },
"meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" }, "meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" },
"meshfix_maximum_deviation": { "value": "layer_height / 4" }, "meshfix_maximum_deviation": { "value": "layer_height / 4" },
"optimize_wall_printing_order": { "value": "True" }, "optimize_wall_printing_order": { "value": "True" },

View file

@ -18,8 +18,7 @@ speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
speed_layer_0 = 20 speed_layer_0 = 20
top_bottom_thickness = =wall_thickness top_bottom_thickness = 0.8
wall_thickness = =line_width * 2
infill_sparse_density = 15 infill_sparse_density = 15
jerk_print = 30 jerk_print = 30

View file

@ -31,4 +31,3 @@ speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -13,5 +13,4 @@ variant = AA 0.4
[values] [values]
speed_infill = 50 speed_infill = 50
wall_thickness = =wall_line_width * 3 top_bottom_thickness = 1.05
top_bottom_thickness = =wall_thickness

View file

@ -13,5 +13,4 @@ variant = AA 0.4
[values] [values]
speed_infill = 50 speed_infill = 50
wall_thickness = =wall_line_width * 3 top_bottom_thickness = 1.05
top_bottom_thickness = =wall_thickness

View file

@ -31,4 +31,3 @@ speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -13,5 +13,4 @@ variant = AA 0.4
[values] [values]
speed_infill = 50 speed_infill = 50
wall_thickness = =wall_line_width * 3 top_bottom_thickness = 1.05
top_bottom_thickness = =wall_thickness

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = fast quality_type = fast
material = generic_cpe_plus material = generic_cpe_plus
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = normal quality_type = normal
material = generic_cpe_plus material = generic_cpe_plus
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = fast quality_type = fast
material = generic_cpe material = generic_cpe
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = normal quality_type = normal
material = generic_cpe material = generic_cpe
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = fast quality_type = fast
material = generic_nylon material = generic_nylon
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = normal quality_type = normal
material = generic_nylon material = generic_nylon
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = fast quality_type = fast
material = generic_pc material = generic_pc
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = normal quality_type = normal
material = generic_pc material = generic_pc
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = fast quality_type = fast
material = generic_petg material = generic_petg
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -1,35 +1,34 @@
[general] [general]
version = 4 version = 4
name = Accurate name = Accurate
definition = ultimaker_s3 definition = ultimaker_s3
[metadata] [metadata]
setting_version = 19 setting_version = 19
type = intent type = intent
intent_category = engineering intent_category = engineering
quality_type = normal quality_type = normal
material = generic_petg material = generic_petg
variant = AA 0.4 variant = AA 0.4
[values] [values]
jerk_print = 30 jerk_print = 30
jerk_infill = =jerk_print jerk_infill = =jerk_print
jerk_topbottom = =jerk_print jerk_topbottom = =jerk_print
jerk_wall = =jerk_print jerk_wall = =jerk_print
jerk_wall_0 = =jerk_wall jerk_wall_0 = =jerk_wall
jerk_wall_x = =jerk_wall jerk_wall_x = =jerk_wall
jerk_layer_0 = 5 jerk_layer_0 = 5
speed_print = 30 speed_print = 30
speed_infill = =speed_print speed_infill = =speed_print
speed_layer_0 = 20 speed_layer_0 = 20
speed_topbottom = =speed_print speed_topbottom = =speed_print
speed_wall = =speed_print speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

View file

@ -18,8 +18,7 @@ speed_wall = =speed_print
speed_wall_0 = =speed_wall speed_wall_0 = =speed_wall
speed_wall_x = =speed_wall speed_wall_x = =speed_wall
speed_layer_0 = 20 speed_layer_0 = 20
top_bottom_thickness = =wall_thickness top_bottom_thickness = 0.8
wall_thickness = =line_width * 2
infill_sparse_density = 15 infill_sparse_density = 15
jerk_print = 30 jerk_print = 30

View file

@ -31,4 +31,3 @@ speed_wall_x = =speed_wall
top_bottom_thickness = =wall_thickness top_bottom_thickness = =wall_thickness
wall_thickness = =line_width * 3 wall_thickness = =line_width * 3
xy_offset = =-layer_height * 0.2

Some files were not shown because too many files have changed in this diff Show more