mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Rename AbstractStacksModel.py -> MachineListModel.py since this model includes both abstract machine stacks and regular machines
Add machineCount for displaying the number of machines of a type. MachineSelectorButton is in use in other places, swapped it out for a new Component MachineListButton. CURA-9514
This commit is contained in:
parent
bedb76d516
commit
b18080c332
6 changed files with 104 additions and 11 deletions
|
@ -10,8 +10,8 @@ import Cura 1.0 as Cura
|
|||
ListView
|
||||
{
|
||||
id: listView
|
||||
model: Cura.AbstractStacksModel {}
|
||||
section.property: "hasRemoteConnection"
|
||||
model: Cura.MachineListModel {}
|
||||
section.property: "section"
|
||||
property real contentHeight: childrenRect.height
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar
|
||||
|
@ -29,13 +29,10 @@ ListView
|
|||
color: UM.Theme.getColor("text_medium")
|
||||
}
|
||||
|
||||
delegate: MachineSelectorButton
|
||||
delegate: MachineListButton
|
||||
{
|
||||
text: model.name ? model.name : ""
|
||||
width: listView.width - scrollBar.width
|
||||
outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
checked: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.id == model.id : false
|
||||
|
||||
onClicked:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue