diff options
author | Remco Burema <r.burema@ultimaker.com> | 2022-09-08 14:36:42 +0300 |
---|---|---|
committer | Remco Burema <r.burema@ultimaker.com> | 2022-09-08 14:36:42 +0300 |
commit | 04cd76cb3bd260a63ec58f5838770f726fe813b1 (patch) | |
tree | b02b712520b513c324da40402d68b7c16d36aa5c /resources | |
parent | 5866560540a44b2d14ee1381c428de54ef80f58f (diff) |
Get extruder configs to frontend.
When choosing the printer, all possible (single) extruder configs need to be shown for that printer.
CURA-9278
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/Dialogs/ChoosePrinterDialog.qml | 5 | ||||
-rw-r--r-- | resources/qml/PrinterSelector/PrintSelectorCard.qml | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/resources/qml/Dialogs/ChoosePrinterDialog.qml b/resources/qml/Dialogs/ChoosePrinterDialog.qml index 2bfdc79b23..fbaf9a61bb 100644 --- a/resources/qml/Dialogs/ChoosePrinterDialog.qml +++ b/resources/qml/Dialogs/ChoosePrinterDialog.qml @@ -27,10 +27,7 @@ UM.Dialog { id: contents - model: Cura.CompatibleMachineModel - { - filter: machine_id_filter - } + model: Cura.CompatibleMachineModel {} delegate: Cura.PrintSelectorCard { diff --git a/resources/qml/PrinterSelector/PrintSelectorCard.qml b/resources/qml/PrinterSelector/PrintSelectorCard.qml index 91c9e92abf..040f12642b 100644 --- a/resources/qml/PrinterSelector/PrintSelectorCard.qml +++ b/resources/qml/PrinterSelector/PrintSelectorCard.qml @@ -1,3 +1,6 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + import QtQuick 2.2 import QtQuick.Controls 2.9 import QtQuick.Layouts 2.10 @@ -5,7 +8,8 @@ import QtQuick.Layouts 2.10 import UM 1.5 as UM import Cura 1.0 as Cura -Rectangle { +Rectangle +{ property alias name: printerTitle.text property var extruders @@ -78,7 +82,7 @@ Rectangle { id: singleMaterialText anchors.left: extruderCore.right anchors.verticalCenter: extruderCore.verticalCenter - text: modelData.materials.length == 1 ? modelDatamaterials[0].name : "test" + text: modelData.materials.length == 1 ? modelData.materials[0].brand + " " + modelData.materials[0].name : "" visible: modelData.materials.length == 1 } @@ -88,13 +92,13 @@ Rectangle { anchors.top: extruderCore.bottom anchors.left: extruderCore.left anchors.topMargin: UM.Theme.getSize("narrow_margin").height + visible: modelData.materials.length > 1 Repeater { model: modelData.materials - visible: modelData.materials.length > 1 UM.Label { - text: modelData.name + text: modelData.brand + " " + modelData.name } } } @@ -131,4 +135,4 @@ Rectangle { } } } -}
\ No newline at end of file +} |