Remove AbstractMachine

Having a separate class for the AbstractMachine complicated things; it's behaviour was extremely similar to the GlobalStack so adding one more stack container type in addition to the many similar setting container types we already have adds complexity to the system. Having these different classes for machines and abstract machines also add complexity to the update script as the abstract machines were stored in a separate folder from the machine types.

Because of these reasons we decided to replace the AbstractMachine by a GlobalStack where the is_abstract_machine property metadata property is set to True.

CURA-9514, CURA-9277

Co-authored-by: joeydelarago <joeydelarago@gmail.com>
This commit is contained in:
c.lamboo 2022-08-26 10:45:45 +02:00
parent d843921c7a
commit 8b84db7059
6 changed files with 44 additions and 78 deletions

View file

@ -30,8 +30,8 @@ Button
height: UM.Theme.getSize("medium_button").height
width: UM.Theme.getSize("medium_button").width
color: UM.Theme.getColor("machine_selector_printer_icon")
visible: model.machineType == "abstract_machine" || !model.isOnline
source: model.machineType == "abstract_machine" ? UM.Theme.getIcon("PrinterTriple", "medium") : UM.Theme.getIcon("Printer", "medium")
visible: model.isAbstractMachine || !model.isOnline
source: model.isAbstractMachine ? UM.Theme.getIcon("PrinterTriple", "medium") : UM.Theme.getIcon("Printer", "medium")
anchors
{
@ -51,7 +51,7 @@ Button
leftMargin: UM.Theme.getSize("default_margin").width
}
text: machineListButton.text
font: model.machineType == "abstract_machine" ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium")
font: model.isAbstractMachine ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium")
visible: text != ""
elide: Text.ElideRight
}
@ -68,7 +68,7 @@ Button
top: buttonText.top
bottom: buttonText.bottom
}
visible: model.machineType == "abstract_machine"
visible: model.isAbstractMachine
UM.Label
{