Remove crappy implementation

This commit is contained in:
ChrisTerBeke 2018-12-04 22:21:36 +01:00
parent 467d347008
commit d0513e40e1
No known key found for this signature in database
GPG key ID: A49F1AB9D7E0C263
7 changed files with 8 additions and 99 deletions

View file

@ -12,7 +12,6 @@ Cura.ExpandableComponent
id: machineSelector
property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
property bool isCloudConnected: Cura.MachineManager.activeMachineCloudKey != ""
property bool isPrinterConnected: Cura.MachineManager.printerConnected
property var outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
@ -56,7 +55,7 @@ Cura.ExpandableComponent
leftMargin: UM.Theme.getSize("thick_margin").width
}
source: isCloudConnected ? UM.Theme.getIcon("printer_cloud_connected") : UM.Theme.getIcon("printer_connected")
source: UM.Theme.getIcon("printer_connected")
width: UM.Theme.getSize("printer_status_icon").width
height: UM.Theme.getSize("printer_status_icon").height
@ -64,7 +63,7 @@ Cura.ExpandableComponent
sourceSize.height: height
color: UM.Theme.getColor("primary")
visible: isNetworkPrinter && (isPrinterConnected || isCloudConnected)
visible: isNetworkPrinter && isPrinterConnected
// Make a themable circle in the background so we can change it in other themes
Rectangle

View file

@ -32,7 +32,8 @@ Column
id: networkedPrintersModel
filter:
{
"type": "machine", "um_network_key": "*", "hidden": "False"
"type": "machine",
"um_network_key": "*"
}
}
@ -50,46 +51,6 @@ Column
}
}
Label
{
text: catalog.i18nc("@label", "Cloud connected printers")
visible: cloudPrintersModel.items.length > 0
leftPadding: UM.Theme.getSize("default_margin").width
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
renderType: Text.NativeRendering
font: UM.Theme.getFont("medium")
color: UM.Theme.getColor("text_medium")
verticalAlignment: Text.AlignVCenter
}
Repeater
{
id: cloudPrinters
model: UM.ContainerStacksModel
{
id: cloudPrintersModel
filter:
{
"type": "machine",
"um_cloud_cluster_id": "*"
}
}
delegate: MachineSelectorButton
{
text: model.metadata["connect_group_name"]
checked: true // cloud devices are always online if they are available
outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
Connections
{
target: Cura.MachineManager
onActiveMachineNetworkGroupNameChanged: checked = Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
}
}
}
Label
{
text: catalog.i18nc("@label", "Preset printers")
@ -112,8 +73,7 @@ Column
filter:
{
"type": "machine",
"um_network_key": null,
"um_cloud_cluster_id": null
"um_network_key": null
}
}