mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Merge branch '4.0'
This commit is contained in:
commit
a36aa3f17b
3 changed files with 62 additions and 8 deletions
|
@ -68,11 +68,14 @@ class GlobalStack(CuraContainerStack):
|
||||||
def getLoadingPriority(cls) -> int:
|
def getLoadingPriority(cls) -> int:
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# The configured connection types can be used to find out if the global stack is configured to be connected with
|
## The configured connection types can be used to find out if the global
|
||||||
# a printer, without having to know all the details as to how this is exactly done (and without actually setting
|
# stack is configured to be connected with a printer, without having to
|
||||||
# the stack to be active). This data can then in turn also be used when the global stack is active; If we can't
|
# know all the details as to how this is exactly done (and without
|
||||||
# get a network connection, but it is configured to have one, we can display a different icon to indicate the
|
# actually setting the stack to be active).
|
||||||
# difference.
|
#
|
||||||
|
# This data can then in turn also be used when the global stack is active;
|
||||||
|
# If we can't get a network connection, but it is configured to have one,
|
||||||
|
# we can display a different icon to indicate the difference.
|
||||||
@pyqtProperty("QVariantList", notify=configuredConnectionTypesChanged)
|
@pyqtProperty("QVariantList", notify=configuredConnectionTypesChanged)
|
||||||
def configuredConnectionTypes(self):
|
def configuredConnectionTypes(self):
|
||||||
# Requesting it from the metadata actually gets them as strings (as that's what you get from serializing).
|
# Requesting it from the metadata actually gets them as strings (as that's what you get from serializing).
|
||||||
|
@ -80,7 +83,7 @@ class GlobalStack(CuraContainerStack):
|
||||||
connection_types = self.getMetaDataEntry("connection_type", "").split(",")
|
connection_types = self.getMetaDataEntry("connection_type", "").split(",")
|
||||||
return [int(connection_type) for connection_type in connection_types if connection_type != ""]
|
return [int(connection_type) for connection_type in connection_types if connection_type != ""]
|
||||||
|
|
||||||
# \sa configuredConnectionTypes
|
## \sa configuredConnectionTypes
|
||||||
def addConfiguredConnectionType(self, connection_type):
|
def addConfiguredConnectionType(self, connection_type):
|
||||||
configured_connection_types = self.configuredConnectionTypes
|
configured_connection_types = self.configuredConnectionTypes
|
||||||
if connection_type not in configured_connection_types:
|
if connection_type not in configured_connection_types:
|
||||||
|
@ -88,7 +91,7 @@ class GlobalStack(CuraContainerStack):
|
||||||
configured_connection_types.append(str(connection_type))
|
configured_connection_types.append(str(connection_type))
|
||||||
self.setMetaDataEntry("connection_type", ",".join(configured_connection_types))
|
self.setMetaDataEntry("connection_type", ",".join(configured_connection_types))
|
||||||
|
|
||||||
# \sa configuredConnectionTypes
|
## \sa configuredConnectionTypes
|
||||||
def removeConfiguredConnectionType(self, connection_type):
|
def removeConfiguredConnectionType(self, connection_type):
|
||||||
configured_connection_types = self.configuredConnectionTypes
|
configured_connection_types = self.configuredConnectionTypes
|
||||||
if connection_type in self.configured_connection_types:
|
if connection_type in self.configured_connection_types:
|
||||||
|
|
|
@ -288,6 +288,57 @@ Item
|
||||||
menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }
|
menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
height: UM.Theme.getSize("print_setup_big_item").height
|
||||||
|
visible: buildplateCompatibilityError || buildplateCompatibilityWarning
|
||||||
|
|
||||||
|
property bool buildplateCompatibilityError: !Cura.MachineManager.variantBuildplateCompatible && !Cura.MachineManager.variantBuildplateUsable
|
||||||
|
property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable
|
||||||
|
|
||||||
|
// This is a space holder aligning the warning messages.
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: ""
|
||||||
|
width: selectors.textWidth
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
width: selectors.controlWidth
|
||||||
|
height: parent.height
|
||||||
|
|
||||||
|
UM.RecolorImage
|
||||||
|
{
|
||||||
|
id: warningImage
|
||||||
|
anchors.left: parent.left
|
||||||
|
source: UM.Theme.getIcon("warning")
|
||||||
|
width: UM.Theme.getSize("section_icon").width
|
||||||
|
height: UM.Theme.getSize("section_icon").height
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
color: UM.Theme.getColor("material_compatibility_warning")
|
||||||
|
visible: !Cura.MachineManager.isCurrentSetupSupported || buildplateCompatibilityError || buildplateCompatibilityWarning
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: materialCompatibilityLabel
|
||||||
|
anchors.left: warningImage.right
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width
|
||||||
|
text: catalog.i18nc("@label", "Use glue for better adhesion with this material combination.")
|
||||||
|
font: UM.Theme.getFont("very_small")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
visible: CuraSDKVersion == "dev" ? false : buildplateCompatibilityError || buildplateCompatibilityWarning
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@
|
||||||
"setting_validation_ok": [255, 255, 255, 255],
|
"setting_validation_ok": [255, 255, 255, 255],
|
||||||
"setting_filter_field" : [153, 153, 153, 255],
|
"setting_filter_field" : [153, 153, 153, 255],
|
||||||
|
|
||||||
"material_compatibility_warning": [0, 0, 0, 255],
|
"material_compatibility_warning": [243, 166, 59, 255],
|
||||||
|
|
||||||
"progressbar_background": [245, 245, 245, 255],
|
"progressbar_background": [245, 245, 245, 255],
|
||||||
"progressbar_control": [50, 130, 255, 255],
|
"progressbar_control": [50, 130, 255, 255],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue