mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Add the compatible machine families property to printerOutputModel
This is used by the cluster to indicate by which families of printers the job can be displayed CL-894
This commit is contained in:
parent
98d0ad6c27
commit
fb1033ad99
4 changed files with 39 additions and 5 deletions
|
|
@ -131,7 +131,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
raise OutputDeviceError.WriteRequestFailedError(i18n_catalog.i18nc("@info:status", "There are no file formats available to write with!"))
|
||||
preferred_format = file_formats[0]
|
||||
|
||||
#J ust take the first file format available.
|
||||
# Just take the first file format available.
|
||||
if file_handler is not None:
|
||||
writer = file_handler.getWriterByMimeType(cast(str, preferred_format["mime_type"]))
|
||||
else:
|
||||
|
|
@ -552,7 +552,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
|
||||
configuration.setExtruderConfigurations(extruders)
|
||||
print_job.updateConfiguration(configuration)
|
||||
|
||||
print_job.setCompatibleMachineFamilies(data["compatible_machine_families"])
|
||||
print_job.stateChanged.connect(self._printJobStateChanged)
|
||||
return print_job
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,30 @@ Item
|
|||
onOpened: visible = true
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
id: printerFamilyPills
|
||||
spacing: 0.5 * UM.Theme.getSize("default_margin").width
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: extrudersInfo.top
|
||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
}
|
||||
height: childrenRect.height
|
||||
Repeater
|
||||
{
|
||||
model: printJob.compatibleMachineFamilies
|
||||
|
||||
delegate: PrinterFamilyPill
|
||||
{
|
||||
text: modelData
|
||||
color: UM.Theme.getColor("viewport_background")
|
||||
padding: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
// PrintCore && Material config
|
||||
Row
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue