mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 07:14:24 +08:00
Merge branch 'master' of github.com:Ultimaker/cura
This commit is contained in:
commit
a7e0d5147e
@ -125,6 +125,8 @@ class CuraApplication(QtApplication):
|
|||||||
# Cura will always show the Add Machine Dialog upon start.
|
# Cura will always show the Add Machine Dialog upon start.
|
||||||
stacksValidationFinished = pyqtSignal() # Emitted whenever a validation is finished
|
stacksValidationFinished = pyqtSignal() # Emitted whenever a validation is finished
|
||||||
|
|
||||||
|
projectFileLoaded = pyqtSignal(str) # Emitted whenever a project file is loaded
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# this list of dir names will be used by UM to detect an old cura directory
|
# this list of dir names will be used by UM to detect an old cura directory
|
||||||
for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]:
|
for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]:
|
||||||
@ -1365,8 +1367,9 @@ class CuraApplication(QtApplication):
|
|||||||
# Find node location
|
# Find node location
|
||||||
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(node, min_offset = min_offset)
|
||||||
|
|
||||||
|
# If a model is to small then it will not contain any points
|
||||||
if offset_shape_arr is None and hull_shape_arr is None:
|
if offset_shape_arr is None and hull_shape_arr is None:
|
||||||
Message(self._i18n_catalog.i18nc("@info:status","Could not load a model"),
|
Message(self._i18n_catalog.i18nc("@info:status", "The selected model was too small to load."),
|
||||||
title=self._i18n_catalog.i18nc("@info:title", "Warning")).show()
|
title=self._i18n_catalog.i18nc("@info:title", "Warning")).show()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -66,10 +66,11 @@ class PrintInformation(QObject):
|
|||||||
self._base_name = ""
|
self._base_name = ""
|
||||||
self._abbr_machine = ""
|
self._abbr_machine = ""
|
||||||
self._job_name = ""
|
self._job_name = ""
|
||||||
|
self._project_name = ""
|
||||||
|
|
||||||
Application.getInstance().globalContainerStackChanged.connect(self._updateJobName)
|
Application.getInstance().globalContainerStackChanged.connect(self._updateJobName)
|
||||||
Application.getInstance().fileLoaded.connect(self.setBaseName)
|
Application.getInstance().fileLoaded.connect(self.setBaseName)
|
||||||
|
Application.getInstance().projectFileLoaded.connect(self.setProjectName)
|
||||||
Preferences.getInstance().preferenceChanged.connect(self._onPreferencesChanged)
|
Preferences.getInstance().preferenceChanged.connect(self._onPreferencesChanged)
|
||||||
|
|
||||||
self._active_material_container = None
|
self._active_material_container = None
|
||||||
@ -78,7 +79,6 @@ class PrintInformation(QObject):
|
|||||||
|
|
||||||
self._material_amounts = []
|
self._material_amounts = []
|
||||||
|
|
||||||
|
|
||||||
# Crate cura message translations and using translation keys initialize empty time Duration object for total time
|
# Crate cura message translations and using translation keys initialize empty time Duration object for total time
|
||||||
# and time for each feature
|
# and time for each feature
|
||||||
def initializeCuraMessagePrintTimeProperties(self):
|
def initializeCuraMessagePrintTimeProperties(self):
|
||||||
@ -241,6 +241,11 @@ class PrintInformation(QObject):
|
|||||||
self._job_name = name
|
self._job_name = name
|
||||||
self.jobNameChanged.emit()
|
self.jobNameChanged.emit()
|
||||||
|
|
||||||
|
@pyqtSlot(str)
|
||||||
|
def setProjectName(self, name):
|
||||||
|
self._project_name = name
|
||||||
|
self.setJobName(name)
|
||||||
|
|
||||||
jobNameChanged = pyqtSignal()
|
jobNameChanged = pyqtSignal()
|
||||||
|
|
||||||
@pyqtProperty(str, notify = jobNameChanged)
|
@pyqtProperty(str, notify = jobNameChanged)
|
||||||
@ -248,6 +253,11 @@ class PrintInformation(QObject):
|
|||||||
return self._job_name
|
return self._job_name
|
||||||
|
|
||||||
def _updateJobName(self):
|
def _updateJobName(self):
|
||||||
|
# if the project name is set, we use the project name as the job name, so the job name should not get updated
|
||||||
|
# if a model file is loaded after that.
|
||||||
|
if self._project_name != "":
|
||||||
|
return
|
||||||
|
|
||||||
if self._base_name == "":
|
if self._base_name == "":
|
||||||
self._job_name = ""
|
self._job_name = ""
|
||||||
self.jobNameChanged.emit()
|
self.jobNameChanged.emit()
|
||||||
|
@ -43,13 +43,13 @@ class ShapeArray:
|
|||||||
transform_x = transform._data[0][3]
|
transform_x = transform._data[0][3]
|
||||||
transform_y = transform._data[2][3]
|
transform_y = transform._data[2][3]
|
||||||
hull_verts = node.callDecoration("getConvexHull")
|
hull_verts = node.callDecoration("getConvexHull")
|
||||||
|
|
||||||
if not hull_verts.getPoints().any(): # IF a model is to small then it will not contain any points
|
|
||||||
return None, None
|
|
||||||
|
|
||||||
# For one_at_a_time printing you need the convex hull head.
|
# For one_at_a_time printing you need the convex hull head.
|
||||||
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
|
hull_head_verts = node.callDecoration("getConvexHullHead") or hull_verts
|
||||||
|
|
||||||
|
# If a model is to small then it will not contain any points
|
||||||
|
if not hull_verts.getPoints().any():
|
||||||
|
return None, None
|
||||||
|
|
||||||
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
|
offset_verts = hull_head_verts.getMinkowskiHull(Polygon.approximatedCircle(min_offset))
|
||||||
offset_points = copy.deepcopy(offset_verts._points) # x, y
|
offset_points = copy.deepcopy(offset_verts._points) # x, y
|
||||||
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)
|
offset_points[:, 0] = numpy.add(offset_points[:, 0], -transform_x)
|
||||||
|
@ -26,6 +26,7 @@ from configparser import ConfigParser
|
|||||||
import zipfile
|
import zipfile
|
||||||
import io
|
import io
|
||||||
import configparser
|
import configparser
|
||||||
|
import os
|
||||||
|
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
@ -876,6 +877,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
nodes = self._3mf_mesh_reader.read(file_name)
|
nodes = self._3mf_mesh_reader.read(file_name)
|
||||||
if nodes is None:
|
if nodes is None:
|
||||||
nodes = []
|
nodes = []
|
||||||
|
|
||||||
|
base_file_name = os.path.basename(file_name)
|
||||||
|
if base_file_name.endswith(".curaproject.3mf"):
|
||||||
|
base_file_name = base_file_name[:base_file_name.rfind(".curaproject.3mf")]
|
||||||
|
Application.getInstance().projectFileLoaded.emit(base_file_name)
|
||||||
return nodes
|
return nodes
|
||||||
|
|
||||||
## HACK: Replaces the material container in the given stack with a newly created material container.
|
## HACK: Replaces the material container in the given stack with a newly created material container.
|
||||||
|
@ -20,6 +20,7 @@ Item {
|
|||||||
property color lowerHandleColor: "black"
|
property color lowerHandleColor: "black"
|
||||||
property color rangeHandleColor: "black"
|
property color rangeHandleColor: "black"
|
||||||
property real handleLabelWidth: width
|
property real handleLabelWidth: width
|
||||||
|
property var activeHandle: upperHandle
|
||||||
|
|
||||||
// track properties
|
// track properties
|
||||||
property real trackThickness: 4 // width of the slider track
|
property real trackThickness: 4 // width of the slider track
|
||||||
@ -60,6 +61,11 @@ Item {
|
|||||||
rangeHandle.height = lowerHandle.y - (upperHandle.y + upperHandle.height)
|
rangeHandle.height = lowerHandle.y - (upperHandle.y + upperHandle.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the active handle to show only one label at a time
|
||||||
|
function setActiveHandle (handle) {
|
||||||
|
activeHandle = handle
|
||||||
|
}
|
||||||
|
|
||||||
// slider track
|
// slider track
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: track
|
id: track
|
||||||
@ -98,6 +104,15 @@ Item {
|
|||||||
UM.LayerView.setMinimumLayer(lowerValue)
|
UM.LayerView.setMinimumLayer(lowerValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setValue (value) {
|
||||||
|
var range = sliderRoot.upperValue - sliderRoot.lowerValue
|
||||||
|
value = Math.min(value, sliderRoot.maximumValue)
|
||||||
|
value = Math.max(value, sliderRoot.minimumValue + range)
|
||||||
|
|
||||||
|
UM.LayerView.setCurrentLayer(value)
|
||||||
|
UM.LayerView.setMinimumLayer(value - range)
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: sliderRoot.trackThickness - 2 * sliderRoot.trackBorderWidth
|
width: sliderRoot.trackThickness - 2 * sliderRoot.trackBorderWidth
|
||||||
height: parent.height + sliderRoot.handleSize
|
height: parent.height + sliderRoot.handleSize
|
||||||
@ -116,6 +131,23 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPositionChanged: parent.onHandleDragged()
|
onPositionChanged: parent.onHandleDragged()
|
||||||
|
onPressed: sliderRoot.setActiveHandle(rangeHandle)
|
||||||
|
}
|
||||||
|
|
||||||
|
LayerSliderLabel {
|
||||||
|
id: rangleHandleLabel
|
||||||
|
|
||||||
|
height: sliderRoot.handleSize + UM.Theme.getSize("default_margin").height
|
||||||
|
x: parent.x - width - UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
target: Qt.point(sliderRoot.width, y + height / 2)
|
||||||
|
visible: sliderRoot.activeHandle == parent
|
||||||
|
|
||||||
|
// custom properties
|
||||||
|
maximumValue: sliderRoot.maximumValue
|
||||||
|
value: sliderRoot.upperValue
|
||||||
|
busy: UM.LayerView.busy
|
||||||
|
setValue: rangeHandle.setValue // connect callback functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,6 +210,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPositionChanged: parent.onHandleDragged()
|
onPositionChanged: parent.onHandleDragged()
|
||||||
|
onPressed: sliderRoot.setActiveHandle(upperHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerSliderLabel {
|
LayerSliderLabel {
|
||||||
@ -187,13 +220,13 @@ Item {
|
|||||||
x: parent.x - width - UM.Theme.getSize("default_margin").width
|
x: parent.x - width - UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
target: Qt.point(sliderRoot.width, y + height / 2)
|
target: Qt.point(sliderRoot.width, y + height / 2)
|
||||||
visible: sliderRoot.layersVisible
|
visible: sliderRoot.activeHandle == parent
|
||||||
|
|
||||||
// custom properties
|
// custom properties
|
||||||
maximumValue: sliderRoot.maximumValue
|
maximumValue: sliderRoot.maximumValue
|
||||||
value: sliderRoot.upperValue
|
value: sliderRoot.upperValue
|
||||||
busy: UM.LayerView.busy
|
busy: UM.LayerView.busy
|
||||||
setValue: sliderRoot.setUpperValue // connect callback functions
|
setValue: upperHandle.setValue // connect callback functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,6 +290,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPositionChanged: parent.onHandleDragged()
|
onPositionChanged: parent.onHandleDragged()
|
||||||
|
onPressed: sliderRoot.setActiveHandle(lowerHandle)
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerSliderLabel {
|
LayerSliderLabel {
|
||||||
@ -266,13 +300,13 @@ Item {
|
|||||||
x: parent.x - width - UM.Theme.getSize("default_margin").width
|
x: parent.x - width - UM.Theme.getSize("default_margin").width
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
target: Qt.point(sliderRoot.width, y + height / 2)
|
target: Qt.point(sliderRoot.width, y + height / 2)
|
||||||
visible: sliderRoot.layersVisible
|
visible: sliderRoot.activeHandle == parent
|
||||||
|
|
||||||
// custom properties
|
// custom properties
|
||||||
maximumValue: sliderRoot.maximumValue
|
maximumValue: sliderRoot.maximumValue
|
||||||
value: sliderRoot.lowerValue
|
value: sliderRoot.lowerValue
|
||||||
busy: UM.LayerView.busy
|
busy: UM.LayerView.busy
|
||||||
setValue: sliderRoot.setLowerValue // connect callback functions
|
setValue: lowerHandle.setValue // connect callback functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,16 @@ UM.PointingRectangle {
|
|||||||
arrowSize: UM.Theme.getSize("default_arrow").width
|
arrowSize: UM.Theme.getSize("default_arrow").width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: valueLabel.width + UM.Theme.getSize("default_margin").width
|
width: valueLabel.width + UM.Theme.getSize("default_margin").width
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
// make sure the text field is focussed when pressing the parent handle
|
||||||
|
// needed to connect the key bindings when switching active handle
|
||||||
|
onVisibleChanged: if (visible) valueLabel.forceActiveFocus()
|
||||||
|
|
||||||
color: UM.Theme.getColor("tool_panel_background")
|
color: UM.Theme.getColor("tool_panel_background")
|
||||||
borderColor: UM.Theme.getColor("lining")
|
borderColor: UM.Theme.getColor("lining")
|
||||||
borderWidth: UM.Theme.getSize("default_lining").width
|
borderWidth: UM.Theme.getSize("default_lining").width
|
||||||
|
|
||||||
visible: true
|
|
||||||
|
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 50
|
duration: 50
|
||||||
@ -53,6 +56,10 @@ UM.PointingRectangle {
|
|||||||
text: sliderLabelRoot.value + 1 // the current handle value, add 1 because layers is an array
|
text: sliderLabelRoot.value + 1 // the current handle value, add 1 because layers is an array
|
||||||
horizontalAlignment: TextInput.AlignRight
|
horizontalAlignment: TextInput.AlignRight
|
||||||
|
|
||||||
|
// key bindings, work when label is currenctly focused (active handle in LayerSlider)
|
||||||
|
Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||||
|
Keys.onDownPressed: sliderLabelRoot.setValue(sliderLabelRoot.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
||||||
|
|
||||||
style: TextFieldStyle {
|
style: TextFieldStyle {
|
||||||
textColor: UM.Theme.getColor("setting_control_text")
|
textColor: UM.Theme.getColor("setting_control_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
@ -76,9 +83,6 @@ UM.PointingRectangle {
|
|||||||
bottom: 1
|
bottom: 1
|
||||||
top: sliderLabelRoot.maximumValue + 1 // +1 because actual layers is an array
|
top: sliderLabelRoot.maximumValue + 1 // +1 because actual layers is an array
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
|
||||||
Keys.onDownPressed: sliderLabelRoot.setValue(sliderLabelRoot.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
BusyIndicator {
|
||||||
|
@ -368,6 +368,7 @@ Item
|
|||||||
// update values when layer data changes
|
// update values when layer data changes
|
||||||
Connections {
|
Connections {
|
||||||
target: UM.LayerView
|
target: UM.LayerView
|
||||||
|
onMaxLayersChanged: slider.setUpperValue(UM.LayerView.currentLayer)
|
||||||
onMinimumLayerChanged: slider.setLowerValue(UM.LayerView.minimumLayer)
|
onMinimumLayerChanged: slider.setLowerValue(UM.LayerView.minimumLayer)
|
||||||
onCurrentLayerChanged: slider.setUpperValue(UM.LayerView.currentLayer)
|
onCurrentLayerChanged: slider.setUpperValue(UM.LayerView.currentLayer)
|
||||||
}
|
}
|
||||||
|
@ -285,11 +285,11 @@ Cura.MachineAction
|
|||||||
}
|
}
|
||||||
else if (base.selectedPrinter.clusterSize === 0)
|
else if (base.selectedPrinter.clusterSize === 0)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label", "Cura Connect: This printer is not set up to host a group of connected Ultimaker 3 printers.");
|
return catalog.i18nc("@label", "This printer is not set up to host a group of Ultimaker 3 printers.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@label", "Cura Connect: This printer is set up to host a group of %1 connected Ultimaker 3 printers".arg(base.selectedPrinter.clusterSize));
|
return catalog.i18nc("@label", "This printer is the host for a group of %1 Ultimaker 3 printers.".arg(base.selectedPrinter.clusterSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ from UM.Message import Message
|
|||||||
from UM.OutputDevice import OutputDeviceError
|
from UM.OutputDevice import OutputDeviceError
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
from UM.Qt.Duration import Duration, DurationFormat
|
from UM.Qt.Duration import Duration, DurationFormat
|
||||||
|
from UM.PluginRegistry import PluginRegistry
|
||||||
|
|
||||||
from . import NetworkPrinterOutputDevice
|
from . import NetworkPrinterOutputDevice
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||||||
printersChanged = pyqtSignal()
|
printersChanged = pyqtSignal()
|
||||||
selectedPrinterChanged = pyqtSignal()
|
selectedPrinterChanged = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self, key, address, properties, api_prefix, plugin_path):
|
def __init__(self, key, address, properties, api_prefix):
|
||||||
super().__init__(key, address, properties, api_prefix)
|
super().__init__(key, address, properties, api_prefix)
|
||||||
# Store the address of the master.
|
# Store the address of the master.
|
||||||
self._master_address = address
|
self._master_address = address
|
||||||
@ -47,7 +48,6 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||||||
name = key
|
name = key
|
||||||
|
|
||||||
self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated
|
self._authentication_state = NetworkPrinterOutputDevice.AuthState.Authenticated # The printer is always authenticated
|
||||||
self._plugin_path = plugin_path
|
|
||||||
|
|
||||||
self.setName(name)
|
self.setName(name)
|
||||||
description = i18n_catalog.i18nc("@action:button Preceded by 'Ready to'.", "Print over network")
|
description = i18n_catalog.i18nc("@action:button Preceded by 'Ready to'.", "Print over network")
|
||||||
@ -709,3 +709,14 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
|
|||||||
@pyqtSlot(int, result=str)
|
@pyqtSlot(int, result=str)
|
||||||
def formatDuration(self, seconds):
|
def formatDuration(self, seconds):
|
||||||
return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
|
return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
|
||||||
|
|
||||||
|
## For cluster below
|
||||||
|
def _get_plugin_directory_name(self):
|
||||||
|
current_file_absolute_path = os.path.realpath(__file__)
|
||||||
|
directory_path = os.path.dirname(current_file_absolute_path)
|
||||||
|
_, directory_name = os.path.split(directory_path)
|
||||||
|
return directory_name
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _plugin_path(self):
|
||||||
|
return PluginRegistry.getInstance().getPluginPath(self._get_plugin_directory_name())
|
||||||
|
@ -775,6 +775,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
|
|
||||||
## Start requesting data from printer
|
## Start requesting data from printer
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
# Don't allow to connect to a printer with a faulty connection state.
|
||||||
|
# For instance when switching printers but the printer is disconnected from the network
|
||||||
|
if self._connection_state == ConnectionState.error:
|
||||||
|
return
|
||||||
|
|
||||||
if self.isConnected():
|
if self.isConnected():
|
||||||
self.close() # Close previous connection
|
self.close() # Close previous connection
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin):
|
|||||||
Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name)
|
Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name)
|
||||||
if force_cluster or cluster_size >= 0 or was_cluster_before:
|
if force_cluster or cluster_size >= 0 or was_cluster_before:
|
||||||
printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice(
|
printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice(
|
||||||
name, address, properties, self._api_prefix, self._plugin_path)
|
name, address, properties, self._api_prefix)
|
||||||
else:
|
else:
|
||||||
printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix)
|
printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix)
|
||||||
self._printers[printer.getKey()] = printer
|
self._printers[printer.getKey()] = printer
|
||||||
@ -289,17 +289,6 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin):
|
|||||||
Logger.log("d", "Bonjour service removed: %s" % name)
|
Logger.log("d", "Bonjour service removed: %s" % name)
|
||||||
self.removePrinterSignal.emit(str(name))
|
self.removePrinterSignal.emit(str(name))
|
||||||
|
|
||||||
## For cluster below
|
|
||||||
def _get_plugin_directory_name(self):
|
|
||||||
current_file_absolute_path = os.path.realpath(__file__)
|
|
||||||
directory_path = os.path.dirname(current_file_absolute_path)
|
|
||||||
_, directory_name = os.path.split(directory_path)
|
|
||||||
return directory_name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _plugin_path(self):
|
|
||||||
return PluginRegistry.getInstance().getPluginPath(self._get_plugin_directory_name())
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def openControlPanel(self):
|
def openControlPanel(self):
|
||||||
Logger.log("d", "Opening print jobs web UI...")
|
Logger.log("d", "Opening print jobs web UI...")
|
||||||
|
@ -39,7 +39,8 @@ Rectangle
|
|||||||
return catalog.i18nc("@label:status", "Printing");
|
return catalog.i18nc("@label:status", "Printing");
|
||||||
case "idle":
|
case "idle":
|
||||||
return catalog.i18nc("@label:status", "Available");
|
return catalog.i18nc("@label:status", "Available");
|
||||||
case "unreachable": // TODO: new string
|
case "unreachable":
|
||||||
|
return catalog.i18nc("@label:MonitorStatus", "Lost connection with the printer");
|
||||||
case "maintenance": // TODO: new string
|
case "maintenance": // TODO: new string
|
||||||
case "unknown":
|
case "unknown":
|
||||||
default:
|
default:
|
||||||
@ -165,6 +166,7 @@ Rectangle
|
|||||||
anchors.right: printProgressArea.left
|
anchors.right: printProgressArea.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
color: emphasisColor
|
color: emphasisColor
|
||||||
|
opacity: printer != null && printer.status === "unreachable" ? 0.3 : 1
|
||||||
|
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
"machine_extruder_count": { "default_value": 2 },
|
"machine_extruder_count": { "default_value": 2 },
|
||||||
"extruder_prime_pos_abs": { "default_value": true },
|
"extruder_prime_pos_abs": { "default_value": true },
|
||||||
"machine_start_gcode": { "default_value": "" },
|
"machine_start_gcode": { "default_value": "" },
|
||||||
"machine_end_gcode": { "default_value": "G91 ;Relative movement\nG0 F2400 Z3 E-{retraction_amount}\nG90 ;Disable relative movement" },
|
"machine_end_gcode": { "default_value": "G91 ;Relative movement\nG0 F15000 X8.0 Z0.5 E-4.5 ;Wiping+material retraction\nG0 F10000 Z1.5 E4.5 ;Compensation for the retraction\nG90 ;Disable relative movement" },
|
||||||
"prime_tower_position_x": { "value": "machine_depth - max(extruderValue(adhesion_extruder_nr, 'brim_width') * extruderValue(adhesion_extruder_nr, 'initial_layer_line_width_factor') / 100 if adhesion_type == 'brim' else (extruderValue(adhesion_extruder_nr, 'raft_margin') if adhesion_type == 'raft' else (extruderValue(adhesion_extruder_nr, 'skirt_gap') if adhesion_type == 'skirt' else 0)), max(extruderValues('travel_avoid_distance'))) - max(extruderValues('support_offset')) - sum(extruderValues('skirt_brim_line_width')) - 30" },
|
"prime_tower_position_x": { "value": "machine_depth - max(extruderValue(adhesion_extruder_nr, 'brim_width') * extruderValue(adhesion_extruder_nr, 'initial_layer_line_width_factor') / 100 if adhesion_type == 'brim' else (extruderValue(adhesion_extruder_nr, 'raft_margin') if adhesion_type == 'raft' else (extruderValue(adhesion_extruder_nr, 'skirt_gap') if adhesion_type == 'skirt' else 0)), max(extruderValues('travel_avoid_distance'))) - max(extruderValues('support_offset')) - sum(extruderValues('skirt_brim_line_width')) - 30" },
|
||||||
"prime_tower_wipe_enabled": { "default_value": false },
|
"prime_tower_wipe_enabled": { "default_value": false },
|
||||||
|
|
||||||
|
@ -38,6 +38,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "No se puede imprimir"
|
msgstr "No se puede imprimir"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "La impresora no está configurada para alojar un grupo de impresoras Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Termina a las: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "La impresora aloja un grupo de %1 impresoras Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} ha terminado de imprimir «{job_name}»."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Impresión terminada"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Tulostus ei käynnisty"
|
msgstr "Tulostus ei käynnisty"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Tätä tulostinta ei ole määritetty Ultimaker 3 -tulostinryhmän isännäksi."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Päättyy: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Tämä tulostin on {count} tulostimen Ultimaker 3 -ryhmän isäntä."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} on tulostanut työn '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Tulosta valmis"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
@ -578,7 +603,7 @@ msgstr "Tämä tulostin on {count} tulostimen yhdistetyn Ultimaker 3 -ryhmän is
|
|||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/NetworkClusterPrinterOutputDevice.py:105
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/NetworkClusterPrinterOutputDevice.py:105
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
msgid "{printer_name} has finished printing '{job_name}'. Please collect the print and confirm clearing the build plate."
|
msgid "{printer_name} has finished printing '{job_name}'. Please collect the print and confirm clearing the build plate."
|
||||||
msgstr "{printer_name} on tulostanut työn {job_name}. Nouda työ ja vahvista alustan tyhjennys."
|
msgstr "{printer_name} on tulostanut työn '{job_name}'. Nouda työ ja vahvista alustan tyhjennys."
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/NetworkClusterPrinterOutputDevice.py:106
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/NetworkClusterPrinterOutputDevice.py:106
|
||||||
#, python-brace-format
|
#, python-brace-format
|
||||||
|
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Ne peux pas imprimer"
|
msgstr "Ne peux pas imprimer"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "L'imprimante n'est pas configurée pour héberger un groupe d'imprimantes Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Complète a: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "L'imprimante est le patron pour un groupe de %1 imprimantes Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} a terminé d'imprimer '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Impression terminée"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
@ -163,7 +188,7 @@ msgstr "Impossible de démarrer une nouvelle tâche car l'imprimante est occupé
|
|||||||
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:153
|
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:153
|
||||||
msgctxt "@info:title"
|
msgctxt "@info:title"
|
||||||
msgid "Print Details"
|
msgid "Print Details"
|
||||||
msgstr "Imprimer les détails"
|
msgstr "Les détails d'impression"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:456
|
#: /home/ruben/Projects/Cura/plugins/USBPrinting/USBPrinterOutputDevice.py:456
|
||||||
msgctxt "@info:status"
|
msgctxt "@info:status"
|
||||||
@ -1566,7 +1591,7 @@ msgstr "Cette imprimante n'est pas configurée pour héberger un groupe d'imprim
|
|||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/DiscoverUM3Action.qml:287
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/DiscoverUM3Action.qml:287
|
||||||
msgctxt "@label"
|
msgctxt "@label"
|
||||||
msgid "This printer is the host for a group of %1 connected Ultimaker 3 printers"
|
msgid "This printer is the host for a group of %1 connected Ultimaker 3 printers"
|
||||||
msgstr "L'imprimante n'est pas configurée pour héberger un groupe de %1 imprimantes connectées Ultimaker 3."
|
msgstr "L'imprimante est configurée pour héberger un groupe de %1 imprimantes connectées Ultimaker 3."
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/PrintWindow.qml:24
|
#: /home/ruben/Projects/Cura/plugins/CuraPrintClusterUpload/PrintWindow.qml:24
|
||||||
msgctxt "@title:window"
|
msgctxt "@title:window"
|
||||||
|
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Impossibile avviare la stampa"
|
msgstr "Impossibile avviare la stampa"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Questa stampante non è predisposta per comandare un gruppo di stampanti Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Finisce alle: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Questa stampante comanda un gruppo di %1 stampanti Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "La stampante '{printer_name}' ha finito di stampare '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Stampa finita"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Print start niet"
|
msgstr "Print start niet"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Deze printer is niet opgezet om een groep Ultimaker 3 printers te hosten."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Klaar om: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Deze printer is de host voor een groep van %1 Ultimaker 3 printers."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "Printer '{printer_name}' is klaar met het printen van '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Print klaar"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -38,6 +38,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Nie mogę rozpocząć drukowania"
|
msgstr "Nie mogę rozpocząć drukowania"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Ta drukarka nie jest skonfigurowana do zarządzania grupą drukarek Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Wykończenia na: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Ta drukarka jest gospodarzem grupy %1 drukarek Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} skończyła drukowanie '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Drukowanie zakończone"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -37,6 +37,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Não consigo começar a imprimir"
|
msgstr "Não consigo começar a imprimir"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Esta impressora não está configurada para hospedar um grupo de impressoras Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Termina em: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Esta impressora hospeda um grupo de %1 impressoras Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} acabou de imprimir '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Impressão Concluída"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -38,6 +38,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Не удается начать печать"
|
msgstr "Не удается начать печать"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Данный принтер не настроен для управления группой принтеров Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Заканчивается на: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Данный принтер управляет группой из %1 принтеров Ultimaker 3."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name} завершил печать '{job_name}'."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Печать завершена"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -36,6 +36,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "Baskı başlatılamıyor"
|
msgstr "Baskı başlatılamıyor"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "Bu yazıcı, Ultimaker 3 yazıcı grubunu barındırmak için ayarlı değildir."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "Şu tarihlerde bitirir: "
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "Bu yazıcı, %1 Ultimaker 3 yazıcı grubunun ana makinesidir."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "{printer_name}, '{job_name}' yazdırmayı tamamladı."
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "Baskı tamamlandı"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -38,6 +38,31 @@ msgctxt "@label:status"
|
|||||||
msgid "Can't start print"
|
msgid "Can't start print"
|
||||||
msgstr "不能开始打印"
|
msgstr "不能开始打印"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is not set up to host a group of Ultimaker 3 printers."
|
||||||
|
msgstr "这台打印机未设置为运行一组连接的 Ultimaker 3 打印机。"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "Finishes at: "
|
||||||
|
msgstr "完成时间:"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/DiscoverUM3Action.qml
|
||||||
|
msgctxt "@label"
|
||||||
|
msgid "This printer is the host for a group of %1 Ultimaker 3 printers."
|
||||||
|
msgstr "这台打印机是一组共 %1 台已连接 Ultimaker 3 打印机的主机。"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Printer '{printer_name}' has finished printing '{job_name}'."
|
||||||
|
msgstr "打印机 '{printer_name}' 完成了打印任务 '{job_name}'。"
|
||||||
|
|
||||||
|
#: Manually added for plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
|
||||||
|
msgctxt "@info:status"
|
||||||
|
msgid "Print finished"
|
||||||
|
msgstr "打印完成"
|
||||||
|
|
||||||
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
|
||||||
msgctxt "@action"
|
msgctxt "@action"
|
||||||
msgid "Machine Settings"
|
msgid "Machine Settings"
|
||||||
|
@ -40,7 +40,7 @@ Button
|
|||||||
width: UM.Theme.getSize("default_margin").width
|
width: UM.Theme.getSize("default_margin").width
|
||||||
height: UM.Theme.getSize("default_margin").height
|
height: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
text: index + 1;
|
text: index + 1;
|
||||||
|
@ -124,7 +124,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: boundingSpec
|
id: boundingSpec
|
||||||
anchors.top: jobNameRow.bottom
|
anchors.top: jobNameRow.bottom
|
||||||
|
@ -108,15 +108,15 @@ TabView
|
|||||||
{
|
{
|
||||||
width: scrollView.columnWidth;
|
width: scrollView.columnWidth;
|
||||||
height: parent.rowHeight;
|
height: parent.rowHeight;
|
||||||
spacing: UM.Theme.getSize("default_margin").width/2
|
spacing: Math.floor(UM.Theme.getSize("default_margin").width/2)
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: colorSelector
|
id: colorSelector
|
||||||
color: properties.color_code
|
color: properties.color_code
|
||||||
|
|
||||||
width: (colorLabel.height * 0.75) | 0
|
width: Math.floor(colorLabel.height * 0.75)
|
||||||
height: (colorLabel.height * 0.75) | 0
|
height: Math.floor(colorLabel.height * 0.75)
|
||||||
border.width: UM.Theme.getSize("default_lining").height
|
border.width: UM.Theme.getSize("default_lining").height
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
@ -67,7 +67,7 @@ UM.ManagementPage
|
|||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
width: (parent.width * 0.3) | 0
|
width: Math.floor((parent.width * 0.3))
|
||||||
text: model.metadata.material
|
text: model.metadata.material
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.italic: model.id == activeId
|
font.italic: model.id == activeId
|
||||||
|
@ -24,20 +24,20 @@ Column
|
|||||||
{
|
{
|
||||||
id: connectedPrinterHeader
|
id: connectedPrinterHeader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
|
height: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
||||||
color: UM.Theme.getColor("setting_category")
|
color: UM.Theme.getColor("setting_category")
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: connectedPrinterNameLabel
|
id: connectedPrinterNameLabel
|
||||||
text: connectedPrinter != null ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
|
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
|
text: connectedPrinter != null ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
|
||||||
}
|
}
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: connectedPrinterAddressLabel
|
id: connectedPrinterAddressLabel
|
||||||
text: (connectedPrinter != null && connectedPrinter.address != null) ? connectedPrinter.address : ""
|
text: (connectedPrinter != null && connectedPrinter.address != null) ? connectedPrinter.address : ""
|
||||||
@ -47,7 +47,7 @@ Column
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
text: connectedPrinter != null ? connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
|
text: connectedPrinter != null ? connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
|
||||||
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
@ -82,10 +82,10 @@ Column
|
|||||||
{
|
{
|
||||||
id: extruderRectangle
|
id: extruderRectangle
|
||||||
color: UM.Theme.getColor("sidebar")
|
color: UM.Theme.getColor("sidebar")
|
||||||
width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2
|
width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : Math.floor(extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2)
|
||||||
height: UM.Theme.getSize("sidebar_extruder_box").height
|
height: UM.Theme.getSize("sidebar_extruder_box").height
|
||||||
|
|
||||||
Text //Extruder name.
|
Label //Extruder name.
|
||||||
{
|
{
|
||||||
text: ExtruderManager.getExtruderName(index) != "" ? ExtruderManager.getExtruderName(index) : catalog.i18nc("@label", "Extruder")
|
text: ExtruderManager.getExtruderName(index) != "" ? ExtruderManager.getExtruderName(index) : catalog.i18nc("@label", "Extruder")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
@ -95,7 +95,7 @@ Column
|
|||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Text //Target temperature.
|
Label //Target temperature.
|
||||||
{
|
{
|
||||||
id: extruderTargetTemperature
|
id: extruderTargetTemperature
|
||||||
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.targetHotendTemperatures[index] != null) ? Math.round(connectedPrinter.targetHotendTemperatures[index]) + "°C" : ""
|
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.targetHotendTemperatures[index] != null) ? Math.round(connectedPrinter.targetHotendTemperatures[index]) + "°C" : ""
|
||||||
@ -127,7 +127,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text //Temperature indication.
|
Label //Temperature indication.
|
||||||
{
|
{
|
||||||
id: extruderTemperature
|
id: extruderTemperature
|
||||||
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null && connectedPrinter.hotendTemperatures[index] != null) ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
||||||
@ -162,8 +162,8 @@ Column
|
|||||||
Rectangle //Material colour indication.
|
Rectangle //Material colour indication.
|
||||||
{
|
{
|
||||||
id: materialColor
|
id: materialColor
|
||||||
width: materialName.height * 0.75
|
width: Math.floor(materialName.height * 0.75)
|
||||||
height: materialName.height * 0.75
|
height: Math.floor(materialName.height * 0.75)
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
color: (connectedPrinter != null && connectedPrinter.materialColors[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialColors[index] : "#00000000"
|
color: (connectedPrinter != null && connectedPrinter.materialColors[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialColors[index] : "#00000000"
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
@ -195,7 +195,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text //Material name.
|
Label //Material name.
|
||||||
{
|
{
|
||||||
id: materialName
|
id: materialName
|
||||||
text: (connectedPrinter != null && connectedPrinter.materialNames[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialNames[index] : ""
|
text: (connectedPrinter != null && connectedPrinter.materialNames[index] != null && connectedPrinter.materialIds[index] != "") ? connectedPrinter.materialNames[index] : ""
|
||||||
@ -227,7 +227,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text //Variant name.
|
Label //Variant name.
|
||||||
{
|
{
|
||||||
id: variantName
|
id: variantName
|
||||||
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : ""
|
text: (connectedPrinter != null && connectedPrinter.hotendIds[index] != null) ? connectedPrinter.hotendIds[index] : ""
|
||||||
@ -278,7 +278,7 @@ Column
|
|||||||
height: machineHeatedBed.properties.value == "True" ? UM.Theme.getSize("sidebar_extruder_box").height : 0
|
height: machineHeatedBed.properties.value == "True" ? UM.Theme.getSize("sidebar_extruder_box").height : 0
|
||||||
visible: machineHeatedBed.properties.value == "True"
|
visible: machineHeatedBed.properties.value == "True"
|
||||||
|
|
||||||
Text //Build plate label.
|
Label //Build plate label.
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Build plate")
|
text: catalog.i18nc("@label", "Build plate")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
@ -287,7 +287,7 @@ Column
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
Text //Target temperature.
|
Label //Target temperature.
|
||||||
{
|
{
|
||||||
id: bedTargetTemperature
|
id: bedTargetTemperature
|
||||||
text: connectedPrinter != null ? connectedPrinter.targetBedTemperature + "°C" : ""
|
text: connectedPrinter != null ? connectedPrinter.targetBedTemperature + "°C" : ""
|
||||||
@ -319,7 +319,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text //Current temperature.
|
Label //Current temperature.
|
||||||
{
|
{
|
||||||
id: bedCurrentTemperature
|
id: bedCurrentTemperature
|
||||||
text: connectedPrinter != null ? connectedPrinter.bedTemperature + "°C" : ""
|
text: connectedPrinter != null ? connectedPrinter.bedTemperature + "°C" : ""
|
||||||
@ -357,7 +357,7 @@ Column
|
|||||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok")
|
||||||
property var showError:
|
property var showError:
|
||||||
{
|
{
|
||||||
if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < parseInt(preheatTemperatureInput.text))
|
if(bedTemperature.properties.maximum_value != "None" && bedTemperature.properties.maximum_value < Math.floor(preheatTemperatureInput.text))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
@ -397,7 +397,7 @@ Column
|
|||||||
color: UM.Theme.getColor("setting_control_highlight")
|
color: UM.Theme.getColor("setting_control_highlight")
|
||||||
opacity: preheatTemperatureControl.hovered ? 1.0 : 0
|
opacity: preheatTemperatureControl.hovered ? 1.0 : 0
|
||||||
}
|
}
|
||||||
Text //Maximum temperature indication.
|
Label //Maximum temperature indication.
|
||||||
{
|
{
|
||||||
text: (bedTemperature.properties.maximum_value != "None" ? bedTemperature.properties.maximum_value : "") + "°C"
|
text: (bedTemperature.properties.maximum_value != "None" ? bedTemperature.properties.maximum_value : "") + "°C"
|
||||||
color: UM.Theme.getColor("setting_unit")
|
color: UM.Theme.getColor("setting_unit")
|
||||||
@ -475,7 +475,7 @@ Column
|
|||||||
visible: preheatCountdown.visible
|
visible: preheatCountdown.visible
|
||||||
source: UM.Theme.getIcon("print_time")
|
source: UM.Theme.getIcon("print_time")
|
||||||
anchors.right: preheatCountdown.left
|
anchors.right: preheatCountdown.left
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2
|
anchors.rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
||||||
anchors.verticalCenter: preheatCountdown.verticalCenter
|
anchors.verticalCenter: preheatCountdown.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,7 +500,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: preheatCountdown
|
id: preheatCountdown
|
||||||
text: connectedPrinter != null ? connectedPrinter.preheatBedRemainingTime : ""
|
text: connectedPrinter != null ? connectedPrinter.preheatBedRemainingTime : ""
|
||||||
@ -527,15 +527,15 @@ Column
|
|||||||
{
|
{
|
||||||
return true; //Can always cancel if the timer is running.
|
return true; //Can always cancel if the timer is running.
|
||||||
}
|
}
|
||||||
if (bedTemperature.properties.minimum_value != "None" && parseInt(preheatTemperatureInput.text) < parseInt(bedTemperature.properties.minimum_value))
|
if (bedTemperature.properties.minimum_value != "None" && Math.floor(preheatTemperatureInput.text) < Math.floor(bedTemperature.properties.minimum_value))
|
||||||
{
|
{
|
||||||
return false; //Target temperature too low.
|
return false; //Target temperature too low.
|
||||||
}
|
}
|
||||||
if (bedTemperature.properties.maximum_value != "None" && parseInt(preheatTemperatureInput.text) > parseInt(bedTemperature.properties.maximum_value))
|
if (bedTemperature.properties.maximum_value != "None" && Math.floor(preheatTemperatureInput.text) > Math.floor(bedTemperature.properties.maximum_value))
|
||||||
{
|
{
|
||||||
return false; //Target temperature too high.
|
return false; //Target temperature too high.
|
||||||
}
|
}
|
||||||
if (parseInt(preheatTemperatureInput.text) == 0)
|
if (Math.floor(preheatTemperatureInput.text) == 0)
|
||||||
{
|
{
|
||||||
return false; //Setting the temperature to 0 is not allowed (since that cancels the pre-heating).
|
return false; //Setting the temperature to 0 is not allowed (since that cancels the pre-heating).
|
||||||
}
|
}
|
||||||
@ -595,7 +595,7 @@ Column
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: actualLabel
|
id: actualLabel
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -708,22 +708,22 @@ Column
|
|||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: base.width - 2 * UM.Theme.getSize("default_margin").width
|
width: Math.floor(base.width - 2 * UM.Theme.getSize("default_margin").width)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
width: parent.width * 0.4
|
width: Math.floor(parent.width * 0.4)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: label
|
text: label
|
||||||
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
width: parent.width * 0.6
|
width: Math.floor(parent.width * 0.6)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: value
|
text: value
|
||||||
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
@ -742,7 +742,7 @@ Column
|
|||||||
width: base.width
|
width: base.width
|
||||||
height: UM.Theme.getSize("section").height
|
height: UM.Theme.getSize("section").height
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -35,11 +35,11 @@ Item
|
|||||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: globalProfileLabel
|
id: globalProfileLabel
|
||||||
text: catalog.i18nc("@label","Profile:");
|
text: catalog.i18nc("@label","Profile:");
|
||||||
width: parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
@ -63,7 +63,7 @@ Item
|
|||||||
}
|
}
|
||||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||||
|
|
||||||
width: parent.width * 0.55
|
width: Math.floor(parent.width * 0.55)
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
anchors.left: globalProfileLabel.right
|
anchors.left: globalProfileLabel.right
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@ -77,8 +77,8 @@ Item
|
|||||||
id: customisedSettings
|
id: customisedSettings
|
||||||
|
|
||||||
visible: Cura.MachineManager.hasUserSettings
|
visible: Cura.MachineManager.hasUserSettings
|
||||||
height: parent.height * 0.6
|
height: Math.floor(parent.height * 0.6)
|
||||||
width: parent.height * 0.6
|
width: Math.floor(parent.height * 0.6)
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -121,7 +121,7 @@ Rectangle
|
|||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top: headerSeparator.bottom
|
anchors.top: headerSeparator.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
width: parent.width * 0.45
|
width: Math.floor(parent.width * 0.45)
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
visible: !monitoringPrint && !hideView
|
visible: !monitoringPrint && !hideView
|
||||||
@ -130,13 +130,13 @@ Rectangle
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: settingsModeSelection
|
id: settingsModeSelection
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
width: parent.width * 0.55
|
width: Math.floor(parent.width * 0.55)
|
||||||
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
|
height: UM.Theme.getSize("sidebar_header_mode_toggle").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.top:
|
anchors.top:
|
||||||
{
|
{
|
||||||
if (settingsModeLabel.contentWidth >= parent.width - width - UM.Theme.getSize("sidebar_margin").width)
|
if (settingsModeLabel.contentWidth >= parent.width - width - UM.Theme.getSize("sidebar_margin").width * 2)
|
||||||
{
|
{
|
||||||
return settingsModeLabel.bottom;
|
return settingsModeLabel.bottom;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ Rectangle
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
|
anchors.leftMargin: model.index * (settingsModeSelection.width / 2)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: 0.5 * parent.width
|
width: Math.floor(0.5 * parent.width)
|
||||||
text: model.text
|
text: model.text
|
||||||
exclusiveGroup: modeMenuGroup;
|
exclusiveGroup: modeMenuGroup;
|
||||||
checkable: true;
|
checkable: true;
|
||||||
@ -186,12 +186,18 @@ Rectangle
|
|||||||
UM.Theme.getColor("action_button")
|
UM.Theme.getColor("action_button")
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
Label {
|
Label {
|
||||||
anchors.centerIn: parent
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2
|
||||||
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active_text") :
|
||||||
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
control.hovered ? UM.Theme.getColor("action_button_hovered_text") :
|
||||||
UM.Theme.getColor("action_button_text")
|
UM.Theme.getColor("action_button_text")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
text: control.text;
|
text: control.text
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
elide: Text.ElideMiddle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label: Item { }
|
label: Item { }
|
||||||
@ -304,7 +310,7 @@ Rectangle
|
|||||||
height: UM.Theme.getSize("sidebar_lining").height
|
height: UM.Theme.getSize("sidebar_lining").height
|
||||||
color: UM.Theme.getColor("sidebar_lining")
|
color: UM.Theme.getColor("sidebar_lining")
|
||||||
anchors.bottom: printSpecs.top
|
anchors.bottom: printSpecs.top
|
||||||
anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize
|
anchors.bottomMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2 + UM.Theme.getSize("progressbar").height + UM.Theme.getFont("default_bold").pixelSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
@ -317,7 +323,7 @@ Rectangle
|
|||||||
height: timeDetails.height + timeSpecDescription.height + lengthSpec.height
|
height: timeDetails.height + timeSpecDescription.height + lengthSpec.height
|
||||||
visible: !monitoringPrint
|
visible: !monitoringPrint
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: timeDetails
|
id: timeDetails
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@ -361,7 +367,7 @@ Rectangle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: timeSpecDescription
|
id: timeSpecDescription
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@ -370,7 +376,7 @@ Rectangle
|
|||||||
color: UM.Theme.getColor("text_subtext")
|
color: UM.Theme.getColor("text_subtext")
|
||||||
text: catalog.i18nc("@description", "Print time")
|
text: catalog.i18nc("@description", "Print time")
|
||||||
}
|
}
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: lengthSpec
|
id: lengthSpec
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
@ -484,7 +490,7 @@ Rectangle
|
|||||||
})
|
})
|
||||||
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
|
sidebarContents.push({ "item": modesListModel.get(base.currentModeIndex).item, "immediate": true });
|
||||||
|
|
||||||
var index = parseInt(UM.Preferences.getValue("cura/active_mode"))
|
var index = Math.floor(UM.Preferences.getValue("cura/active_mode"))
|
||||||
if(index)
|
if(index)
|
||||||
{
|
{
|
||||||
currentModeIndex = index;
|
currentModeIndex = index;
|
||||||
|
@ -17,7 +17,7 @@ Column
|
|||||||
property int currentExtruderIndex: ExtruderManager.activeExtruderIndex;
|
property int currentExtruderIndex: ExtruderManager.activeExtruderIndex;
|
||||||
property bool currentExtruderVisible: extrudersList.visible;
|
property bool currentExtruderVisible: extrudersList.visible;
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("sidebar_margin").width * 0.9
|
spacing: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.9)
|
||||||
|
|
||||||
signal showTooltip(Item item, point location, string text)
|
signal showTooltip(Item item, point location, string text)
|
||||||
signal hideTooltip()
|
signal hideTooltip()
|
||||||
@ -52,15 +52,15 @@ Column
|
|||||||
{
|
{
|
||||||
id: extruderSelectionRow
|
id: extruderSelectionRow
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("sidebar_tabs").height * 2 / 3
|
height: Math.floor(UM.Theme.getSize("sidebar_tabs").height * 2 / 3)
|
||||||
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
visible: machineExtruderCount.properties.value > 1 && !sidebar.monitoringPrint
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: UM.Theme.getSize("sidebar_margin").width * 0.7
|
leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: UM.Theme.getSize("sidebar_margin").width * 0.7
|
rightMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width * 0.7)
|
||||||
topMargin: UM.Theme.getSize("sidebar_margin").height
|
topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,15 +70,15 @@ Column
|
|||||||
property var index: 0
|
property var index: 0
|
||||||
|
|
||||||
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
||||||
width: parent.width
|
width: Math.floor(parent.width)
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
leftMargin: UM.Theme.getSize("default_margin").width / 2
|
leftMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width / 2
|
rightMargin: Math.floor(UM.Theme.getSize("default_margin").width / 2)
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ Column
|
|||||||
width: {
|
width: {
|
||||||
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
|
var extruderTextWidth = extruderStaticText.visible ? extruderStaticText.width : 0;
|
||||||
var iconWidth = extruderIconItem.width;
|
var iconWidth = extruderIconItem.width;
|
||||||
return extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2;
|
return Math.floor(extruderTextWidth + iconWidth + UM.Theme.getSize("default_margin").width / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Static text "Extruder"
|
// Static text "Extruder"
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: extruderStaticText
|
id: extruderStaticText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@ -166,7 +166,7 @@ Column
|
|||||||
var minimumWidth = control.width < UM.Theme.getSize("button").width ? control.width : UM.Theme.getSize("button").width;
|
var minimumWidth = control.width < UM.Theme.getSize("button").width ? control.width : UM.Theme.getSize("button").width;
|
||||||
var minimumHeight = control.height < UM.Theme.getSize("button").height ? control.height : UM.Theme.getSize("button").height;
|
var minimumHeight = control.height < UM.Theme.getSize("button").height ? control.height : UM.Theme.getSize("button").height;
|
||||||
var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight;
|
var minimumSize = minimumWidth < minimumHeight ? minimumWidth : minimumHeight;
|
||||||
minimumSize -= UM.Theme.getSize("default_margin").width / 2;
|
minimumSize -= Math.floor(UM.Theme.getSize("default_margin").width / 2);
|
||||||
return minimumSize;
|
return minimumSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ Column
|
|||||||
color: extruderNumberText.color
|
color: extruderNumberText.color
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: extruderNumberText
|
id: extruderNumberText
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -250,11 +250,11 @@ Column
|
|||||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: materialLabel
|
id: materialLabel
|
||||||
text: catalog.i18nc("@label","Material");
|
text: catalog.i18nc("@label","Material");
|
||||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
}
|
}
|
||||||
@ -306,11 +306,11 @@ Column
|
|||||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Label
|
||||||
{
|
{
|
||||||
id: printCoreLabel
|
id: printCoreLabel
|
||||||
text: Cura.MachineManager.activeDefinitionVariantsName;
|
text: Cura.MachineManager.activeDefinitionVariantsName;
|
||||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ Column
|
|||||||
visible: Cura.MachineManager.hasVariants
|
visible: Cura.MachineManager.hasVariants
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
@ -335,7 +335,7 @@ Column
|
|||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: materialInfoRow
|
id: materialInfoRow
|
||||||
height: UM.Theme.getSize("sidebar_setup").height / 2
|
height: Math.floor(UM.Theme.getSize("sidebar_setup").height / 2)
|
||||||
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
|
visible: (Cura.MachineManager.hasVariants || Cura.MachineManager.hasMaterials) && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
@ -349,7 +349,7 @@ Column
|
|||||||
Item {
|
Item {
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
width: Math.floor(parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width)
|
||||||
|
|
||||||
UM.RecolorImage {
|
UM.RecolorImage {
|
||||||
id: warningImage
|
id: warningImage
|
||||||
|
@ -204,7 +204,7 @@ Item
|
|||||||
{
|
{
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2)
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||||
color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
@ -223,13 +223,13 @@ Item
|
|||||||
// Make sure the text aligns correctly with each tick
|
// Make sure the text aligns correctly with each tick
|
||||||
if (qualityModel.totalTicks == 0) {
|
if (qualityModel.totalTicks == 0) {
|
||||||
// If there is only one tick, align it centrally
|
// If there is only one tick, align it centrally
|
||||||
return parseInt(((base.width * 0.55) - width) / 2)
|
return Math.floor(((base.width * 0.55) - width) / 2)
|
||||||
} else if (index == 0) {
|
} else if (index == 0) {
|
||||||
return (base.width * 0.55 / qualityModel.totalTicks) * index
|
return (base.width * 0.55 / qualityModel.totalTicks) * index
|
||||||
} else if (index == qualityModel.totalTicks) {
|
} else if (index == qualityModel.totalTicks) {
|
||||||
return (base.width * 0.55 / qualityModel.totalTicks) * index - width
|
return (base.width * 0.55 / qualityModel.totalTicks) * index - width
|
||||||
} else {
|
} else {
|
||||||
return parseInt((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2))
|
return Math.floor((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,10 +373,13 @@ Item
|
|||||||
anchors.top: speedSlider.bottom
|
anchors.top: speedSlider.bottom
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.right: speedSlider.left
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
text: catalog.i18nc("@label", "Print Speed")
|
text: catalog.i18nc("@label", "Print Speed")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@ -442,7 +445,7 @@ Item
|
|||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
||||||
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
|
width: Math.floor(UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width)
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@ -452,7 +455,7 @@ Item
|
|||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 1.7
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.7)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
}
|
}
|
||||||
@ -463,7 +466,7 @@ Item
|
|||||||
id: infillCellRight
|
id: infillCellRight
|
||||||
|
|
||||||
height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height)
|
height: infillSlider.height + UM.Theme.getSize("sidebar_margin").height + enableGradualInfillCheckBox.visible * (enableGradualInfillCheckBox.height + UM.Theme.getSize("sidebar_margin").height)
|
||||||
width: UM.Theme.getSize("sidebar").width * .55
|
width: Math.floor(UM.Theme.getSize("sidebar").width * .55)
|
||||||
|
|
||||||
anchors.left: infillCellLeft.right
|
anchors.left: infillCellLeft.right
|
||||||
anchors.top: infillCellLeft.top
|
anchors.top: infillCellLeft.top
|
||||||
@ -474,10 +477,10 @@ Item
|
|||||||
|
|
||||||
//anchors.top: parent.top
|
//anchors.top: parent.top
|
||||||
anchors.left: infillSlider.left
|
anchors.left: infillSlider.left
|
||||||
anchors.leftMargin: (infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor
|
anchors.leftMargin: Math.floor((infillSlider.value / infillSlider.stepSize) * (infillSlider.width / (infillSlider.maximumValue / infillSlider.stepSize)) - 10 * screenScaleFactor)
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
text: parseInt(infillDensity.properties.value) + "%"
|
text: Math.floor(infillDensity.properties.value) + "%"
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
|
||||||
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||||
@ -487,7 +490,7 @@ Item
|
|||||||
Binding {
|
Binding {
|
||||||
target: infillSlider
|
target: infillSlider
|
||||||
property: "value"
|
property: "value"
|
||||||
value: parseInt(infillDensity.properties.value)
|
value: Math.floor(infillDensity.properties.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider
|
Slider
|
||||||
@ -500,7 +503,7 @@ Item
|
|||||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
|
|
||||||
height: UM.Theme.getSize("sidebar_margin").height
|
height: UM.Theme.getSize("sidebar_margin").height
|
||||||
width: infillCellRight.width - UM.Theme.getSize("sidebar_margin").width - style.handleWidth
|
width: Math.floor(infillCellRight.width - UM.Theme.getSize("sidebar_margin").width - style.handleWidth)
|
||||||
|
|
||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 100
|
maximumValue: 100
|
||||||
@ -508,15 +511,15 @@ Item
|
|||||||
tickmarksEnabled: true
|
tickmarksEnabled: true
|
||||||
|
|
||||||
// disable slider when gradual support is enabled
|
// disable slider when gradual support is enabled
|
||||||
enabled: parseInt(infillSteps.properties.value) == 0
|
enabled: Math.floor(infillSteps.properties.value) == 0
|
||||||
|
|
||||||
// set initial value from stack
|
// set initial value from stack
|
||||||
value: parseInt(infillDensity.properties.value)
|
value: Math.floor(infillDensity.properties.value)
|
||||||
|
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
|
|
||||||
// Don't round the value if it's already the same
|
// Don't round the value if it's already the same
|
||||||
if (parseInt(infillDensity.properties.value) == infillSlider.value) {
|
if (Math.floor(infillDensity.properties.value) == infillSlider.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +588,7 @@ Item
|
|||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2)
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||||
|
|
||||||
// we loop over all density icons and only show the one that has the current density and steps
|
// we loop over all density icons and only show the one that has the current density and steps
|
||||||
Repeater
|
Repeater
|
||||||
@ -596,8 +599,8 @@ Item
|
|||||||
|
|
||||||
property int activeIndex: {
|
property int activeIndex: {
|
||||||
for (var i = 0; i < infillModel.count; i++) {
|
for (var i = 0; i < infillModel.count; i++) {
|
||||||
var density = parseInt(infillDensity.properties.value)
|
var density = Math.floor(infillDensity.properties.value)
|
||||||
var steps = parseInt(infillSteps.properties.value)
|
var steps = Math.floor(infillSteps.properties.value)
|
||||||
var infillModelItem = infillModel.get(i)
|
var infillModelItem = infillModel.get(i)
|
||||||
|
|
||||||
if (density >= infillModelItem.percentageMin
|
if (density >= infillModelItem.percentageMin
|
||||||
@ -636,13 +639,13 @@ Item
|
|||||||
property alias _hovered: enableGradualInfillMouseArea.containsMouse
|
property alias _hovered: enableGradualInfillMouseArea.containsMouse
|
||||||
|
|
||||||
anchors.top: infillSlider.bottom
|
anchors.top: infillSlider.bottom
|
||||||
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category
|
||||||
anchors.left: infillCellRight.left
|
anchors.left: infillCellRight.left
|
||||||
|
|
||||||
style: UM.Theme.styles.checkbox
|
style: UM.Theme.styles.checkbox
|
||||||
enabled: base.settingsEnabled
|
enabled: base.settingsEnabled
|
||||||
visible: infillSteps.properties.enabled == "True"
|
visible: infillSteps.properties.enabled == "True"
|
||||||
checked: parseInt(infillSteps.properties.value) > 0
|
checked: Math.floor(infillSteps.properties.value) > 0
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: enableGradualInfillMouseArea
|
id: enableGradualInfillMouseArea
|
||||||
@ -651,18 +654,18 @@ Item
|
|||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
property var previousInfillDensity: parseInt(infillDensity.properties.value)
|
property var previousInfillDensity: Math.floor(infillDensity.properties.value)
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// Set to 90% only when enabling gradual infill
|
// Set to 90% only when enabling gradual infill
|
||||||
if (parseInt(infillSteps.properties.value) == 0) {
|
if (Math.floor(infillSteps.properties.value) == 0) {
|
||||||
previousInfillDensity = parseInt(infillDensity.properties.value)
|
previousInfillDensity = Math.floor(infillDensity.properties.value)
|
||||||
infillDensity.setPropertyValue("value", String(90))
|
infillDensity.setPropertyValue("value", String(90))
|
||||||
} else {
|
} else {
|
||||||
infillDensity.setPropertyValue("value", String(previousInfillDensity))
|
infillDensity.setPropertyValue("value", String(previousInfillDensity))
|
||||||
}
|
}
|
||||||
|
|
||||||
infillSteps.setPropertyValue("value", (parseInt(infillSteps.properties.value) == 0) ? 5 : 0)
|
infillSteps.setPropertyValue("value", (Math.floor(infillSteps.properties.value) == 0) ? 5 : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
@ -678,7 +681,7 @@ Item
|
|||||||
Label {
|
Label {
|
||||||
id: gradualInfillLabel
|
id: gradualInfillLabel
|
||||||
anchors.left: enableGradualInfillCheckBox.right
|
anchors.left: enableGradualInfillCheckBox.right
|
||||||
anchors.leftMargin: parseInt(UM.Theme.getSize("sidebar_margin").width / 2)
|
anchors.leftMargin: Math.floor(UM.Theme.getSize("sidebar_margin").width / 2)
|
||||||
text: catalog.i18nc("@label", "Enable gradual")
|
text: catalog.i18nc("@label", "Enable gradual")
|
||||||
font: UM.Theme.getFont("default")
|
font: UM.Theme.getFont("default")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
@ -739,7 +742,7 @@ Item
|
|||||||
visible: enableSupportCheckBox.visible
|
visible: enableSupportCheckBox.visible
|
||||||
|
|
||||||
anchors.top: infillCellRight.bottom
|
anchors.top: infillCellRight.bottom
|
||||||
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 1.5)
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.5)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
||||||
@ -948,7 +951,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: tipsCell
|
id: tipsCell
|
||||||
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
|
anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom)
|
||||||
anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 2)
|
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 2)
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: tipsText.contentHeight * tipsText.lineCount
|
height: tipsText.contentHeight * tipsText.lineCount
|
||||||
@ -979,6 +982,35 @@ Item
|
|||||||
storeIndex: 0
|
storeIndex: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binding
|
||||||
|
{
|
||||||
|
target: infillDensity
|
||||||
|
property: "containerStackId"
|
||||||
|
value: {
|
||||||
|
|
||||||
|
// not settable per extruder or there only is global, so we must pick global
|
||||||
|
if (machineExtruderCount.properties.value == 1) {
|
||||||
|
return Cura.MachineManager.activeStackId
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the ID of the extruder when the infill is limited to an extruder
|
||||||
|
if (infillInheritStackProvider.properties.limit_to_extruder != null && infillInheritStackProvider.properties.limit_to_extruder >= 0) {
|
||||||
|
return ExtruderManager.extruderIds[String(infillInheritStackProvider.properties.limit_to_extruder)]
|
||||||
|
}
|
||||||
|
|
||||||
|
// default to the global stack
|
||||||
|
return Cura.MachineManager.activeStackId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UM.SettingPropertyProvider
|
||||||
|
{
|
||||||
|
id: infillInheritStackProvider
|
||||||
|
containerStackId: Cura.MachineManager.activeMachineId
|
||||||
|
key: "infill_sparse_density"
|
||||||
|
watchedProperties: [ "limit_to_extruder" ]
|
||||||
|
}
|
||||||
|
|
||||||
UM.SettingPropertyProvider
|
UM.SettingPropertyProvider
|
||||||
{
|
{
|
||||||
id: infillDensity
|
id: infillDensity
|
||||||
|
@ -31,10 +31,10 @@ fragment =
|
|||||||
vec4 minorGridColor = mix(u_plateColor, u_gridColor1, 1.0 - min(minorLine, 1.0));
|
vec4 minorGridColor = mix(u_plateColor, u_gridColor1, 1.0 - min(minorLine, 1.0));
|
||||||
|
|
||||||
// Compute anti-aliased world-space major grid lines
|
// Compute anti-aliased world-space major grid lines
|
||||||
vec2 majorGrid = abs(fract(coord / 10 - 0.5) - 0.5) / fwidth(coord / 10);
|
vec2 majorGrid = abs(fract(coord / 10.0 - 0.5) - 0.5) / fwidth(coord / 10.0);
|
||||||
float majorLine = min(majorGrid.x, majorGrid.y);
|
float majorLine = min(majorGrid.x, majorGrid.y);
|
||||||
|
|
||||||
frag_color = mix(minorGridColor, u_gridColor0, 1.0 - min(majorLine, 1.0));
|
gl_FragColor = mix(minorGridColor, u_gridColor0, 1.0 - min(majorLine, 1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
vertex41core =
|
vertex41core =
|
||||||
@ -72,7 +72,7 @@ fragment41core =
|
|||||||
vec4 minorGridColor = mix(u_plateColor, u_gridColor1, 1.0 - min(minorLine, 1.0));
|
vec4 minorGridColor = mix(u_plateColor, u_gridColor1, 1.0 - min(minorLine, 1.0));
|
||||||
|
|
||||||
// Compute anti-aliased world-space major grid lines
|
// Compute anti-aliased world-space major grid lines
|
||||||
vec2 majorGrid = abs(fract(coord / 10 - 0.5) - 0.5) / fwidth(coord / 10);
|
vec2 majorGrid = abs(fract(coord / 10.0 - 0.5) - 0.5) / fwidth(coord / 10.0);
|
||||||
float majorLine = min(majorGrid.x, majorGrid.y);
|
float majorLine = min(majorGrid.x, majorGrid.y);
|
||||||
|
|
||||||
frag_color = mix(minorGridColor, u_gridColor0, 1.0 - min(majorLine, 1.0));
|
frag_color = mix(minorGridColor, u_gridColor0, 1.0 - min(majorLine, 1.0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user