diff --git a/cura/Machines/Models/QualityProfilesDropDownMenuModel.py b/cura/Machines/Models/QualityProfilesDropDownMenuModel.py
index a01cc1194f..747882b041 100644
--- a/cura/Machines/Models/QualityProfilesDropDownMenuModel.py
+++ b/cura/Machines/Models/QualityProfilesDropDownMenuModel.py
@@ -21,6 +21,7 @@ class QualityProfilesDropDownMenuModel(ListModel):
AvailableRole = Qt.UserRole + 5
QualityGroupRole = Qt.UserRole + 6
QualityChangesGroupRole = Qt.UserRole + 7
+ IsExperimentalRole = Qt.UserRole + 8
def __init__(self, parent = None):
super().__init__(parent)
@@ -32,6 +33,7 @@ class QualityProfilesDropDownMenuModel(ListModel):
self.addRoleName(self.AvailableRole, "available") #Whether the quality profile is available in our current nozzle + material.
self.addRoleName(self.QualityGroupRole, "quality_group")
self.addRoleName(self.QualityChangesGroupRole, "quality_changes_group")
+ self.addRoleName(self.IsExperimentalRole, "is_experimental")
self._application = Application.getInstance()
self._machine_manager = self._application.getMachineManager()
@@ -74,7 +76,8 @@ class QualityProfilesDropDownMenuModel(ListModel):
"layer_height": layer_height,
"layer_height_unit": self._layer_height_unit,
"available": quality_group.is_available,
- "quality_group": quality_group}
+ "quality_group": quality_group,
+ "is_experimental": quality_group.is_experimental}
item_list.append(item)
diff --git a/cura/Machines/QualityGroup.py b/cura/Machines/QualityGroup.py
index 535ba453f8..f5bcbb0de8 100644
--- a/cura/Machines/QualityGroup.py
+++ b/cura/Machines/QualityGroup.py
@@ -4,6 +4,9 @@
from typing import Dict, Optional, List, Set
from PyQt5.QtCore import QObject, pyqtSlot
+
+from UM.Util import parseBool
+
from cura.Machines.ContainerNode import ContainerNode
@@ -29,6 +32,7 @@ class QualityGroup(QObject):
self.nodes_for_extruders = {} # type: Dict[int, ContainerNode]
self.quality_type = quality_type
self.is_available = False
+ self.is_experimental = False
@pyqtSlot(result = str)
def getName(self) -> str:
@@ -51,3 +55,17 @@ class QualityGroup(QObject):
for extruder_node in self.nodes_for_extruders.values():
result.append(extruder_node)
return result
+
+ def setGlobalNode(self, node: "ContainerNode") -> None:
+ self.node_for_global = node
+
+ # Update is_experimental flag
+ is_experimental = parseBool(node.getMetaDataEntry("is_experimental", False))
+ self.is_experimental |= is_experimental
+
+ def setExtruderNode(self, position: int, node: "ContainerNode") -> None:
+ self.nodes_for_extruders[position] = node
+
+ # Update is_experimental flag
+ is_experimental = parseBool(node.getMetaDataEntry("is_experimental", False))
+ self.is_experimental |= is_experimental
diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py
index a784d17f0b..34cc9ce4b2 100644
--- a/cura/Machines/QualityManager.py
+++ b/cura/Machines/QualityManager.py
@@ -235,7 +235,7 @@ class QualityManager(QObject):
for quality_type, quality_node in node.quality_type_map.items():
quality_group = QualityGroup(quality_node.getMetaDataEntry("name", ""), quality_type)
- quality_group.node_for_global = quality_node
+ quality_group.setGlobalNode(quality_node)
quality_group_dict[quality_type] = quality_group
break
@@ -337,7 +337,7 @@ class QualityManager(QObject):
quality_group = quality_group_dict[quality_type]
if position not in quality_group.nodes_for_extruders:
- quality_group.nodes_for_extruders[position] = quality_node
+ quality_group.setExtruderNode(position, quality_node)
# If the machine has its own specific qualities, for extruders, it should skip the global qualities
# and use the material/variant specific qualities.
@@ -367,7 +367,7 @@ class QualityManager(QObject):
if node and node.quality_type_map:
for quality_type, quality_node in node.quality_type_map.items():
quality_group = QualityGroup(quality_node.getMetaDataEntry("name", ""), quality_type)
- quality_group.node_for_global = quality_node
+ quality_group.setGlobalNode(quality_node)
quality_group_dict[quality_type] = quality_group
break
diff --git a/cura/Machines/VariantManager.py b/cura/Machines/VariantManager.py
index f6feb70e09..eaaa9fc5f0 100644
--- a/cura/Machines/VariantManager.py
+++ b/cura/Machines/VariantManager.py
@@ -107,7 +107,7 @@ class VariantManager:
break
return variant_node
- return self._machine_to_variant_dict_map[machine_definition_id].get(variant_type, {}).get(variant_name)
+ return self._machine_to_variant_dict_map.get(machine_definition_id, {}).get(variant_type, {}).get(variant_name)
def getVariantNodes(self, machine: "GlobalStack", variant_type: "VariantType") -> Dict[str, ContainerNode]:
machine_definition_id = machine.definition.getId()
diff --git a/cura/Scene/ConvexHullNode.py b/cura/Scene/ConvexHullNode.py
index 4c79c7d5dc..886ed93ad3 100644
--- a/cura/Scene/ConvexHullNode.py
+++ b/cura/Scene/ConvexHullNode.py
@@ -1,7 +1,10 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
+from typing import Optional
from UM.Application import Application
+from UM.Math.Polygon import Polygon
+from UM.Qt.QtApplication import QtApplication
from UM.Scene.SceneNode import SceneNode
from UM.Resources import Resources
from UM.Math.Color import Color
@@ -16,7 +19,7 @@ class ConvexHullNode(SceneNode):
# location an object uses on the buildplate. This area (or area's in case of one at a time printing) is
# then displayed as a transparent shadow. If the adhesion type is set to raft, the area is extruded
# to represent the raft as well.
- def __init__(self, node, hull, thickness, parent = None):
+ def __init__(self, node: SceneNode, hull: Optional[Polygon], thickness: float, parent: Optional[SceneNode] = None) -> None:
super().__init__(parent)
self.setCalculateBoundingBox(False)
@@ -25,7 +28,11 @@ class ConvexHullNode(SceneNode):
# Color of the drawn convex hull
if not Application.getInstance().getIsHeadLess():
- self._color = Color(*Application.getInstance().getTheme().getColor("convex_hull").getRgb())
+ theme = QtApplication.getInstance().getTheme()
+ if theme:
+ self._color = Color(*theme.getColor("convex_hull").getRgb())
+ else:
+ self._color = Color(0, 0, 0)
else:
self._color = Color(0, 0, 0)
@@ -75,7 +82,7 @@ class ConvexHullNode(SceneNode):
return True
- def _onNodeDecoratorsChanged(self, node):
+ def _onNodeDecoratorsChanged(self, node: SceneNode) -> None:
convex_hull_head = self._node.callDecoration("getConvexHullHead")
if convex_hull_head:
convex_hull_head_builder = MeshBuilder()
diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index e3d7eedd9a..53390ca88d 100755
--- a/cura/Settings/MachineManager.py
+++ b/cura/Settings/MachineManager.py
@@ -618,6 +618,14 @@ class MachineManager(QObject):
is_supported = self._current_quality_group.is_available
return is_supported
+ @pyqtProperty(bool, notify = activeQualityGroupChanged)
+ def isActiveQualityExperimental(self) -> bool:
+ is_experimental = False
+ if self._global_container_stack:
+ if self._current_quality_group:
+ is_experimental = self._current_quality_group.is_experimental
+ return is_experimental
+
## Returns whether there is anything unsupported in the current set-up.
#
# The current set-up signifies the global stack and all extruder stacks,
diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py
index 273dc0b6f6..9679360ad5 100644
--- a/plugins/CuraEngineBackend/StartSliceJob.py
+++ b/plugins/CuraEngineBackend/StartSliceJob.py
@@ -72,7 +72,7 @@ class GcodeStartEndFormatter(Formatter):
# "-1" is global stack, and if the setting value exists in the global stack, use it as the fallback value.
if key in kwargs["-1"]:
value = kwargs["-1"]
- if key in kwargs[str(extruder_nr)]:
+ if str(extruder_nr) in kwargs and key in kwargs[str(extruder_nr)]:
value = kwargs[str(extruder_nr)][key]
if value == default_value_str:
diff --git a/plugins/PostProcessingPlugin/scripts/ExampleScript.md b/plugins/PostProcessingPlugin/scripts/ExampleScript.md
new file mode 100644
index 0000000000..08652132aa
--- /dev/null
+++ b/plugins/PostProcessingPlugin/scripts/ExampleScript.md
@@ -0,0 +1,3 @@
+A good example script is SearchAndReplace.py.
+If you have any questions please ask them at:
+https://github.com/Ultimaker/Cura/issues
\ No newline at end of file
diff --git a/plugins/PostProcessingPlugin/scripts/ExampleScript.py b/plugins/PostProcessingPlugin/scripts/ExampleScript.py
deleted file mode 100644
index 416a5f5404..0000000000
--- a/plugins/PostProcessingPlugin/scripts/ExampleScript.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V.
-# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
-from ..Script import Script
-
-class ExampleScript(Script):
- def __init__(self):
- super().__init__()
-
- def getSettingDataString(self):
- return """{
- "name":"Example script",
- "key": "ExampleScript",
- "metadata": {},
- "version": 2,
- "settings":
- {
- "test":
- {
- "label": "Test",
- "description": "None",
- "unit": "mm",
- "type": "float",
- "default_value": 0.5,
- "minimum_value": "0",
- "minimum_value_warning": "0.1",
- "maximum_value_warning": "1"
- },
- "derp":
- {
- "label": "zomg",
- "description": "afgasgfgasfgasf",
- "unit": "mm",
- "type": "float",
- "default_value": 0.5,
- "minimum_value": "0",
- "minimum_value_warning": "0.1",
- "maximum_value_warning": "1"
- }
- }
- }"""
-
- def execute(self, data):
- return data
\ No newline at end of file
diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml
index 7c01b1f8b0..0191396e7b 100644
--- a/plugins/PrepareStage/PrepareMenu.qml
+++ b/plugins/PrepareStage/PrepareMenu.qml
@@ -13,10 +13,6 @@ import QtGraphicalEffects 1.0 // For the dropshadow
Item
{
id: prepareMenu
- // This widget doesn't show tooltips by itself. Instead it emits signals so others can do something with it.
- signal showTooltip(Item item, point location, string text)
- signal hideTooltip()
-
UM.I18nCatalog
{
diff --git a/plugins/PreviewStage/PreviewMenu.qml b/plugins/PreviewStage/PreviewMenu.qml
index a1f59cd4ca..1543536160 100644
--- a/plugins/PreviewStage/PreviewMenu.qml
+++ b/plugins/PreviewStage/PreviewMenu.qml
@@ -10,9 +10,6 @@ import Cura 1.1 as Cura
Item
{
id: previewMenu
- // This widget doesn't show tooltips by itself. Instead it emits signals so others can do something with it.
- signal showTooltip(Item item, point location, string text)
- signal hideTooltip()
property real itemHeight: height - 2 * UM.Theme.getSize("default_lining").width
diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml
index 62e1e3ab86..4a6268df42 100644
--- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml
+++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml
@@ -36,12 +36,19 @@ Item
var pg_name = "printingGuidelines"
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
}
+
+ property var materialWebsiteUrl:
+ {
+ var pg_name = "website"
+ return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
+ }
anchors.topMargin: UM.Theme.getSize("default_margin").height
height: visible ? childrenRect.height : 0
visible: packageData.type == "material" &&
(packageData.has_configs || technicalDataSheetUrl !== undefined ||
- safetyDataSheetUrl !== undefined || printingGuidelinesUrl !== undefined)
+ safetyDataSheetUrl !== undefined || printingGuidelinesUrl !== undefined ||
+ materialWebsiteUrl !== undefined)
Item
{
@@ -180,7 +187,8 @@ Item
anchors.top: combatibilityItem.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height / 2
visible: base.technicalDataSheetUrl !== undefined ||
- base.safetyDataSheetUrl !== undefined || base.printingGuidelinesUrl !== undefined
+ base.safetyDataSheetUrl !== undefined || base.printingGuidelinesUrl !== undefined ||
+ base.materialWebsiteUrl !== undefined
height: visible ? contentHeight : 0
text:
{
@@ -208,6 +216,16 @@ Item
var pg_name = catalog.i18nc("@action:label", "Printing Guidelines")
result += "%2".arg(base.printingGuidelinesUrl).arg(pg_name)
}
+ if (base.materialWebsiteUrl !== undefined)
+ {
+ if (result.length > 0)
+ {
+ result += "
"
+ }
+ var pg_name = catalog.i18nc("@action:label", "Website")
+ result += "%2".arg(base.materialWebsiteUrl).arg(pg_name)
+ }
+
return result
}
font: UM.Theme.getFont("very_small")
diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml
index 0c04dc2bab..c5e9bb0a49 100644
--- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml
+++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml
@@ -144,10 +144,6 @@ Item
{
return ""
}
- if (details.author_email)
- {
- return "" + details.author_name + ""
- }
else
{
return "" + details.author_name + ""
diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml
index 9061a8e06b..1d701543ce 100644
--- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml
+++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml
@@ -37,7 +37,7 @@ Item
anchors.top: packageName.bottom
width: parent.width
text: model.description
- maximumLineCount: 6
+ maximumLineCount: 25
elide: Text.ElideRight
wrapMode: Text.WordWrap
color: UM.Theme.getColor("text")
diff --git a/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3 Extended.png b/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3 Extended.png
new file mode 100644
index 0000000000..1ce19c2933
Binary files /dev/null and b/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3 Extended.png differ
diff --git a/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3.png b/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3.png
new file mode 100644
index 0000000000..4639cb3fde
Binary files /dev/null and b/plugins/UM3NetworkPrinting/resources/png/Ultimaker 3.png differ
diff --git a/plugins/UM3NetworkPrinting/resources/png/Ultimaker S5.png b/plugins/UM3NetworkPrinting/resources/png/Ultimaker S5.png
new file mode 100644
index 0000000000..29ba428e38
Binary files /dev/null and b/plugins/UM3NetworkPrinting/resources/png/Ultimaker S5.png differ
diff --git a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml
index 7e5c254e5c..618dbed81c 100644
--- a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml
+++ b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml
@@ -9,10 +9,10 @@ import Cura 1.0 as Cura
Rectangle {
property var iconSource: null;
- color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary"); // "Cura Blue"
+ color: "#0a0850" // TODO: Theme!
height: width;
radius: Math.round(0.5 * width);
- width: 36 * screenScaleFactor;
+ width: 24 * screenScaleFactor;
UM.RecolorImage {
id: icon;
diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml
index 19a152e6eb..adf5ea5e1c 100644
--- a/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml
+++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterMonitorItem.qml
@@ -10,14 +10,13 @@ import QtGraphicalEffects 1.0
Component
{
- Rectangle
+ Item
{
id: monitorFrame
property var emphasisColor: UM.Theme.getColor("setting_control_border_highlight")
property var cornerRadius: UM.Theme.getSize("monitor_corner_radius").width
- color: "transparent"
height: maximumHeight
onVisibleChanged:
{
@@ -48,13 +47,45 @@ Component
}
}
+ ScrollView
+ {
+ id: printers
+ anchors
+ {
+ left: queue.left
+ right: queue.right
+ top: parent.top
+ topMargin: 48 * screenScaleFactor // TODO: Theme!
+ }
+ height: 264 * screenScaleFactor // TODO: Theme!
+
+ Row
+ {
+ spacing: 60 * screenScaleFactor // TODO: Theme!
+
+ Repeater
+ {
+ model: OutputDevice.printers
+
+ MonitorPrinterCard
+ {
+ printer: modelData
+ }
+ }
+ }
+ }
+
Item
{
id: queue
+ width: Math.min(834 * screenScaleFactor, maximumWidth)
- anchors.fill: parent
- anchors.top: parent.top
- anchors.topMargin: 400 * screenScaleFactor // TODO: Insert carousel here
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ top: printers.bottom
+ topMargin: 48 * screenScaleFactor // TODO: Theme!
+ }
Label
{
@@ -104,7 +135,6 @@ Component
text: catalog.i18nc("@label link to connect manager", "Manage queue in Cura Connect")
}
}
-
MouseArea
{
@@ -187,7 +217,7 @@ Component
}
style: UM.Theme.styles.scrollview
visible: OutputDevice.receivedPrintJobs
- width: Math.min(834 * screenScaleFactor, maximumWidth)
+ width: parent.width
ListView
{
@@ -214,5 +244,4 @@ Component
visible: OutputDevice.activeCameraUrl != ""
}
}
-
}
diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml
index 9ffb1eabb4..75cbf3b11d 100644
--- a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml
+++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml
@@ -27,7 +27,7 @@ Item
Row
{
height: parent.height
- spacing: 12 * screenScaleFactor // TODO: Theme! (Should be same as extruder spacing)
+ spacing: UM.Theme.getSize("print_setup_slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
// This wrapper ensures that the buildplate icon is located centered
// below an extruder icon.
diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml
new file mode 100644
index 0000000000..f70e1175a1
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml
@@ -0,0 +1,137 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.3
+import QtQuick.Controls.Styles 1.3
+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
+ * layouts more deterministic (like the fixed-size textboxes used in original
+ * mock-ups). This is also a stand-in for CSS's 'line-height' property. Denoted
+ * with '// FIXED-LINE-HEIGHT:'.
+ */
+Item
+{
+ id: base
+ property var printJob: null
+ property var progress:
+ {
+ if (!printJob)
+ {
+ return 0
+ }
+ var result = printJob.timeElapsed / printJob.timeTotal
+ if (result > 1.0)
+ {
+ result = 1.0
+ }
+ return result
+ }
+ property var remainingTime:
+ {
+ if (!printJob) {
+ return 0
+ }
+ /* Sometimes total minus elapsed is less than 0. Use Math.max() to prevent remaining
+ time from ever being less than 0. Negative durations cause strange behavior such
+ as displaying "-1h -1m". */
+ return Math.max(printer.activePrintJob.timeTotal - printer.activePrintJob.timeElapsed, 0)
+ }
+ property var progressText:
+ {
+ if (!printJob)
+ {
+ return "";
+ }
+ switch (printJob.state)
+ {
+ case "wait_cleanup":
+ if (printJob.timeTotal > printJob.timeElapsed)
+ {
+ return catalog.i18nc("@label:status", "Aborted")
+ }
+ return catalog.i18nc("@label:status", "Finished")
+ case "pre_print":
+ case "sent_to_printer":
+ return catalog.i18nc("@label:status", "Preparing")
+ case "aborted":
+ return catalog.i18nc("@label:status", "Aborted")
+ case "wait_user_action":
+ return catalog.i18nc("@label:status", "Aborted")
+ case "pausing":
+ return catalog.i18nc("@label:status", "Pausing")
+ case "paused":
+ return OutputDevice.formatDuration( remainingTime )
+ case "resuming":
+ return catalog.i18nc("@label:status", "Resuming")
+ case "queued":
+ return catalog.i18nc("@label:status", "Action required")
+ default:
+ return OutputDevice.formatDuration( remainingTime )
+ }
+ }
+ width: childrenRect.width
+ height: 18 * screenScaleFactor // TODO: Theme!
+
+ ProgressBar
+ {
+ id: progressBar
+ anchors
+ {
+ verticalCenter: parent.verticalCenter
+ }
+ value: progress;
+ style: ProgressBarStyle
+ {
+ background: Rectangle
+ {
+ color: "#e4e4f2" // TODO: Theme!
+ implicitHeight: visible ? 8 * screenScaleFactor : 0 // TODO: Theme!
+ implicitWidth: 180 * screenScaleFactor // TODO: Theme!
+ radius: 4 * screenScaleFactor // TODO: Theme!
+ }
+ progress: Rectangle
+ {
+ id: progressItem;
+ color:
+ {
+ if (printJob)
+ {
+ var state = printJob.state
+ var inactiveStates = [
+ "pausing",
+ "paused",
+ "resuming",
+ "wait_cleanup"
+ ]
+ if (inactiveStates.indexOf(state) > -1 && remainingTime > 0)
+ {
+ return UM.Theme.getColor("monitor_progress_fill_inactive")
+ }
+ }
+ return "#0a0850" // TODO: Theme!
+ }
+ radius: 4 * screenScaleFactor // TODO: Theme!
+ }
+ }
+ }
+ Label
+ {
+ id: progressLabel
+ anchors
+ {
+ left: progressBar.right
+ leftMargin: 18 * screenScaleFactor // TODO: Theme!
+ }
+ text: progressText
+ color: "#374355" // TODO: Theme!
+ width: contentWidth
+ font: UM.Theme.getFont("medium") // 14pt, regular
+
+ // FIXED-LINE-HEIGHT:
+ height: 18 * screenScaleFactor // TODO: Theme!
+ verticalAlignment: Text.AlignVCenter
+ }
+}
\ No newline at end of file
diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml
new file mode 100644
index 0000000000..975fe12244
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml
@@ -0,0 +1,242 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.3
+import QtQuick.Controls 2.0
+import UM 1.3 as UM
+
+/**
+ * A Printer Card is has two main components: the printer portion and the print
+ * job portion, the latter being paired in the UI when a print job is paired
+ * a printer in-cluster.
+ *
+ * NOTE: For most labels, a fixed height with vertical alignment is used to make
+ * layouts more deterministic (like the fixed-size textboxes used in original
+ * mock-ups). This is also a stand-in for CSS's 'line-height' property. Denoted
+ * with '// FIXED-LINE-HEIGHT:'.
+ */
+Item
+{
+ id: base
+
+ // The printer which all printer data is derived from
+ property var printer: null
+
+ property var borderSize: 1 * screenScaleFactor // TODO: Theme, and remove from here
+
+ width: 834 * screenScaleFactor // TODO: Theme!
+ height: 216 * screenScaleFactor // TODO: Theme!
+
+ // Printer portion
+ Rectangle
+ {
+ id: printerInfo
+ border
+ {
+ color: "#EAEAEC" // TODO: Theme!
+ width: borderSize // TODO: Remove once themed
+ }
+ color: "white" // TODO: Theme!
+ width: parent.width
+ height: 144 * screenScaleFactor // TODO: Theme!
+
+ Row
+ {
+ anchors
+ {
+ left: parent.left
+ leftMargin: 36 * screenScaleFactor // TODO: Theme!
+ verticalCenter: parent.verticalCenter
+ }
+ spacing: 18 * screenScaleFactor // TODO: Theme!
+
+ Image
+ {
+ id: printerImage
+ width: 108 * screenScaleFactor // TODO: Theme!
+ height: 108 * screenScaleFactor // TODO: Theme!
+ fillMode: Image.PreserveAspectFit
+ source: "../png/" + printer.type + ".png"
+ mipmap: true
+ }
+
+ Item
+ {
+ anchors
+ {
+ verticalCenter: parent.verticalCenter
+ }
+ width: 216 * screenScaleFactor // TODO: Theme!
+ height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme!
+
+ Label
+ {
+ id: printerNameLabel
+ text: printer && printer.name ? printer.name : ""
+ color: "#414054" // TODO: Theme!
+ elide: Text.ElideRight
+ font: UM.Theme.getFont("large") // 16pt, bold
+ width: parent.width
+
+ // FIXED-LINE-HEIGHT:
+ height: 18 * screenScaleFactor // TODO: Theme!
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ MonitorPrinterPill
+ {
+ id: printerFamilyPill
+ anchors
+ {
+ top: printerNameLabel.bottom
+ topMargin: 6 * screenScaleFactor // TODO: Theme!
+ left: printerNameLabel.left
+ }
+ text: printer.type
+ }
+ }
+
+ MonitorPrinterConfiguration
+ {
+ id: printerConfiguration
+ anchors.verticalCenter: parent.verticalCenter
+ buildplate: "Glass"
+ configurations:
+ [
+ base.printer.printerConfiguration.extruderConfigurations[0],
+ base.printer.printerConfiguration.extruderConfigurations[1]
+ ]
+ height: 72 * screenScaleFactor // TODO: Theme!
+ }
+ }
+
+ PrintJobContextMenu
+ {
+ id: contextButton
+ anchors
+ {
+ right: parent.right
+ rightMargin: 12 * screenScaleFactor // TODO: Theme!
+ top: parent.top
+ topMargin: 12 * screenScaleFactor // TODO: Theme!
+ }
+ printJob: printer.activePrintJob
+ width: 36 * screenScaleFactor // TODO: Theme!
+ height: 36 * screenScaleFactor // TODO: Theme!
+ }
+ CameraButton
+ {
+ id: cameraButton;
+ anchors
+ {
+ right: parent.right
+ rightMargin: 20 * screenScaleFactor // TODO: Theme!
+ bottom: parent.bottom
+ bottomMargin: 20 * screenScaleFactor // TODO: Theme!
+ }
+ iconSource: "../svg/icons/camera.svg"
+ }
+ }
+
+
+ // Print job portion
+ Rectangle
+ {
+ id: printJobInfo
+ anchors
+ {
+ top: printerInfo.bottom
+ topMargin: -borderSize * screenScaleFactor // TODO: Theme!
+ }
+ border
+ {
+ color: "#EAEAEC" // TODO: Theme!
+ width: borderSize // TODO: Remove once themed
+ }
+ color: "white" // TODO: Theme!
+ height: 84 * screenScaleFactor + borderSize // TODO: Remove once themed
+ width: parent.width
+
+ Row
+ {
+ anchors
+ {
+ fill: parent
+ topMargin: 12 * screenScaleFactor + borderSize // TODO: Theme!
+ bottomMargin: 12 * screenScaleFactor // TODO: Theme!
+ leftMargin: 36 * screenScaleFactor // TODO: Theme!
+ }
+ height: childrenRect.height
+ spacing: 18 * screenScaleFactor // TODO: Theme!
+
+ Item
+ {
+ anchors
+ {
+ verticalCenter: parent.verticalCenter
+ }
+ width: printerImage.width
+ height: 60 * screenScaleFactor // TODO: Theme!
+ MonitorPrintJobPreview
+ {
+ anchors.centerIn: parent
+ printJob: base.printer.activePrintJob
+ size: parent.height
+ }
+ }
+
+ Item
+ {
+ anchors
+ {
+ verticalCenter: parent.verticalCenter
+ }
+ width: 216 * screenScaleFactor // TODO: Theme!
+ height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme!
+
+ Label
+ {
+ id: printerJobNameLabel
+ text: base.printer.activePrintJob ? base.printer.activePrintJob.name : "Untitled" // TODO: I18N
+ color: "#414054" // TODO: Theme!
+ elide: Text.ElideRight
+ font: UM.Theme.getFont("large") // 16pt, bold
+ width: parent.width
+
+ // FIXED-LINE-HEIGHT:
+ height: 18 * screenScaleFactor // TODO: Theme!
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ Label
+ {
+ id: printerJobOwnerLabel
+ anchors
+ {
+ top: printerJobNameLabel.bottom
+ topMargin: 6 * screenScaleFactor // TODO: Theme!
+ left: printerJobNameLabel.left
+ }
+ text: printer.activePrintJob ? printer.activePrintJob.owner : "Anonymous" // TODO: I18N
+ color: "#53657d" // TODO: Theme!
+ elide: Text.ElideRight
+ font: UM.Theme.getFont("very_small") // 12pt, regular
+ width: parent.width
+
+ // FIXED-LINE-HEIGHT:
+ height: 18 * screenScaleFactor // TODO: Theme!
+ verticalAlignment: Text.AlignVCenter
+ }
+ }
+
+ MonitorPrintJobProgressBar
+ {
+ anchors
+ {
+ verticalCenter: parent.verticalCenter
+ }
+ printJob: printer.activePrintJob
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenu.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenu.qml
index 11bc913d06..02a8e7ae69 100644
--- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenu.qml
+++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenu.qml
@@ -25,7 +25,7 @@ Item {
}
contentItem: Label {
color: UM.Theme.getColor("monitor_context_menu_dots");
- font.pixelSize: 25 * screenScaleFactor;
+ font.pixelSize: 32 * screenScaleFactor;
horizontalAlignment: Text.AlignHCenter;
text: button.text;
verticalAlignment: Text.AlignVCenter;
@@ -41,7 +41,7 @@ Item {
var states = ["queued", "sent_to_printer", "pre_print", "printing", "pausing", "paused", "resuming"];
return states.indexOf(printJob.state) !== -1;
}
- width: 35 * screenScaleFactor; // TODO: Theme!
+ width: 36 * screenScaleFactor; // TODO: Theme!
}
Popup {
diff --git a/plugins/UM3NetworkPrinting/resources/svg/icons/camera.svg b/plugins/UM3NetworkPrinting/resources/svg/icons/camera.svg
new file mode 100644
index 0000000000..2eaebb812d
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/resources/svg/icons/camera.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py
index 8314b0f089..3b124faf66 100644
--- a/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py
+++ b/plugins/UM3NetworkPrinting/src/ClusterUM3OutputDevice.py
@@ -65,7 +65,6 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
self._received_print_jobs = False # type: bool
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/ClusterMonitorItem.qml")
- self._control_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/ClusterControlItem.qml")
# See comments about this hack with the clusterPrintersChanged signal
self.printersChanged.connect(self.clusterPrintersChanged)
diff --git a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
index daea696cd1..b96c508d70 100644
--- a/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
+++ b/plugins/UM3NetworkPrinting/src/UM3OutputDevicePlugin.py
@@ -341,7 +341,6 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
# Request more data if info is not complete
if not info.address:
- Logger.log("d", "Trying to get address of %s", name)
info = zero_conf.get_service_info(service_type, name)
if info:
diff --git a/resources/definitions/cocoon_create_modelmaker.def.json b/resources/definitions/cocoon_create_modelmaker.def.json
index 204d5b9492..22aa75d09e 100644
--- a/resources/definitions/cocoon_create_modelmaker.def.json
+++ b/resources/definitions/cocoon_create_modelmaker.def.json
@@ -1,11 +1,11 @@
{
- "name": "Cocoon Create ModelMaker & Wanhao Duplicator i3 Mini",
+ "name": "Cocoon Create ModelMaker",
"version": 2,
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "Samuel Pinches",
- "manufacturer": "Cocoon Create / Wanhao",
+ "manufacturer": "Cocoon Create",
"file_formats": "text/x-gcode",
"preferred_quality_type": "fine",
"machine_extruder_trains":
@@ -15,7 +15,7 @@
},
"overrides": {
"machine_name": {
- "default_value": "Cocoon Create ModelMaker & Wanhao Duplicator i3 Mini"
+ "default_value": "Cocoon Create ModelMaker"
},
"machine_start_gcode": {
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 ;home all axis\nG92 E0 ;zero the extruded length\nG1 Z1 F1000 ;move up slightly\nG1 X60.0 Z0 E9.0 F1000.0;intro line\nG1 X100.0 E21.5 F1000.0 ;continue line\nG92 E0 ;zero the extruded length again\n; -- end of START GCODE --"
@@ -51,7 +51,7 @@
"default_value": 220
},
"layer_height": {
- "default_value": 0.15
+ "default_value": 0.10
},
"layer_height_0": {
"default_value": 0.2
diff --git a/resources/qml/ActionPanel/PrintJobInformation.qml b/resources/qml/ActionPanel/PrintJobInformation.qml
index e53a92a994..156111af4d 100644
--- a/resources/qml/ActionPanel/PrintJobInformation.qml
+++ b/resources/qml/ActionPanel/PrintJobInformation.qml
@@ -21,7 +21,6 @@ Column
Column
{
id: timeSpecification
- spacing: UM.Theme.getSize("thin_margin").width
width: parent.width
topPadding: UM.Theme.getSize("default_margin").height
leftPadding: UM.Theme.getSize("default_margin").width
@@ -71,7 +70,6 @@ Column
Column
{
id: materialSpecification
- spacing: UM.Theme.getSize("thin_margin").width
width: parent.width
bottomPadding: UM.Theme.getSize("default_margin").height
leftPadding: UM.Theme.getSize("default_margin").width
diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml
index 36f5758fa3..4effea5ba7 100644
--- a/resources/qml/Cura.qml
+++ b/resources/qml/Cura.qml
@@ -181,13 +181,6 @@ UM.MainWindow
}
}
- Connections
- {
- target: stageMenu.item
- onShowTooltip: base.showTooltip(item, location, text)
- onHideTooltip: base.hideTooltip()
- }
-
JobSpecs
{
id: jobSpecs
@@ -280,8 +273,6 @@ UM.MainWindow
// Every time the stage is changed.
property var printSetupSelector: Cura.PrintSetupSelector
{
- onShowTooltip: base.showTooltip(item, location, text)
- onHideTooltip: base.hideTooltip()
width: UM.Theme.getSize("print_setup_widget").width
height: UM.Theme.getSize("stage_menu").height
headerCornerSide: RoundedRectangle.Direction.Right
diff --git a/resources/qml/Dialogs/AddMachineDialog.qml b/resources/qml/Dialogs/AddMachineDialog.qml
index 8b2b9d1868..8e966c3df7 100644
--- a/resources/qml/Dialogs/AddMachineDialog.qml
+++ b/resources/qml/Dialogs/AddMachineDialog.qml
@@ -213,28 +213,6 @@ UM.Dialog
PropertyChanges { target: machineButton; opacity: 0; height: 0; }
}
-
- transitions:
- [
- Transition
- {
- to: "collapsed";
- SequentialAnimation
- {
- NumberAnimation { property: "opacity"; duration: 75; }
- NumberAnimation { property: "height"; duration: 75; }
- }
- },
- Transition
- {
- from: "collapsed";
- SequentialAnimation
- {
- NumberAnimation { property: "height"; duration: 75; }
- NumberAnimation { property: "opacity"; duration: 75; }
- }
- }
- ]
}
}
}
diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml
index 47fa226e9d..82747d1c5b 100644
--- a/resources/qml/ExpandableComponent.qml
+++ b/resources/qml/ExpandableComponent.qml
@@ -27,6 +27,9 @@ Item
// The popupItem holds the QML item that is shown when the "open" button is pressed
property var popupItem
+ // The popupItem holds the QML item that is shown when the "open" button is pressed
+ property var componentItem
+
property color popupBackgroundColor: UM.Theme.getColor("action_button")
property color headerBackgroundColor: UM.Theme.getColor("action_button")
diff --git a/resources/qml/Menus/ProfileMenu.qml b/resources/qml/Menus/ProfileMenu.qml
index ffd3c556b6..fd46d2ef72 100644
--- a/resources/qml/Menus/ProfileMenu.qml
+++ b/resources/qml/Menus/ProfileMenu.qml
@@ -17,18 +17,21 @@ Menu
MenuItem
{
- text: (model.layer_height != "") ? model.name + " - " + model.layer_height + model.layer_height_unit : model.name
+ text:
+ {
+ var full_text = (model.layer_height != "") ? model.name + " - " + model.layer_height + model.layer_height_unit : model.name
+ full_text += model.is_experimental ? " - Experimental" : ""
+ return full_text
+ }
checkable: true
checked: Cura.MachineManager.activeQualityOrQualityChangesName == model.name
exclusiveGroup: group
- onTriggered: {
- Cura.MachineManager.setQualityGroup(model.quality_group)
- }
+ onTriggered: Cura.MachineManager.setQualityGroup(model.quality_group)
visible: model.available
}
- onObjectAdded: menu.insertItem(index, object);
- onObjectRemoved: menu.removeItem(object);
+ onObjectAdded: menu.insertItem(index, object)
+ onObjectRemoved: menu.removeItem(object)
}
MenuSeparator
diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml
index 444bdc2dd5..5ff5f567ea 100644
--- a/resources/qml/Preferences/GeneralPage.qml
+++ b/resources/qml/Preferences/GeneralPage.qml
@@ -151,7 +151,6 @@ UM.PreferencesPage
{
id: languageLabel
text: catalog.i18nc("@label","Language:")
- anchors.verticalCenter: languageComboBox.verticalCenter
}
ComboBox
@@ -219,7 +218,6 @@ UM.PreferencesPage
{
id: currencyLabel
text: catalog.i18nc("@label","Currency:")
- anchors.verticalCenter: currencyField.verticalCenter
}
TextField
@@ -233,7 +231,6 @@ UM.PreferencesPage
{
id: themeLabel
text: catalog.i18nc("@label","Theme:")
- anchors.verticalCenter: themeComboBox.verticalCenter
}
ComboBox
diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml
index 8896d0611e..e319069502 100644
--- a/resources/qml/Preferences/SettingVisibilityPage.qml
+++ b/resources/qml/Preferences/SettingVisibilityPage.qml
@@ -117,7 +117,7 @@ UM.PreferencesPage
{
for(var i = 0; i < settingVisibilityPresetsModel.items.length; ++i)
{
- if(settingVisibilityPresetsModel.items[i].id == settingVisibilityPresetsModel.activePreset)
+ if(settingVisibilityPresetsModel.items[i].presetId == settingVisibilityPresetsModel.activePreset)
{
currentIndex = i;
return;
@@ -128,8 +128,8 @@ UM.PreferencesPage
onActivated:
{
- var preset_id = settingVisibilityPresetsModel.items[index].id;
- settingVisibilityPresetsModel.setActivePreset(preset_id);
+ var preset_id = settingVisibilityPresetsModel.items[index].presetId
+ settingVisibilityPresetsModel.setActivePreset(preset_id)
}
}
diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml
new file mode 100644
index 0000000000..e0f0827b17
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml
@@ -0,0 +1,48 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+
+import UM 1.3 as UM
+import Cura 1.0 as Cura
+
+
+Item
+{
+ id: customPrintSetup
+
+ // TODO: Hardcoded now but UX has to decide about the height of this item
+ height: 500
+
+ property real padding: UM.Theme.getSize("default_margin").width
+
+ // Profile selector row
+ GlobalProfileSelector
+ {
+ id: globalProfileRow
+ anchors
+ {
+ top: parent.top
+ topMargin: parent.padding
+ left: parent.left
+ leftMargin: parent.padding
+ right: parent.right
+ rightMargin: parent.padding
+ }
+ }
+
+ Cura.SettingView
+ {
+ anchors
+ {
+ top: globalProfileRow.bottom
+ topMargin: UM.Theme.getSize("default_margin").height
+ left: parent.left
+ leftMargin: parent.padding
+ right: parent.right
+ rightMargin: parent.padding
+ bottom: parent.bottom
+ }
+ }
+}
diff --git a/resources/qml/GlobalProfileButton.qml b/resources/qml/PrintSetupSelector/Custom/GlobalProfileSelector.qml
similarity index 67%
rename from resources/qml/GlobalProfileButton.qml
rename to resources/qml/PrintSetupSelector/Custom/GlobalProfileSelector.qml
index bac2732037..91525d0f9e 100644
--- a/resources/qml/GlobalProfileButton.qml
+++ b/resources/qml/PrintSetupSelector/Custom/GlobalProfileSelector.qml
@@ -9,24 +9,25 @@ import QtQuick.Layouts 1.2
import UM 1.2 as UM
import Cura 1.0 as Cura
-import "Menus"
-
Item
{
id: globalProfileRow
- height: UM.Theme.getSize("print_setup_item").height
+ height: childrenRect.height
Label
{
id: globalProfileLabel
- text: catalog.i18nc("@label","Profile:")
- textFormat: Text.PlainText
- width: Math.round(parent.width * 0.45 - UM.Theme.getSize("thick_margin").width - 2)
+ anchors
+ {
+ top: parent.top
+ bottom: parent.bottom
+ left: parent.left
+ right: globalProfileSelection.left
+ }
+ text: catalog.i18nc("@label", "Profile")
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
verticalAlignment: Text.AlignVCenter
- anchors.top: parent.top
- anchors.bottom: parent.bottom
}
ToolButton
@@ -34,20 +35,30 @@ Item
id: globalProfileSelection
text: generateActiveQualityText()
- width: Math.round(parent.width * 0.55)
- height: UM.Theme.getSize("setting_control").height
- anchors.left: globalProfileLabel.right
- anchors.right: parent.right
+ width: UM.Theme.getSize("print_setup_big_dropdown").width
+ height: UM.Theme.getSize("print_setup_big_dropdown").height
+ anchors
+ {
+ top: parent.top
+ right: parent.right
+ }
tooltip: Cura.MachineManager.activeQualityOrQualityChangesName
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true
- menu: ProfileMenu { }
+ menu: Cura.ProfileMenu { }
- function generateActiveQualityText () {
- var result = Cura.MachineManager.activeQualityOrQualityChangesName;
+ function generateActiveQualityText()
+ {
+ var result = Cura.MachineManager.activeQualityOrQualityChangesName
+ if (Cura.MachineManager.isActiveQualityExperimental)
+ {
+ result += " (Experimental)"
+ }
- if (Cura.MachineManager.isActiveQualitySupported) {
- if (Cura.MachineManager.activeQualityLayerHeight > 0) {
+ if (Cura.MachineManager.isActiveQualitySupported)
+ {
+ if (Cura.MachineManager.activeQualityLayerHeight > 0)
+ {
result += " "
result += " - "
result += Cura.MachineManager.activeQualityLayerHeight + "mm"
@@ -63,15 +74,15 @@ Item
id: customisedSettings
visible: Cura.MachineManager.hasUserSettings
- height: Math.round(parent.height * 0.6)
- width: Math.round(parent.height * 0.6)
+ width: UM.Theme.getSize("print_setup_icon").width
+ height: UM.Theme.getSize("print_setup_icon").height
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: Math.round(UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("thick_margin").width)
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
- iconSource: UM.Theme.getIcon("star");
+ iconSource: UM.Theme.getIcon("star")
onClicked:
{
@@ -81,7 +92,7 @@ Item
onEntered:
{
var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.")
- base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("thick_margin").width, 0), content)
+ base.showTooltip(globalProfileRow, Qt.point(-UM.Theme.getSize("default_margin").width, 0), content)
}
onExited: base.hideTooltip()
}
diff --git a/resources/qml/PrintSetupSelector/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/CustomPrintSetup.qml
deleted file mode 100644
index f58695b48f..0000000000
--- a/resources/qml/PrintSetupSelector/CustomPrintSetup.qml
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2018 Ultimaker B.V.
-// Cura is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.7
-import QtQuick.Controls 2.0
-
-import "../Settings"
-
-SettingView {
-}
diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml
index 1794a54cdf..f1b424f7f2 100644
--- a/resources/qml/PrintSetupSelector/PrintSetupSelector.qml
+++ b/resources/qml/PrintSetupSelector/PrintSetupSelector.qml
@@ -9,17 +9,11 @@ import Cura 1.0 as Cura
Cura.ExpandableComponent
{
- id: base
-
- property bool hideSettings: PrintInformation.preSliced
+ id: printSetupSelector
property string enabledText: catalog.i18nc("@label:Should be short", "On")
property string disabledText: catalog.i18nc("@label:Should be short", "Off")
- // This widget doesn't show tooltips by itself. Instead it emits signals so others can do something with it.
- signal showTooltip(Item item, point location, string text)
- signal hideTooltip()
-
iconSource: UM.Theme.getIcon("pencil")
popupPadding: UM.Theme.getSize("default_lining").width
popupSpacingY: UM.Theme.getSize("narrow_margin").width
@@ -32,17 +26,6 @@ Cura.ExpandableComponent
name: "cura"
}
- Timer
- {
- id: tooltipDelayTimer
- interval: 500
- repeat: false
- property var item
- property string text
-
- onTriggered: base.showTooltip(base, {x: 0, y: item.y}, text)
- }
-
headerItem: PrintSetupSelectorHeader
{
anchors.fill: parent
diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
index 309d612fae..77d1b59f4c 100644
--- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
+++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml
@@ -7,6 +7,9 @@ import QtQuick.Controls 2.3
import UM 1.3 as UM
import Cura 1.0 as Cura
+import "Recommended"
+import "Custom"
+
Item
{
id: popup
@@ -90,7 +93,7 @@ Item
Item
{
id: contents
- height: childrenRect.height
+ height: currentModeIndex == 0 ? recommendedPrintSetup.height : customPrintSetup.height
anchors
{
@@ -101,27 +104,25 @@ Item
RecommendedPrintSetup
{
+ id: recommendedPrintSetup
anchors
{
left: parent.left
right: parent.right
top: parent.top
}
- onShowTooltip: base.showTooltip(item, location, text)
- onHideTooltip: base.hideTooltip()
visible: currentModeIndex == 0
}
CustomPrintSetup
{
+ id: customPrintSetup
anchors
{
left: parent.left
right: parent.right
top: parent.top
}
- onShowTooltip: base.showTooltip(item, location, text)
- onHideTooltip: base.hideTooltip()
visible: currentModeIndex == 1
}
}
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
new file mode 100644
index 0000000000..3092644d4e
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml
@@ -0,0 +1,100 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+import UM 1.2 as UM
+import Cura 1.0 as Cura
+
+
+//
+// Adhesion
+//
+Item
+{
+ id: enableAdhesionRow
+ height: childrenRect.height
+
+ property real labelColumnWidth: Math.round(width / 3)
+
+ Cura.IconWithText
+ {
+ id: enableAdhesionRowTitle
+ anchors.top: parent.top
+ anchors.left: parent.left
+ source: UM.Theme.getIcon("category_adhesion")
+ text: catalog.i18nc("@label", "Adhesion")
+ width: labelColumnWidth
+ }
+
+ Item
+ {
+ id: enableAdhesionContainer
+ height: enableAdhesionCheckBox.height
+
+ anchors
+ {
+ left: enableAdhesionRowTitle.right
+ right: parent.right
+ verticalCenter: enableAdhesionRowTitle.verticalCenter
+ }
+
+ CheckBox
+ {
+ id: enableAdhesionCheckBox
+ anchors.verticalCenter: parent.verticalCenter
+
+ property alias _hovered: adhesionMouseArea.containsMouse
+
+ //: Setting enable printing build-plate adhesion helper checkbox
+ style: UM.Theme.styles.checkbox
+ enabled: recommendedPrintSettup.settingsEnabled
+
+ visible: platformAdhesionType.properties.enabled == "True"
+ checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none"
+
+ MouseArea
+ {
+ id: adhesionMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked:
+ {
+ var adhesionType = "skirt"
+ if (!parent.checked)
+ {
+ // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft
+ platformAdhesionType.removeFromContainer(0)
+ adhesionType = platformAdhesionType.properties.value
+ if(adhesionType == "skirt" || adhesionType == "none")
+ {
+ // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim
+ adhesionType = "brim"
+ }
+ }
+ platformAdhesionType.setPropertyValue("value", adhesionType)
+ }
+
+ onEntered:
+ {
+ base.showTooltip(enableAdhesionCheckBox, Qt.point(-enableAdhesionContainer.x - UM.Theme.getSize("thick_margin").width, 0),
+ catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards."));
+ }
+ onExited: base.hideTooltip()
+ }
+ }
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: platformAdhesionType
+ containerStack: Cura.MachineManager.activeMachine
+ removeUnusedValue: false //Doesn't work with settings that are resolved.
+ key: "adhesion_type"
+ watchedProperties: [ "value", "enabled" ]
+ storeIndex: 0
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
new file mode 100644
index 0000000000..7c026ac9de
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml
@@ -0,0 +1,252 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+import UM 1.2 as UM
+import Cura 1.0 as Cura
+
+
+//
+// Infill
+//
+Item
+{
+ id: infillRow
+ height: childrenRect.height
+
+ property real labelColumnWidth: Math.round(width / 3)
+
+ // Create a binding to update the icon when the infill density changes
+ Binding
+ {
+ target: infillRowTitle
+ property: "source"
+ value:
+ {
+ var density = parseInt(infillDensity.properties.value)
+ if (parseInt(infillSteps.properties.value) != 0)
+ {
+ return UM.Theme.getIcon("gradual")
+ }
+ if (density <= 0)
+ {
+ return UM.Theme.getIcon("hollow")
+ }
+ if (density < 40)
+ {
+ return UM.Theme.getIcon("sparse")
+ }
+ if (density < 90)
+ {
+ return UM.Theme.getIcon("dense")
+ }
+ return UM.Theme.getIcon("solid")
+ }
+ }
+
+ // We use a binding to make sure that after manually setting infillSlider.value it is still bound to the property provider
+ Binding
+ {
+ target: infillSlider
+ property: "value"
+ value: parseInt(infillDensity.properties.value)
+ }
+
+ // Here are the elements that are shown in the left column
+ Cura.IconWithText
+ {
+ id: infillRowTitle
+ anchors.top: parent.top
+ anchors.left: parent.left
+ source: UM.Theme.getIcon("category_infill")
+ text: catalog.i18nc("@label", "Infill") + " (%)"
+ width: labelColumnWidth
+ }
+
+ Item
+ {
+ id: infillSliderContainer
+ height: childrenRect.height
+
+ anchors
+ {
+ left: infillRowTitle.right
+ right: parent.right
+ verticalCenter: infillRowTitle.verticalCenter
+ }
+
+ Slider
+ {
+ id: infillSlider
+
+ width: parent.width
+ height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider
+
+ minimumValue: 0
+ maximumValue: 100
+ stepSize: 1
+ tickmarksEnabled: true
+
+ // disable slider when gradual support is enabled
+ enabled: parseInt(infillSteps.properties.value) == 0
+
+ // set initial value from stack
+ value: parseInt(infillDensity.properties.value)
+
+ style: SliderStyle
+ {
+ //Draw line
+ groove: Item
+ {
+ Rectangle
+ {
+ height: UM.Theme.getSize("print_setup_slider_groove").height
+ width: control.width - UM.Theme.getSize("print_setup_slider_handle").width
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
+ }
+ }
+
+ handle: Rectangle
+ {
+ id: handleButton
+ color: control.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable")
+ implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
+ implicitHeight: implicitWidth
+ radius: Math.round(implicitWidth / 2)
+ }
+
+ tickmarks: Repeater
+ {
+ id: repeater
+ model: control.maximumValue / control.stepSize + 1
+
+ Rectangle
+ {
+ color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
+ implicitWidth: UM.Theme.getSize("print_setup_slider_tickmarks").width
+ implicitHeight: UM.Theme.getSize("print_setup_slider_tickmarks").height
+ anchors.verticalCenter: parent.verticalCenter
+
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ x: ((styleData.handleWidth / 2) - (implicitWidth / 2) + (index * ((repeater.width - styleData.handleWidth) / (repeater.count-1))))
+ radius: Math.round(implicitWidth / 2)
+ visible: (index % 10) == 0 // Only show steps of 10%
+
+ Label
+ {
+ text: index
+ visible: (index % 20) == 0 // Only show steps of 20%
+ anchors.horizontalCenter: parent.horizontalCenter
+ y: UM.Theme.getSize("thin_margin").height
+ renderType: Text.NativeRendering
+ }
+ }
+ }
+ }
+
+ onValueChanged:
+ {
+ // Don't round the value if it's already the same
+ if (parseInt(infillDensity.properties.value) == infillSlider.value)
+ {
+ return
+ }
+
+ // Round the slider value to the nearest multiple of 10 (simulate step size of 10)
+ var roundedSliderValue = Math.round(infillSlider.value / 10) * 10
+
+ // Update the slider value to represent the rounded value
+ infillSlider.value = roundedSliderValue
+
+ // Update value only if the Recomended mode is Active,
+ // Otherwise if I change the value in the Custom mode the Recomended view will try to repeat
+ // same operation
+ var active_mode = UM.Preferences.getValue("cura/active_mode")
+
+ if (active_mode == 0 || active_mode == "simple")
+ {
+ Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
+ Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
+ }
+ }
+ }
+ }
+
+ // Gradual Support Infill Checkbox
+ CheckBox
+ {
+ id: enableGradualInfillCheckBox
+ property alias _hovered: enableGradualInfillMouseArea.containsMouse
+
+ anchors.top: infillSliderContainer.bottom
+ anchors.topMargin: UM.Theme.getSize("wide_margin").height
+ anchors.left: infillSliderContainer.left
+
+ text: catalog.i18nc("@label", "Gradual infill")
+ style: UM.Theme.styles.checkbox
+ enabled: recommendedPrintSettup.settingsEnabled
+ visible: infillSteps.properties.enabled == "True"
+ checked: parseInt(infillSteps.properties.value) > 0
+
+ MouseArea
+ {
+ id: enableGradualInfillMouseArea
+
+ anchors.fill: parent
+ hoverEnabled: true
+ enabled: true
+
+ property var previousInfillDensity: parseInt(infillDensity.properties.value)
+
+ onClicked:
+ {
+ // Set to 90% only when enabling gradual infill
+ var newInfillDensity;
+ if (parseInt(infillSteps.properties.value) == 0)
+ {
+ previousInfillDensity = parseInt(infillDensity.properties.value)
+ newInfillDensity = 90
+ } else {
+ newInfillDensity = previousInfillDensity
+ }
+ Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", String(newInfillDensity))
+
+ var infill_steps_value = 0
+ if (parseInt(infillSteps.properties.value) == 0)
+ {
+ infill_steps_value = 5
+ }
+
+ Cura.MachineManager.setSettingForAllExtruders("gradual_infill_steps", "value", infill_steps_value)
+ }
+
+ onEntered: base.showTooltip(enableGradualInfillCheckBox, Qt.point(-infillSliderContainer.x - UM.Theme.getSize("thick_margin").width, 0),
+ catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top."))
+
+ onExited: base.hideTooltip()
+ }
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: infillDensity
+ containerStackId: Cura.MachineManager.activeStackId
+ key: "infill_sparse_density"
+ watchedProperties: [ "value" ]
+ storeIndex: 0
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: infillSteps
+ containerStackId: Cura.MachineManager.activeStackId
+ key: "gradual_infill_steps"
+ watchedProperties: ["value", "enabled"]
+ storeIndex: 0
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml
new file mode 100644
index 0000000000..194747271e
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml
@@ -0,0 +1,72 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+import UM 1.2 as UM
+import Cura 1.0 as Cura
+
+Item
+{
+ id: recommendedPrintSettup
+
+ height: childrenRect.height + 2 * padding
+
+ property Action configureSettings
+
+ property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
+ property real padding: UM.Theme.getSize("thick_margin").width
+
+ UM.I18nCatalog
+ {
+ id: catalog
+ name: "cura"
+ }
+
+ Column
+ {
+ width: parent.width - 2 * parent.padding
+ spacing: UM.Theme.getSize("wide_margin").height
+
+ anchors
+ {
+ left: parent.left
+ right: parent.right
+ top: parent.top
+ margins: parent.padding
+ }
+
+ // TODO
+ property real firstColumnWidth: Math.round(width / 3)
+
+ RecommendedQualityProfileSelector
+ {
+ width: parent.width
+ // TODO Create a reusable component with these properties to not define them separately for each component
+ labelColumnWidth: parent.firstColumnWidth
+ }
+
+ RecommendedInfillDensitySelector
+ {
+ width: parent.width
+ // TODO Create a reusable component with these properties to not define them separately for each component
+ labelColumnWidth: parent.firstColumnWidth
+ }
+
+ RecommendedSupportSelector
+ {
+ width: parent.width
+ // TODO Create a reusable component with these properties to not define them separately for each component
+ labelColumnWidth: parent.firstColumnWidth
+ }
+
+ RecommendedAdhesionSelector
+ {
+ width: parent.width
+ // TODO Create a reusable component with these properties to not define them separately for each component
+ labelColumnWidth: parent.firstColumnWidth
+ }
+ }
+}
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml
new file mode 100644
index 0000000000..4963f10792
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml
@@ -0,0 +1,453 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+import UM 1.2 as UM
+import Cura 1.0 as Cura
+
+
+//
+// Quality profile
+//
+Item
+{
+ id: qualityRow
+ height: childrenRect.height
+
+ property real labelColumnWidth: Math.round(width / 3)
+ property real settingsColumnWidth: width - labelColumnWidth
+
+ Timer
+ {
+ id: qualitySliderChangeTimer
+ interval: 50
+ running: false
+ repeat: false
+ onTriggered:
+ {
+ var item = Cura.QualityProfilesDropDownMenuModel.getItem(qualitySlider.value);
+ Cura.MachineManager.activeQualityGroup = item.quality_group;
+ }
+ }
+
+ Component.onCompleted: qualityModel.update()
+
+ Connections
+ {
+ target: Cura.QualityProfilesDropDownMenuModel
+ onItemsChanged: qualityModel.update()
+ }
+
+ Connections {
+ target: base
+ onVisibleChanged:
+ {
+ // update needs to be called when the widgets are visible, otherwise the step width calculation
+ // will fail because the width of an invisible item is 0.
+ if (visible)
+ {
+ qualityModel.update();
+ }
+ }
+ }
+
+ ListModel
+ {
+ id: qualityModel
+
+ property var totalTicks: 0
+ property var availableTotalTicks: 0
+ property var existingQualityProfile: 0
+
+ property var qualitySliderActiveIndex: 0
+ property var qualitySliderStepWidth: 0
+ property var qualitySliderAvailableMin: 0
+ property var qualitySliderAvailableMax: 0
+ property var qualitySliderMarginRight: 0
+
+ function update ()
+ {
+ reset()
+
+ var availableMin = -1
+ var availableMax = -1
+
+ for (var i = 0; i < Cura.QualityProfilesDropDownMenuModel.rowCount(); i++)
+ {
+ var qualityItem = Cura.QualityProfilesDropDownMenuModel.getItem(i)
+
+ // Add each quality item to the UI quality model
+ qualityModel.append(qualityItem)
+
+ // Set selected value
+ if (Cura.MachineManager.activeQualityType == qualityItem.quality_type)
+ {
+ // set to -1 when switching to user created profile so all ticks are clickable
+ if (Cura.SimpleModeSettingsManager.isProfileUserCreated)
+ {
+ qualityModel.qualitySliderActiveIndex = -1
+ }
+ else
+ {
+ qualityModel.qualitySliderActiveIndex = i
+ }
+
+ qualityModel.existingQualityProfile = 1
+ }
+
+ // Set min available
+ if (qualityItem.available && availableMin == -1)
+ {
+ availableMin = i
+ }
+
+ // Set max available
+ if (qualityItem.available)
+ {
+ availableMax = i
+ }
+ }
+
+ // Set total available ticks for active slider part
+ if (availableMin != -1)
+ {
+ qualityModel.availableTotalTicks = availableMax - availableMin + 1
+ }
+
+ // Calculate slider values
+ calculateSliderStepWidth(qualityModel.totalTicks)
+ calculateSliderMargins(availableMin, availableMax, qualityModel.totalTicks)
+
+ qualityModel.qualitySliderAvailableMin = availableMin
+ qualityModel.qualitySliderAvailableMax = availableMax
+ }
+
+ function calculateSliderStepWidth (totalTicks)
+ {
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ qualityModel.qualitySliderStepWidth = totalTicks != 0 ?
+ ((settingsColumnWidth - UM.Theme.getSize("print_setup_slider_handle").width) / (totalTicks)) : 0
+ }
+
+ function calculateSliderMargins (availableMin, availableMax, totalTicks)
+ {
+ if (availableMin == -1 || (availableMin == 0 && availableMax == 0))
+ {
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ qualityModel.qualitySliderMarginRight = settingsColumnWidth
+ }
+ else if (availableMin == availableMax)
+ {
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ qualityModel.qualitySliderMarginRight = (totalTicks - availableMin) * qualitySliderStepWidth
+ }
+ else
+ {
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ qualityModel.qualitySliderMarginRight = (totalTicks - availableMax) * qualitySliderStepWidth
+ }
+ }
+
+ function reset () {
+ qualityModel.clear()
+ qualityModel.availableTotalTicks = 0
+ qualityModel.existingQualityProfile = 0
+
+ // check, the ticks count cannot be less than zero
+ qualityModel.totalTicks = Math.max(0, Cura.QualityProfilesDropDownMenuModel.rowCount() - 1)
+ }
+ }
+
+ // Here are the elements that are shown in the left column
+ Item
+ {
+ id: titleRow
+ width: labelColumnWidth
+ height: childrenRect.height
+
+ Cura.IconWithText
+ {
+ id: qualityRowTitle
+ source: UM.Theme.getIcon("category_layer_height")
+ text: catalog.i18nc("@label", "Layer Height")
+ anchors.left: parent.left
+ anchors.right: customisedSettings.left
+ }
+
+ UM.SimpleButton
+ {
+ id: customisedSettings
+
+ visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
+ height: visible ? UM.Theme.getSize("print_setup_icon").height : 0
+ width: height
+ anchors
+ {
+ right: parent.right
+ rightMargin: UM.Theme.getSize("default_margin").width
+ leftMargin: UM.Theme.getSize("default_margin").width
+ verticalCenter: parent.verticalCenter
+ }
+
+ color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button")
+ iconSource: UM.Theme.getIcon("reset")
+
+ onClicked:
+ {
+ // if the current profile is user-created, switch to a built-in quality
+ Cura.MachineManager.resetToUseDefaultQuality()
+ }
+ onEntered:
+ {
+ var tooltipContent = catalog.i18nc("@tooltip","You have modified some profile settings. If you want to change these go to custom mode.")
+ base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, 0), tooltipContent)
+ }
+ onExited: base.hideTooltip()
+ }
+ }
+
+ // Show titles for the each quality slider ticks
+ Item
+ {
+ anchors.left: speedSlider.left
+ anchors.top: speedSlider.bottom
+ height: childrenRect.height
+
+ Repeater
+ {
+ model: qualityModel
+
+ Label
+ {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.top: parent.top
+ // The height has to be set manually, otherwise it's not automatically calculated in the repeater
+ height: UM.Theme.getSize("default_margin").height
+ color: (Cura.MachineManager.activeMachine != null && Cura.QualityProfilesDropDownMenuModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
+ text:
+ {
+ var result = ""
+ if(Cura.MachineManager.activeMachine != null)
+ {
+ result = Cura.QualityProfilesDropDownMenuModel.getItem(index).layer_height
+
+ if(result == undefined)
+ {
+ result = "";
+ }
+ else
+ {
+ result = Number(Math.round(result + "e+2") + "e-2"); //Round to 2 decimals. Javascript makes this difficult...
+ if (result == undefined || result != result) //Parse failure.
+ {
+ result = "";
+ }
+ }
+ }
+ return result
+ }
+
+ x:
+ {
+ // Make sure the text aligns correctly with each tick
+ if (qualityModel.totalTicks == 0)
+ {
+ // If there is only one tick, align it centrally
+ return Math.round(((settingsColumnWidth) - width) / 2)
+ }
+ else if (index == 0)
+ {
+ return Math.round(settingsColumnWidth / qualityModel.totalTicks) * index
+ }
+ else if (index == qualityModel.totalTicks)
+ {
+ return Math.round(settingsColumnWidth / qualityModel.totalTicks) * index - width
+ }
+ else
+ {
+ return Math.round((settingsColumnWidth / qualityModel.totalTicks) * index - (width / 2))
+ }
+ }
+ }
+ }
+ }
+
+ // Print speed slider
+ // Two sliders are created, one at the bottom with the unavailable qualities
+ // and the other at the top with the available quality profiles and so the handle to select them.
+ Item
+ {
+ id: speedSlider
+ height: childrenRect.height
+
+ anchors
+ {
+ left: titleRow.right
+ right: parent.right
+ verticalCenter: titleRow.verticalCenter
+ }
+
+ // Draw unavailable slider
+ Slider
+ {
+ id: unavailableSlider
+
+ width: parent.width
+ height: qualitySlider.height // Same height as the slider that is on top
+ updateValueWhileDragging : false
+ tickmarksEnabled: true
+
+ minimumValue: 0
+ // maximumValue must be greater than minimumValue to be able to see the handle. While the value is strictly
+ // speaking not always correct, it seems to have the correct behavior (switching from 0 available to 1 available)
+ maximumValue: qualityModel.totalTicks
+ stepSize: 1
+
+ style: SliderStyle
+ {
+ //Draw Unvailable line
+ groove: Item
+ {
+ Rectangle
+ {
+ height: UM.Theme.getSize("print_setup_slider_groove").height
+ width: control.width - UM.Theme.getSize("print_setup_slider_handle").width
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ color: UM.Theme.getColor("quality_slider_unavailable")
+ }
+ }
+
+ handle: Item {}
+
+ tickmarks: Repeater
+ {
+ id: qualityRepeater
+ model: qualityModel.totalTicks > 0 ? qualityModel : 0
+
+ Rectangle
+ {
+ color: Cura.QualityProfilesDropDownMenuModel.getItem(index).available ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
+ implicitWidth: UM.Theme.getSize("print_setup_slider_tickmarks").width
+ implicitHeight: UM.Theme.getSize("print_setup_slider_tickmarks").height
+ anchors.verticalCenter: parent.verticalCenter
+
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ x: ((UM.Theme.getSize("print_setup_slider_handle").width / 2) - (implicitWidth / 2) + (qualityModel.qualitySliderStepWidth * index))
+ radius: Math.round(implicitWidth / 2)
+ }
+ }
+ }
+
+ // Create a mouse area on top of the unavailable profiles to show a specific tooltip
+ MouseArea
+ {
+ anchors.fill: parent
+ hoverEnabled: true
+ enabled: !Cura.SimpleModeSettingsManager.isProfileUserCreated
+ onEntered:
+ {
+ var tooltipContent = catalog.i18nc("@tooltip", "This quality profile is not available for you current material and nozzle configuration. Please change these to enable this quality profile")
+ base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, customisedSettings.height), tooltipContent)
+ }
+ onExited: base.hideTooltip()
+ }
+ }
+
+ // Draw available slider
+ Slider
+ {
+ id: qualitySlider
+
+ width: qualityModel.qualitySliderStepWidth * (qualityModel.availableTotalTicks - 1) + UM.Theme.getSize("print_setup_slider_handle").width
+ height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider
+ enabled: qualityModel.totalTicks > 0 && !Cura.SimpleModeSettingsManager.isProfileCustomized
+ visible: qualityModel.availableTotalTicks > 0
+ updateValueWhileDragging : false
+
+ anchors
+ {
+ right: parent.right
+ rightMargin: qualityModel.qualitySliderMarginRight
+ }
+
+ minimumValue: qualityModel.qualitySliderAvailableMin >= 0 ? qualityModel.qualitySliderAvailableMin : 0
+ // maximumValue must be greater than minimumValue to be able to see the handle. While the value is strictly
+ // speaking not always correct, it seems to have the correct behavior (switching from 0 available to 1 available)
+ maximumValue: qualityModel.qualitySliderAvailableMax >= 1 ? qualityModel.qualitySliderAvailableMax : 1
+ stepSize: 1
+
+ value: qualityModel.qualitySliderActiveIndex
+
+ style: SliderStyle
+ {
+ // Draw Available line
+ groove: Item
+ {
+ Rectangle
+ {
+ height: UM.Theme.getSize("print_setup_slider_groove").height
+ width: control.width - UM.Theme.getSize("print_setup_slider_handle").width
+ anchors.verticalCenter: parent.verticalCenter
+
+ // Do not use Math.round otherwise the tickmarks won't be aligned
+ x: UM.Theme.getSize("print_setup_slider_handle").width / 2
+ color: UM.Theme.getColor("quality_slider_available")
+ }
+ }
+
+ handle: Rectangle
+ {
+ id: qualityhandleButton
+ color: UM.Theme.getColor("primary")
+ implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
+ implicitHeight: implicitWidth
+ radius: Math.round(implicitWidth / 2)
+ visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile
+ }
+ }
+
+ onValueChanged:
+ {
+ // only change if an active machine is set and the slider is visible at all.
+ if (Cura.MachineManager.activeMachine != null && visible)
+ {
+ // prevent updating during view initializing. Trigger only if the value changed by user
+ if (qualitySlider.value != qualityModel.qualitySliderActiveIndex && qualityModel.qualitySliderActiveIndex != -1)
+ {
+ // start updating with short delay
+ qualitySliderChangeTimer.start()
+ }
+ }
+ }
+
+ // This mouse area is only used to capture the onHover state and don't propagate it to the unavailable mouse area
+ MouseArea
+ {
+ anchors.fill: parent
+ hoverEnabled: true
+ acceptedButtons: Qt.NoButton
+ enabled: !Cura.SimpleModeSettingsManager.isProfileUserCreated
+ }
+ }
+
+ // This mouse area will only take the mouse events and show a tooltip when the profile in use is
+ // a user created profile
+ MouseArea
+ {
+ anchors.fill: parent
+ hoverEnabled: true
+ visible: Cura.SimpleModeSettingsManager.isProfileUserCreated
+
+ onEntered:
+ {
+ var tooltipContent = catalog.i18nc("@tooltip", "A custom profile is currently active. To enable the quality slider, choose a default quality profile in Custom tab")
+ base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, customisedSettings.height), tooltipContent)
+ }
+ onExited: base.hideTooltip()
+ }
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
new file mode 100644
index 0000000000..d367510ef6
--- /dev/null
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml
@@ -0,0 +1,213 @@
+// Copyright (c) 2018 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.7
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+
+import UM 1.2 as UM
+import Cura 1.0 as Cura
+
+
+//
+// Enable support
+//
+Item
+{
+ id: enableSupportRow
+ height: childrenRect.height
+
+ property real labelColumnWidth: Math.round(width / 3)
+
+ Cura.IconWithText
+ {
+ id: enableSupportRowTitle
+ anchors.top: parent.top
+ anchors.left: parent.left
+ visible: enableSupportCheckBox.visible
+ source: UM.Theme.getIcon("category_support")
+ text: catalog.i18nc("@label", "Support")
+ width: labelColumnWidth
+ }
+
+ Item
+ {
+ id: enableSupportContainer
+ height: enableSupportCheckBox.height
+
+ anchors
+ {
+ left: enableSupportRowTitle.right
+ right: parent.right
+ verticalCenter: enableSupportRowTitle.verticalCenter
+ }
+
+ CheckBox
+ {
+ id: enableSupportCheckBox
+ anchors.verticalCenter: parent.verticalCenter
+
+ property alias _hovered: enableSupportMouseArea.containsMouse
+
+ style: UM.Theme.styles.checkbox
+ enabled: recommendedPrintSettup.settingsEnabled
+
+ visible: supportEnabled.properties.enabled == "True"
+ checked: supportEnabled.properties.value == "True"
+
+ MouseArea
+ {
+ id: enableSupportMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+
+ onClicked: supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True")
+
+ onEntered:
+ {
+ base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportContainer.x - UM.Theme.getSize("thick_margin").width, 0),
+ catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing."))
+ }
+ onExited: base.hideTooltip()
+ }
+ }
+
+ ComboBox
+ {
+ id: supportExtruderCombobox
+
+ height: UM.Theme.getSize("print_setup_big_dropdown").height
+ anchors
+ {
+ left: enableSupportCheckBox.right
+ right: parent.right
+ leftMargin: UM.Theme.getSize("thick_margin").width
+ rightMargin: UM.Theme.getSize("thick_margin").width
+ verticalCenter: parent.verticalCenter
+ }
+
+ style: UM.Theme.styles.combobox_color
+ enabled: recommendedPrintSettup.settingsEnabled
+ visible: enableSupportCheckBox.visible && (supportEnabled.properties.value == "True") && (extrudersEnabledCount.properties.value > 1)
+ textRole: "text" // this solves that the combobox isn't populated in the first time Cura is started
+
+ model: extruderModel
+
+ property alias _hovered: supportExtruderMouseArea.containsMouse
+ property string color_override: "" // for manually setting values
+ property string color: // is evaluated automatically, but the first time is before extruderModel being filled
+ {
+ var current_extruder = extruderModel.get(currentIndex);
+ color_override = "";
+ if (current_extruder === undefined) return ""
+ return (current_extruder.color) ? current_extruder.color : "";
+ }
+
+ currentIndex:
+ {
+ if (supportExtruderNr.properties == null)
+ {
+ return Cura.MachineManager.defaultExtruderPosition
+ }
+ else
+ {
+ var extruder = parseInt(supportExtruderNr.properties.value)
+ if ( extruder === -1)
+ {
+ return Cura.MachineManager.defaultExtruderPosition
+ }
+ return extruder;
+ }
+ }
+
+ onActivated: supportExtruderNr.setPropertyValue("value", String(index))
+
+ MouseArea
+ {
+ id: supportExtruderMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ enabled: recommendedPrintSettup.settingsEnabled
+ acceptedButtons: Qt.NoButton
+ onEntered:
+ {
+ base.showTooltip(supportExtruderCombobox, Qt.point(-enableSupportContainer.x - supportExtruderCombobox.x - UM.Theme.getSize("thick_margin").width, 0),
+ catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
+ }
+ onExited: base.hideTooltip()
+
+ }
+
+ function updateCurrentColor()
+ {
+ var current_extruder = extruderModel.get(currentIndex)
+ if (current_extruder !== undefined)
+ {
+ supportExtruderCombobox.color_override = current_extruder.color
+ }
+ }
+ }
+ }
+
+ ListModel
+ {
+ id: extruderModel
+ Component.onCompleted: populateExtruderModel()
+ }
+
+ //: Model used to populate the extrudelModel
+ Cura.ExtrudersModel
+ {
+ id: extruders
+ onModelChanged: populateExtruderModel()
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: supportEnabled
+ containerStack: Cura.MachineManager.activeMachine
+ key: "support_enable"
+ watchedProperties: [ "value", "enabled", "description" ]
+ storeIndex: 0
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: extrudersEnabledCount
+ containerStack: Cura.MachineManager.activeMachine
+ key: "extruders_enabled_count"
+ watchedProperties: [ "value" ]
+ storeIndex: 0
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: supportExtruderNr
+ containerStack: Cura.MachineManager.activeMachine
+ key: "support_extruder_nr"
+ watchedProperties: [ "value" ]
+ storeIndex: 0
+ }
+
+ UM.SettingPropertyProvider
+ {
+ id: machineExtruderCount
+ containerStack: Cura.MachineManager.activeMachine
+ key: "machine_extruder_count"
+ watchedProperties: ["value"]
+ storeIndex: 0
+ }
+
+ function populateExtruderModel()
+ {
+ extruderModel.clear()
+ for (var extruderNumber = 0; extruderNumber < extruders.rowCount(); extruderNumber++)
+ {
+ extruderModel.append({
+ text: extruders.getItem(extruderNumber).name,
+ color: extruders.getItem(extruderNumber).color
+ })
+ }
+ supportExtruderCombobox.updateCurrentColor()
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/PrintSetupSelector/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/RecommendedPrintSetup.qml
deleted file mode 100644
index b48282135b..0000000000
--- a/resources/qml/PrintSetupSelector/RecommendedPrintSetup.qml
+++ /dev/null
@@ -1,1064 +0,0 @@
-// Copyright (c) 2018 Ultimaker B.V.
-// Cura is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.7
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles 1.4
-
-import UM 1.2 as UM
-import Cura 1.0 as Cura
-
-Column
-{
- id: base
-
- signal showTooltip(Item item, point location, string text)
- signal hideTooltip()
- height: childrenRect.height + 2 * padding
-
- padding: UM.Theme.getSize("thick_margin").width
- spacing: UM.Theme.getSize("default_margin").height
-
- property Action configureSettings
-
- property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
- property real labelColumnWidth: Math.round(width / 3)
- property real settingsColumnWidth: width - labelColumnWidth
-
- UM.I18nCatalog
- {
- id: catalog
- name: "cura"
- }
-
- //
- // Quality profile
- //
- Item
- {
- id: qualityRow
-
- anchors.left: parent.left
- anchors.right: parent.right
- height: childrenRect.height
-
- Timer
- {
- id: qualitySliderChangeTimer
- interval: 50
- running: false
- repeat: false
- onTriggered:
- {
- var item = Cura.QualityProfilesDropDownMenuModel.getItem(qualitySlider.value);
- Cura.MachineManager.activeQualityGroup = item.quality_group;
- }
- }
-
- Component.onCompleted: qualityModel.update()
-
- Connections
- {
- target: Cura.QualityProfilesDropDownMenuModel
- onItemsChanged: qualityModel.update()
- }
-
- Connections {
- target: base
- onVisibleChanged:
- {
- // update needs to be called when the widgets are visible, otherwise the step width calculation
- // will fail because the width of an invisible item is 0.
- if (visible)
- {
- qualityModel.update();
- }
- }
- }
-
- ListModel
- {
- id: qualityModel
-
- property var totalTicks: 0
- property var availableTotalTicks: 0
- property var existingQualityProfile: 0
-
- property var qualitySliderActiveIndex: 0
- property var qualitySliderStepWidth: 0
- property var qualitySliderAvailableMin: 0
- property var qualitySliderAvailableMax: 0
- property var qualitySliderMarginRight: 0
-
- function update ()
- {
- reset()
-
- var availableMin = -1
- var availableMax = -1
-
- for (var i = 0; i < Cura.QualityProfilesDropDownMenuModel.rowCount(); i++)
- {
- var qualityItem = Cura.QualityProfilesDropDownMenuModel.getItem(i)
-
- // Add each quality item to the UI quality model
- qualityModel.append(qualityItem)
-
- // Set selected value
- if (Cura.MachineManager.activeQualityType == qualityItem.quality_type)
- {
- // set to -1 when switching to user created profile so all ticks are clickable
- if (Cura.SimpleModeSettingsManager.isProfileUserCreated)
- {
- qualityModel.qualitySliderActiveIndex = -1
- }
- else
- {
- qualityModel.qualitySliderActiveIndex = i
- }
-
- qualityModel.existingQualityProfile = 1
- }
-
- // Set min available
- if (qualityItem.available && availableMin == -1)
- {
- availableMin = i
- }
-
- // Set max available
- if (qualityItem.available)
- {
- availableMax = i
- }
- }
-
- // Set total available ticks for active slider part
- if (availableMin != -1)
- {
- qualityModel.availableTotalTicks = availableMax - availableMin + 1
- }
-
- // Calculate slider values
- calculateSliderStepWidth(qualityModel.totalTicks)
- calculateSliderMargins(availableMin, availableMax, qualityModel.totalTicks)
-
- qualityModel.qualitySliderAvailableMin = availableMin
- qualityModel.qualitySliderAvailableMax = availableMax
- }
-
- function calculateSliderStepWidth (totalTicks)
- {
- qualityModel.qualitySliderStepWidth = totalTicks != 0 ? Math.round((settingsColumnWidth) / (totalTicks)) : 0
- }
-
- function calculateSliderMargins (availableMin, availableMax, totalTicks)
- {
- if (availableMin == -1 || (availableMin == 0 && availableMax == 0))
- {
- qualityModel.qualitySliderMarginRight = Math.round(settingsColumnWidth)
- }
- else if (availableMin == availableMax)
- {
- qualityModel.qualitySliderMarginRight = Math.round((totalTicks - availableMin) * qualitySliderStepWidth)
- }
- else
- {
- qualityModel.qualitySliderMarginRight = Math.round((totalTicks - availableMax) * qualitySliderStepWidth)
- }
- }
-
- function reset () {
- qualityModel.clear()
- qualityModel.availableTotalTicks = 0
- qualityModel.existingQualityProfile = 0
-
- // check, the ticks count cannot be less than zero
- qualityModel.totalTicks = Math.max(0, Cura.QualityProfilesDropDownMenuModel.rowCount() - 1)
- }
- }
-
- Cura.IconWithText
- {
- id: qualityRowTitle
- source: UM.Theme.getIcon("category_layer_height")
- text: catalog.i18nc("@label", "Layer Height")
- anchors.bottom: speedSlider.bottom
- width: labelColumnWidth
- }
-
- // Show titles for the each quality slider ticks
- Item
- {
- anchors.left: speedSlider.left
- anchors.top: speedSlider.bottom
-
- Repeater
- {
- model: qualityModel
-
- Label
- {
- anchors.verticalCenter: parent.verticalCenter
- anchors.top: parent.top
- color: (Cura.MachineManager.activeMachine != null && Cura.QualityProfilesDropDownMenuModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- text:
- {
- var result = ""
- if(Cura.MachineManager.activeMachine != null)
- {
- result = Cura.QualityProfilesDropDownMenuModel.getItem(index).layer_height
-
- if(result == undefined)
- {
- result = "";
- }
- else
- {
- result = Number(Math.round(result + "e+2") + "e-2"); //Round to 2 decimals. Javascript makes this difficult...
- if (result == undefined || result != result) //Parse failure.
- {
- result = "";
- }
- }
- }
- return result
- }
-
- x:
- {
- // Make sure the text aligns correctly with each tick
- if (qualityModel.totalTicks == 0)
- {
- // If there is only one tick, align it centrally
- return Math.round(((settingsColumnWidth) - width) / 2)
- }
- else if (index == 0)
- {
- return Math.round(settingsColumnWidth / qualityModel.totalTicks) * index
- }
- else if (index == qualityModel.totalTicks)
- {
- return Math.round(settingsColumnWidth / qualityModel.totalTicks) * index - width
- }
- else
- {
- return Math.round((settingsColumnWidth / qualityModel.totalTicks) * index - (width / 2))
- }
- }
- }
- }
- }
-
- //Print speed slider
- Rectangle
- {
- id: speedSlider
-
- anchors
- {
- left: qualityRowTitle.right
- right: parent.right
- }
-
- // This Item is used only for tooltip, for slider area which is unavailable
-// Item
-// {
-// function showTooltip (showTooltip)
-// {
-// if (showTooltip)
-// {
-// var content = catalog.i18nc("@tooltip", "This quality profile is not available for you current material and nozzle configuration. Please change these to enable this quality profile")
-// base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, customisedSettings.height), content)
-// }
-// else
-// {
-// base.hideTooltip()
-// }
-// }
-//
-// id: unavailableLineToolTip
-// height: 20 * screenScaleFactor // hovered area height
-// z: parent.z + 1 // should be higher, otherwise the area can be hovered
-// x: 0
-// anchors.verticalCenter: qualitySlider.verticalCenter
-//
-// Rectangle
-// {
-// id: leftArea
-// width:
-// {
-// if (qualityModel.availableTotalTicks == 0)
-// {
-// return qualityModel.qualitySliderStepWidth * qualityModel.totalTicks
-// }
-// return qualityModel.qualitySliderStepWidth * qualityModel.qualitySliderAvailableMin - 10
-// }
-// height: parent.height
-// color: "transparent"
-//
-// MouseArea
-// {
-// anchors.fill: parent
-// hoverEnabled: true
-// enabled: Cura.SimpleModeSettingsManager.isProfileUserCreated == false
-// onEntered: unavailableLineToolTip.showTooltip(true)
-// onExited: unavailableLineToolTip.showTooltip(false)
-// }
-// }
-//
-// Item
-// {
-// id: rightArea
-// width:
-// {
-// if(qualityModel.availableTotalTicks == 0)
-// return 0
-//
-// return qualityModel.qualitySliderMarginRight - 10
-// }
-// height: parent.height
-// x:
-// {
-// if (qualityModel.availableTotalTicks == 0)
-// {
-// return 0
-// }
-//
-// var leftUnavailableArea = qualityModel.qualitySliderStepWidth * qualityModel.qualitySliderAvailableMin
-// var totalGap = qualityModel.qualitySliderStepWidth * (qualityModel.availableTotalTicks -1) + leftUnavailableArea + 10
-//
-// return totalGap
-// }
-//
-// MouseArea
-// {
-// anchors.fill: parent
-// hoverEnabled: true
-// enabled: Cura.SimpleModeSettingsManager.isProfileUserCreated == false
-// onEntered: unavailableLineToolTip.showTooltip(true)
-// onExited: unavailableLineToolTip.showTooltip(false)
-// }
-// }
-// }
-
- // Draw Unavailable line
- Rectangle
- {
- id: groovechildrect
- width: parent.width
- height: 2 * screenScaleFactor
- color: UM.Theme.getColor("quality_slider_unavailable")
- anchors.verticalCenter: qualitySlider.verticalCenter
-
- // Draw ticks
- Repeater
- {
- id: qualityRepeater
- model: qualityModel.totalTicks > 0 ? qualityModel : 0
-
- Rectangle
- {
- color: Cura.QualityProfilesDropDownMenuModel.getItem(index).available ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- implicitWidth: 4 * screenScaleFactor
- implicitHeight: implicitWidth
- anchors.verticalCenter: parent.verticalCenter
- x: Math.round(qualityModel.qualitySliderStepWidth * index)
- radius: Math.round(implicitWidth / 2)
- }
- }
- }
-
- // Draw available slider
- Slider
- {
- id: qualitySlider
- height: UM.Theme.getSize("thick_margin").height
- anchors.bottom: parent.bottom
- enabled: qualityModel.totalTicks > 0 && !Cura.SimpleModeSettingsManager.isProfileCustomized
- visible: qualityModel.availableTotalTicks > 0
- updateValueWhileDragging : false
-
- minimumValue: qualityModel.qualitySliderAvailableMin >= 0 ? qualityModel.qualitySliderAvailableMin : 0
- // maximumValue must be greater than minimumValue to be able to see the handle. While the value is strictly
- // speaking not always correct, it seems to have the correct behavior (switching from 0 available to 1 available)
- maximumValue: qualityModel.qualitySliderAvailableMax >= 1 ? qualityModel.qualitySliderAvailableMax : 1
- stepSize: 1
-
- value: qualityModel.qualitySliderActiveIndex
-
- width: qualityModel.qualitySliderStepWidth * (qualityModel.availableTotalTicks - 1)
-
- anchors.right: parent.right
- anchors.rightMargin: qualityModel.qualitySliderMarginRight
-
- style: SliderStyle
- {
- //Draw Available line
- groove: Rectangle
- {
- implicitHeight: 2 * screenScaleFactor
- color: UM.Theme.getColor("quality_slider_available")
- radius: Math.round(height / 2)
- }
-
- handle: Rectangle
- {
- id: qualityhandleButton
- color: UM.Theme.getColor("quality_slider_available")
- implicitWidth: 12 * screenScaleFactor
- implicitHeight: implicitWidth
- radius: Math.round(implicitWidth / 2)
- visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile
- }
- }
-
- onValueChanged:
- {
- // only change if an active machine is set and the slider is visible at all.
- if (Cura.MachineManager.activeMachine != null && visible)
- {
- // prevent updating during view initializing. Trigger only if the value changed by user
- if (qualitySlider.value != qualityModel.qualitySliderActiveIndex && qualityModel.qualitySliderActiveIndex != -1)
- {
- // start updating with short delay
- qualitySliderChangeTimer.start()
- }
- }
- }
- }
-
- MouseArea
- {
- id: speedSliderMouseArea
- anchors.fill: parent
- hoverEnabled: true
- enabled: Cura.SimpleModeSettingsManager.isProfileUserCreated
-
- onEntered:
- {
- var content = catalog.i18nc("@tooltip", "A custom profile is currently active. To enable the quality slider, choose a default quality profile in Custom tab")
- base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, customisedSettings.height), content)
- }
- onExited: base.hideTooltip()
- }
- }
-
- UM.SimpleButton
- {
- id: customisedSettings
-
- visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
- height: Math.round(speedSlider.height * 0.8)
- width: Math.round(speedSlider.height * 0.8)
-
- anchors.verticalCenter: speedSlider.verticalCenter
- anchors.right: speedSlider.left
- anchors.rightMargin: Math.round(UM.Theme.getSize("thick_margin").width / 2)
-
- color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
- iconSource: UM.Theme.getIcon("reset");
-
- onClicked:
- {
- // if the current profile is user-created, switch to a built-in quality
- Cura.MachineManager.resetToUseDefaultQuality()
- }
- onEntered:
- {
- var content = catalog.i18nc("@tooltip","You have modified some profile settings. If you want to change these go to custom mode.")
- base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("thick_margin").width, customisedSettings.height), content)
- }
- onExited: base.hideTooltip()
- }
- }
-
- //
- // Infill
- //
- Item
- {
- anchors.left: parent.left
- anchors.right: parent.right
- height: childrenRect.height
-
- Cura.IconWithText
- {
- id: infillRowTitle
- source: UM.Theme.getIcon("category_infill")
- text: catalog.i18nc("@label", "Infill") + " (%)"
- anchors.bottom: parent.bottom
- width: labelColumnWidth
- }
-
- Item
- {
- id: infillCellRight
-
- height: infillSlider.height + UM.Theme.getSize("thick_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("thick_margin").height)
-
- anchors.left: infillRowTitle.right
- anchors.right: parent.right
-
- Label
- {
- id: selectedInfillRateText
-
- anchors.left: infillSlider.left
- anchors.right: parent.right
-
- text: parseInt(infillDensity.properties.value) + "%"
- horizontalAlignment: Text.AlignLeft
-
- color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- }
-
- // We use a binding to make sure that after manually setting infillSlider.value it is still bound to the property provider
- Binding
- {
- target: infillSlider
- property: "value"
- value: parseInt(infillDensity.properties.value)
- }
-
- Slider
- {
- id: infillSlider
-
- anchors.top: selectedInfillRateText.bottom
- anchors.left: parent.left
- anchors.right: infillIcon.left
- anchors.rightMargin: UM.Theme.getSize("thick_margin").width
-
- height: UM.Theme.getSize("thick_margin").height
- width: parseInt(infillCellRight.width - UM.Theme.getSize("thick_margin").width - style.handleWidth)
-
- minimumValue: 0
- maximumValue: 100
- stepSize: 1
- tickmarksEnabled: true
-
- // disable slider when gradual support is enabled
- enabled: parseInt(infillSteps.properties.value) == 0
-
- // set initial value from stack
- value: parseInt(infillDensity.properties.value)
-
- onValueChanged:
- {
-
- // Don't round the value if it's already the same
- if (parseInt(infillDensity.properties.value) == infillSlider.value)
- {
- return
- }
-
- // Round the slider value to the nearest multiple of 10 (simulate step size of 10)
- var roundedSliderValue = Math.round(infillSlider.value / 10) * 10
-
- // Update the slider value to represent the rounded value
- infillSlider.value = roundedSliderValue
-
- // Update value only if the Recomended mode is Active,
- // Otherwise if I change the value in the Custom mode the Recomended view will try to repeat
- // same operation
- var active_mode = UM.Preferences.getValue("cura/active_mode")
-
- if (active_mode == 0 || active_mode == "simple")
- {
- Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
- Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
- }
- }
-
- style: SliderStyle
- {
- groove: Rectangle
- {
- id: groove
- implicitWidth: 200 * screenScaleFactor
- implicitHeight: 2 * screenScaleFactor
- color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- radius: 1
- }
-
- handle: Item
- {
- Rectangle
- {
- id: handleButton
- anchors.centerIn: parent
- color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- implicitWidth: 10 * screenScaleFactor
- implicitHeight: 10 * screenScaleFactor
- radius: 10 * screenScaleFactor
- }
- }
-
- tickmarks: Repeater
- {
- id: repeater
- model: control.maximumValue / control.stepSize + 1
-
- // check if a tick should be shown based on it's index and wether the infill density is a multiple of 10 (slider step size)
- function shouldShowTick (index)
- {
- if (index % 10 == 0)
- {
- return true
- }
- return false
- }
-
- Rectangle
- {
- anchors.verticalCenter: parent.verticalCenter
- color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
- width: 1 * screenScaleFactor
- height: 6 * screenScaleFactor
- x: Math.round(styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count-1)))
- visible: shouldShowTick(index)
- }
- }
- }
- }
-
- Rectangle
- {
- id: infillIcon
-
- width: Math.round((parent.width / 5) - (UM.Theme.getSize("thick_margin").width))
- height: width
-
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 2)
-
- // we loop over all density icons and only show the one that has the current density and steps
- Repeater
- {
- id: infillIconList
- model: infillModel
- anchors.fill: parent
-
- function activeIndex ()
- {
- for (var i = 0; i < infillModel.count; i++)
- {
- var density = Math.round(infillDensity.properties.value)
- var steps = Math.round(infillSteps.properties.value)
- var infillModelItem = infillModel.get(i)
-
- if (infillModelItem != "undefined"
- && density >= infillModelItem.percentageMin
- && density <= infillModelItem.percentageMax
- && steps >= infillModelItem.stepsMin
- && steps <= infillModelItem.stepsMax)
- {
- return i
- }
- }
- return -1
- }
-
- Rectangle
- {
- anchors.fill: parent
- visible: infillIconList.activeIndex() == index
-
- border.width: UM.Theme.getSize("default_lining").width
- border.color: UM.Theme.getColor("quality_slider_unavailable")
-
- UM.RecolorImage
- {
- anchors.fill: parent
- anchors.margins: 2 * screenScaleFactor
- sourceSize.width: width
- sourceSize.height: width
- source: UM.Theme.getIcon(model.icon)
- color: UM.Theme.getColor("quality_slider_unavailable")
- }
- }
- }
- }
-
- // Gradual Support Infill Checkbox
- CheckBox
- {
- id: enableGradualInfillCheckBox
- property alias _hovered: enableGradualInfillMouseArea.containsMouse
-
- anchors.top: infillSlider.bottom
- anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 2) // closer to slider since it belongs to the same category
- anchors.left: infillCellRight.left
-
- style: UM.Theme.styles.checkbox
- enabled: base.settingsEnabled
- visible: infillSteps.properties.enabled == "True"
- checked: parseInt(infillSteps.properties.value) > 0
-
- MouseArea
- {
- id: enableGradualInfillMouseArea
-
- anchors.fill: parent
- hoverEnabled: true
- enabled: true
-
- property var previousInfillDensity: parseInt(infillDensity.properties.value)
-
- onClicked:
- {
- // Set to 90% only when enabling gradual infill
- var newInfillDensity;
- if (parseInt(infillSteps.properties.value) == 0)
- {
- previousInfillDensity = parseInt(infillDensity.properties.value)
- newInfillDensity = 90
- } else {
- newInfillDensity = previousInfillDensity
- }
- Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", String(newInfillDensity))
-
- var infill_steps_value = 0
- if (parseInt(infillSteps.properties.value) == 0)
- {
- infill_steps_value = 5
- }
-
- Cura.MachineManager.setSettingForAllExtruders("gradual_infill_steps", "value", infill_steps_value)
- }
-
- onEntered: base.showTooltip(enableGradualInfillCheckBox, Qt.point(-infillCellRight.x, 0),
- catalog.i18nc("@label", "Gradual infill will gradually increase the amount of infill towards the top."))
-
- onExited: base.hideTooltip()
-
- }
-
- Label
- {
- id: gradualInfillLabel
- height: parent.height
- anchors.left: enableGradualInfillCheckBox.right
- anchors.leftMargin: Math.round(UM.Theme.getSize("thick_margin").width / 2)
- verticalAlignment: Text.AlignVCenter;
- text: catalog.i18nc("@label", "Enable gradual")
- font: UM.Theme.getFont("default")
- color: UM.Theme.getColor("text")
- }
- }
-
- // Infill list model for mapping icon
- ListModel
- {
- id: infillModel
- Component.onCompleted:
- {
- infillModel.append({
- percentageMin: -1,
- percentageMax: 0,
- stepsMin: -1,
- stepsMax: 0,
- icon: "hollow"
- })
- infillModel.append({
- percentageMin: 0,
- percentageMax: 40,
- stepsMin: -1,
- stepsMax: 0,
- icon: "sparse"
- })
- infillModel.append({
- percentageMin: 40,
- percentageMax: 89,
- stepsMin: -1,
- stepsMax: 0,
- icon: "dense"
- })
- infillModel.append({
- percentageMin: 90,
- percentageMax: 9999999999,
- stepsMin: -1,
- stepsMax: 0,
- icon: "solid"
- })
- infillModel.append({
- percentageMin: 0,
- percentageMax: 9999999999,
- stepsMin: 1,
- stepsMax: 9999999999,
- icon: "gradual"
- })
- }
- }
- }
- }
-
- //
- // Enable support
- //
- Row
- {
- anchors.left: parent.left
- anchors.right: parent.right
- height: childrenRect.height
-
- Cura.IconWithText
- {
- id: enableSupportLabel
- visible: enableSupportCheckBox.visible
- source: UM.Theme.getIcon("category_support")
- text: catalog.i18nc("@label", "Support")
- width: labelColumnWidth
- }
-
- CheckBox
- {
- id: enableSupportCheckBox
- property alias _hovered: enableSupportMouseArea.containsMouse
-
- style: UM.Theme.styles.checkbox
- enabled: base.settingsEnabled
-
- visible: supportEnabled.properties.enabled == "True"
- checked: supportEnabled.properties.value == "True"
-
- MouseArea
- {
- id: enableSupportMouseArea
- anchors.fill: parent
- hoverEnabled: true
- onClicked: supportEnabled.setPropertyValue("value", supportEnabled.properties.value != "True")
-
- onEntered: base.showTooltip(enableSupportCheckBox, Qt.point(-enableSupportCheckBox.x, 0),
- catalog.i18nc("@label", "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing."))
-
- onExited: base.hideTooltip()
-
- }
- }
-
- ComboBox
- {
- id: supportExtruderCombobox
- visible: enableSupportCheckBox.visible && (supportEnabled.properties.value == "True") && (extrudersEnabledCount.properties.value > 1)
- model: extruderModel
-
- property string color_override: "" // for manually setting values
- property string color: // is evaluated automatically, but the first time is before extruderModel being filled
- {
- var current_extruder = extruderModel.get(currentIndex);
- color_override = "";
- if (current_extruder === undefined) return ""
- return (current_extruder.color) ? current_extruder.color : "";
- }
-
- textRole: "text" // this solves that the combobox isn't populated in the first time Cura is started
-
- width: Math.round(UM.Theme.getSize("print_setup_widget").width * .55) - Math.round(UM.Theme.getSize("thick_margin").width / 2) - enableSupportCheckBox.width
- height: ((supportEnabled.properties.value == "True") && (machineExtruderCount.properties.value > 1)) ? UM.Theme.getSize("setting_control").height : 0
-
- Behavior on height { NumberAnimation { duration: 100 } }
-
- style: UM.Theme.styles.combobox_color
- enabled: base.settingsEnabled
- property alias _hovered: supportExtruderMouseArea.containsMouse
-
- currentIndex:
- {
- if (supportExtruderNr.properties == null)
- {
- return Cura.MachineManager.defaultExtruderPosition
- }
- else
- {
- var extruder = parseInt(supportExtruderNr.properties.value)
- if ( extruder === -1)
- {
- return Cura.MachineManager.defaultExtruderPosition
- }
- return extruder;
- }
- }
-
- onActivated: supportExtruderNr.setPropertyValue("value", String(index))
-
- MouseArea
- {
- id: supportExtruderMouseArea
- anchors.fill: parent
- hoverEnabled: true
- enabled: base.settingsEnabled
- acceptedButtons: Qt.NoButton
- onEntered:
- {
- base.showTooltip(supportExtruderCombobox, Qt.point(-supportExtruderCombobox.x, 0),
- catalog.i18nc("@label", "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air."));
- }
- onExited: base.hideTooltip()
-
- }
-
- function updateCurrentColor()
- {
- var current_extruder = extruderModel.get(currentIndex)
- if (current_extruder !== undefined)
- {
- supportExtruderCombobox.color_override = current_extruder.color
- }
- }
-
- }
- }
-
- // Adhesion
- Row
- {
- anchors.left: parent.left
- anchors.right: parent.right
- height: childrenRect.height
-
- Cura.IconWithText
- {
- id: adhesionHelperLabel
- visible: adhesionCheckBox.visible
- source: UM.Theme.getIcon("category_adhesion")
- text: catalog.i18nc("@label", "Adhesion")
- width: labelColumnWidth
- }
-
- CheckBox
- {
- id: adhesionCheckBox
- property alias _hovered: adhesionMouseArea.containsMouse
-
- //: Setting enable printing build-plate adhesion helper checkbox
- style: UM.Theme.styles.checkbox
- enabled: base.settingsEnabled
-
- visible: platformAdhesionType.properties.enabled == "True"
- checked: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none"
-
- MouseArea
- {
- id: adhesionMouseArea
- anchors.fill: parent
- hoverEnabled: true
- enabled: base.settingsEnabled
- onClicked:
- {
- var adhesionType = "skirt"
- if(!parent.checked)
- {
- // Remove the "user" setting to see if the rest of the stack prescribes a brim or a raft
- platformAdhesionType.removeFromContainer(0)
- adhesionType = platformAdhesionType.properties.value
- if(adhesionType == "skirt" || adhesionType == "none")
- {
- // If the rest of the stack doesn't prescribe an adhesion-type, default to a brim
- adhesionType = "brim"
- }
- }
- platformAdhesionType.setPropertyValue("value", adhesionType)
- }
- onEntered:
- {
- base.showTooltip(adhesionCheckBox, Qt.point(-adhesionCheckBox.x, 0),
- catalog.i18nc("@label", "Enable printing a brim or raft. This will add a flat area around or under your object which is easy to cut off afterwards."));
- }
- onExited: base.hideTooltip()
- }
- }
- }
-
- ListModel
- {
- id: extruderModel
- Component.onCompleted: populateExtruderModel()
- }
-
- //: Model used to populate the extrudelModel
- Cura.ExtrudersModel
- {
- id: extruders
- onModelChanged: populateExtruderModel()
- }
-
- UM.SettingPropertyProvider
- {
- id: infillExtruderNumber
- containerStackId: Cura.MachineManager.activeStackId
- key: "infill_extruder_nr"
- watchedProperties: [ "value" ]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: infillDensity
- containerStackId: Cura.MachineManager.activeStackId
- key: "infill_sparse_density"
- watchedProperties: [ "value" ]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: infillSteps
- containerStackId: Cura.MachineManager.activeStackId
- key: "gradual_infill_steps"
- watchedProperties: ["value", "enabled"]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: platformAdhesionType
- containerStack: Cura.MachineManager.activeMachine
- removeUnusedValue: false //Doesn't work with settings that are resolved.
- key: "adhesion_type"
- watchedProperties: [ "value", "enabled" ]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: supportEnabled
- containerStack: Cura.MachineManager.activeMachine
- key: "support_enable"
- watchedProperties: [ "value", "enabled", "description" ]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: extrudersEnabledCount
- containerStack: Cura.MachineManager.activeMachine
- key: "extruders_enabled_count"
- watchedProperties: [ "value" ]
- storeIndex: 0
- }
-
- UM.SettingPropertyProvider
- {
- id: supportExtruderNr
- containerStack: Cura.MachineManager.activeMachine
- key: "support_extruder_nr"
- watchedProperties: [ "value" ]
- storeIndex: 0
- }
-
- function populateExtruderModel()
- {
- extruderModel.clear()
- for (var extruderNumber = 0; extruderNumber < extruders.rowCount(); extruderNumber++)
- {
- extruderModel.append({
- text: extruders.getItem(extruderNumber).name,
- color: extruders.getItem(extruderNumber).color
- })
- }
- supportExtruderCombobox.updateCurrentColor()
- }
-}
diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml
index 28a64f3346..2c42d222ce 100644
--- a/resources/qml/Settings/SettingView.qml
+++ b/resources/qml/Settings/SettingView.qml
@@ -13,13 +13,11 @@ import "../Menus"
Item
{
- id: base;
+ id: settingsView
property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel()
property Action configureSettings
property bool findingSettings
- signal showTooltip(Item item, point location, string text)
- signal hideTooltip()
ToolButton
{
@@ -371,7 +369,7 @@ Item
contextMenu.provider = provider
contextMenu.popup();
}
- onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: Math.round(delegate.height / 2) }, text)
+ onShowTooltip: base.showTooltip(delegate, Qt.point(- UM.Theme.getSize("default_arrow").width, 0), text)
onHideTooltip: base.hideTooltip()
onShowAllHiddenInheritedSettings:
{
diff --git a/resources/qml/qmldir b/resources/qml/qmldir
index 6db8e0c544..4dc9a34894 100644
--- a/resources/qml/qmldir
+++ b/resources/qml/qmldir
@@ -14,4 +14,6 @@ OutputDevicesActionButton 1.0 OutputDevicesActionButton.qml
ExpandableComponent 1.0 ExpandableComponent.qml
PrinterTypeLabel 1.0 PrinterTypeLabel.qml
ViewsSelector 1.0 ViewsSelector.qml
-ToolbarButton 1.0 ToolbarButton.qml
\ No newline at end of file
+ToolbarButton 1.0 ToolbarButton.qml
+SettingView 1.0 SettingView.qml
+ProfileMenu 1.0 ProfileMenu.qml
\ No newline at end of file
diff --git a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg
index e08fa27dc9..4d585b54c1 100644
--- a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg
@@ -10,6 +10,7 @@ quality_type = normal
weight = 0
material = generic_pc
variant = AA 0.25
+is_experimental = True
[values]
acceleration_enabled = True
diff --git a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg
index 6e9bbdce27..bee345e302 100644
--- a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg
@@ -10,6 +10,7 @@ quality_type = normal
weight = 0
material = generic_pp
variant = AA 0.25
+is_experimental = True
[values]
acceleration_enabled = True
diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg
index 73df9637f7..fc4acf3cb0 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = draft
weight = -2
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg
index d59bfe7cea..36b3ef603f 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = superdraft
weight = -4
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg
index 368317019f..14e08cb14d 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = verydraft
weight = -3
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg
index 5b81532977..c2bb6d4988 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = draft
weight = 0
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg
index 317b89ea85..e815b673d1 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = superdraft
weight = -2
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg
index 2fd6bd7609..c50cee576d 100644
--- a/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg
+++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = verydraft
weight = -1
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg
index 55d53c6c71..53c319d6e6 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg
@@ -10,6 +10,7 @@ quality_type = normal
weight = 0
material = generic_pc
variant = AA 0.25
+is_experimental = True
[values]
acceleration_enabled = True
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg
index c925845dc1..b4d34cc392 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg
@@ -10,6 +10,7 @@ quality_type = normal
weight = 0
material = generic_pp
variant = AA 0.25
+is_experimental = True
[values]
acceleration_enabled = True
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Fast_Print.inst.cfg
index e78006689b..4bdd09e9b3 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Fast_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = draft
weight = -2
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Superdraft_Print.inst.cfg
index c6d0962157..f9b6b0c7a6 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Superdraft_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Superdraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = superdraft
weight = -4
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Verydraft_Print.inst.cfg
index b80f773594..9c6c7de7f0 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Verydraft_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPEP_Verydraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = verydraft
weight = -3
material = generic_cpe_plus
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Fast_Print.inst.cfg
index 0ed4e3d994..c24aa9a98d 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Fast_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = draft
weight = 0
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Superdraft_Print.inst.cfg
index 53bf1d3107..5fc306b1f1 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Superdraft_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Superdraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = superdraft
weight = -2
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Verydraft_Print.inst.cfg
index d9c45c2634..996adf5be7 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Verydraft_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PC_Verydraft_Print.inst.cfg
@@ -10,6 +10,7 @@ quality_type = verydraft
weight = -1
material = generic_pc
variant = AA 0.8
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_CPEP_Fast_Print.inst.cfg
index 3e74390840..4098c86ad9 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_CPEP_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_CPEP_Fast_Print.inst.cfg
@@ -11,6 +11,7 @@ weight = -2
material = generic_cpe_plus
variant = AA 0.8
buildplate = Aluminum
+is_experimental = True
[values]
brim_width = 14
diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_PC_Fast_Print.inst.cfg
index 747e2fe8a5..6fdd22c6b0 100644
--- a/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_PC_Fast_Print.inst.cfg
+++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_aluminum_PC_Fast_Print.inst.cfg
@@ -11,6 +11,7 @@ weight = 0
material = generic_pc
variant = AA 0.8
buildplate = Aluminum
+is_experimental = True
[values]
brim_width = 10
diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml
index e040d91df9..e6144bb6ec 100755
--- a/resources/themes/cura-light/styles.qml
+++ b/resources/themes/cura-light/styles.qml
@@ -38,6 +38,7 @@ QtObject
}
}
+ radius: UM.Theme.getSize("setting_control_radius").width
border.width: Theme.getSize("default_lining").width
border.color:
{
@@ -413,11 +414,11 @@ QtObject
border.width: Theme.getSize("default_lining").width;
border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border");
+ radius: UM.Theme.getSize("setting_control_radius").width
}
label: Item
{
-
Label
{
anchors.left: parent.left
@@ -465,11 +466,11 @@ QtObject
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : control._hovered ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control")
border.width: UM.Theme.getSize("default_lining").width
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : control._hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
+ radius: UM.Theme.getSize("setting_control_radius").width
}
label: Item
{
-
Label
{
anchors.left: parent.left
@@ -486,17 +487,18 @@ QtObject
verticalAlignment: Text.AlignVCenter
}
- Rectangle
+ UM.RecolorImage
{
id: swatch
- height: Math.round(UM.Theme.getSize("setting_control").height / 2)
+ height: Math.round(control.height / 2)
width: height
anchors.right: downArrow.left
anchors.verticalCenter: parent.verticalCenter
- anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
- radius: Math.round(width / 2)
- border.width: UM.Theme.getSize("default_lining").width
- border.color: UM.Theme.getColor("lining")
+ anchors.rightMargin: UM.Theme.getSize("default_margin").width
+// anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
+ sourceSize.width: width
+ sourceSize.height: height
+ source: UM.Theme.getIcon("extruder_button")
color: (control.color_override !== "") ? control.color_override : control.color
}
@@ -532,7 +534,7 @@ QtObject
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox")
Behavior on color { ColorAnimation { duration: 50; } }
- radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
+ radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
border.width: Theme.getSize("default_lining").width
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border")
@@ -557,6 +559,7 @@ QtObject
color: Theme.getColor("checkbox_text")
font: Theme.getFont("default")
elide: Text.ElideRight
+ renderType: Text.NativeRendering
}
}
}
@@ -574,7 +577,7 @@ QtObject
color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_hover") : Theme.getColor("checkbox");
Behavior on color { ColorAnimation { duration: 50; } }
- radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : 0
+ radius: control.exclusiveGroup ? Math.round(Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width
border.width: Theme.getSize("default_lining").width;
border.color: (control.hovered || control._hovered) ? Theme.getColor("checkbox_border_hover") : Theme.getColor("checkbox_border");
@@ -627,6 +630,7 @@ QtObject
border.width: Theme.getSize("default_lining").width;
border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border");
+ radius: UM.Theme.getSize("setting_control_radius").width
color: Theme.getColor("setting_validation_ok");
diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json
index 4e39ffdf22..2c5c7a360a 100644
--- a/resources/themes/cura-light/theme.json
+++ b/resources/themes/cura-light/theme.json
@@ -206,11 +206,11 @@
"setting_control": [255, 255, 255, 255],
"setting_control_selected": [31, 36, 39, 255],
"setting_control_highlight": [255, 255, 255, 255],
- "setting_control_border": [127, 127, 127, 255],
+ "setting_control_border": [199, 199, 199, 255],
"setting_control_border_highlight": [50, 130, 255, 255],
- "setting_control_text": [27, 27, 27, 255],
- "setting_control_depth_line": [127, 127, 127, 255],
- "setting_control_button": [127, 127, 127, 255],
+ "setting_control_text": [35, 35, 35, 255],
+ "setting_control_depth_line": [199, 199, 199, 255],
+ "setting_control_button": [199, 199, 199, 255],
"setting_control_button_hover": [70, 84, 113, 255],
"setting_control_disabled": [245, 245, 245, 255],
"setting_control_disabled_text": [127, 127, 127, 255],
@@ -239,10 +239,10 @@
"checkbox": [255, 255, 255, 255],
"checkbox_hover": [255, 255, 255, 255],
- "checkbox_border": [64, 69, 72, 255],
+ "checkbox_border": [199, 199, 199, 255],
"checkbox_border_hover": [50, 130, 255, 255],
- "checkbox_mark": [119, 122, 124, 255],
- "checkbox_text": [27, 27, 27, 255],
+ "checkbox_mark": [50, 130, 255, 255],
+ "checkbox_text": [35, 35, 35, 255],
"tooltip": [68, 192, 255, 255],
"tooltip_text": [255, 255, 255, 255],
@@ -374,6 +374,11 @@
"print_setup_item": [0.0, 2.0],
"print_setup_extruder_box": [0.0, 6.0],
"print_setup_widget_header": [0.0, 3.0],
+ "print_setup_slider_groove": [0.16, 0.16],
+ "print_setup_slider_handle": [1.0, 1.0],
+ "print_setup_slider_tickmarks": [0.32, 0.32],
+ "print_setup_big_dropdown": [28, 2.5],
+ "print_setup_icon": [1.2, 1.2],
"configuration_selector_mode_tabs": [0.0, 3.0],
@@ -412,6 +417,7 @@
"setting": [25.0, 1.8],
"setting_control": [10.0, 2.0],
+ "setting_control_radius": [0.15, 0.15],
"setting_control_depth_margin": [1.4, 0.0],
"setting_preferences_button_margin": [4, 0.0],
"setting_control_margin": [0.0, 0.0],
@@ -456,7 +462,8 @@
"layerview_row": [11.0, 1.5],
"layerview_row_spacing": [0.0, 0.5],
- "checkbox": [2.0, 2.0],
+ "checkbox": [1.5, 1.5],
+ "checkbox_radius": [0.08, 0.08],
"tooltip": [20.0, 10.0],
"tooltip_margins": [1.0, 1.0],
@@ -522,9 +529,6 @@
"monitor_thick_lining": [0.16, 0.16],
"monitor_corner_radius": [0.3, 0.3],
"monitor_shadow_radius": [0.4, 0.4],
- "monitor_shadow_offset": [0.15, 0.15],
-
- "print_setup_action_button": [13, 5],
- "print_setup_content_top_margin": [3, 3]
+ "monitor_shadow_offset": [0.15, 0.15]
}
}