Start MachineSelector refactor by allowing list model to be passed in.

CURA-9424
This commit is contained in:
Joey de l'Arago 2022-11-04 15:11:04 +01:00
parent f8ed660d58
commit 2019d8f3af
4 changed files with 8 additions and 2 deletions

View file

@ -19,5 +19,7 @@ Item
width: UM.Theme.getSize("machine_selector_widget").width
height: parent.height
anchors.centerIn: parent
machineListModel: Cura.MachineListModel {}
}
}

View file

@ -55,6 +55,8 @@ Item
Layout.preferredWidth: parent.machineSelectorWidth
Layout.fillWidth: true
Layout.fillHeight: true
machineListModel: Cura.MachineListModel {}
}
Cura.ConfigurationMenu

View file

@ -16,6 +16,8 @@ Cura.ExpandablePopup
property bool isCloudRegistered: Cura.MachineManager.activeMachineHasCloudRegistration
property bool isGroup: Cura.MachineManager.activeMachineIsGroup
property alias machineListModel: machineSelectorList.model
readonly property string connectionStatus: {
if (isNetworkPrinter)
{
@ -156,7 +158,8 @@ Cura.ExpandablePopup
}
MouseArea // Connection status tooltip hover area
// Connection status tooltip hover area
MouseArea
{
id: connectionStatusTooltipHoverArea
anchors.fill: parent

View file

@ -10,7 +10,6 @@ import Cura 1.0 as Cura
ListView
{
id: listView
model: Cura.MachineListModel {}
section.property: "isOnline"
property real contentHeight: childrenRect.height