mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
WIP: Implement add machine from network device
This commit is contained in:
parent
f7f5123fea
commit
de9f6f47bd
5 changed files with 80 additions and 8 deletions
|
|
@ -24,6 +24,8 @@ Button
|
|||
property var outputDevice: null
|
||||
property var printerTypesList: []
|
||||
|
||||
property var updatePrinterTypesFunction: updatePrinterTypesList
|
||||
|
||||
function updatePrinterTypesList()
|
||||
{
|
||||
printerTypesList = (outputDevice != null) ? outputDevice.uniquePrinterTypes : []
|
||||
|
|
@ -87,14 +89,14 @@ Button
|
|||
Connections
|
||||
{
|
||||
target: outputDevice
|
||||
onUniqueConfigurationsChanged: updatePrinterTypesList()
|
||||
onUniqueConfigurationsChanged: updatePrinterTypesFunction()
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.MachineManager
|
||||
onOutputDevicesChanged: updatePrinterTypesList()
|
||||
onOutputDevicesChanged: updatePrinterTypesFunction()
|
||||
}
|
||||
|
||||
Component.onCompleted: updatePrinterTypesList()
|
||||
Component.onCompleted: updatePrinterTypesFunction()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ Item
|
|||
anchors.rightMargin: 10
|
||||
outputDevice: modelData.device
|
||||
|
||||
updatePrinterTypesFunction: updateMachineTypes
|
||||
|
||||
function updateMachineTypes()
|
||||
{
|
||||
printerTypesList = [ modelData.machine_type_with_spaces ]
|
||||
}
|
||||
|
||||
checkable: false
|
||||
selected: ListView.view.currentIndex == model.index
|
||||
onClicked:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue