mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Fix merge conflicts
This commit is contained in:
commit
25caf1a087
25 changed files with 226 additions and 2079 deletions
|
@ -11,7 +11,7 @@ Cura.ExpandablePopup
|
|||
{
|
||||
id: machineSelector
|
||||
|
||||
property bool isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey != ""
|
||||
property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasRemoteConnection
|
||||
property bool isPrinterConnected: Cura.MachineManager.printerConnected
|
||||
property var outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
|
@ -98,6 +98,12 @@ Cura.ExpandablePopup
|
|||
scroll.height = Math.min(height, maximumHeight)
|
||||
popup.height = scroll.height + buttonRow.height
|
||||
}
|
||||
Component.onCompleted:
|
||||
{
|
||||
scroll.height = Math.min(height, maximumHeight)
|
||||
popup.height = scroll.height + buttonRow.height
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,80 +7,40 @@ import QtQuick.Controls 2.3
|
|||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Column
|
||||
ListView
|
||||
{
|
||||
id: machineSelectorList
|
||||
id: listView
|
||||
height: childrenRect.height
|
||||
model: Cura.PrintersModel {}
|
||||
section.property: "hasRemoteConnection"
|
||||
|
||||
Label
|
||||
section.delegate: Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Connected printers")
|
||||
visible: networkedPrintersModel.items.length > 0
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers")
|
||||
width: parent.width
|
||||
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
renderType: Text.NativeRendering
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Repeater
|
||||
delegate: MachineSelectorButton
|
||||
{
|
||||
id: networkedPrinters
|
||||
text: model.name
|
||||
width: listView.width
|
||||
outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
model: UM.ContainerStacksModel
|
||||
checked:
|
||||
{
|
||||
id: networkedPrintersModel
|
||||
filter:
|
||||
// If the machine has a remote connection
|
||||
var result = Cura.MachineManager.activeMachineId == model.id
|
||||
if (Cura.MachineManager.activeMachineHasRemoteConnection)
|
||||
{
|
||||
"type": "machine",
|
||||
"um_network_key": "*"
|
||||
}
|
||||
}
|
||||
|
||||
delegate: MachineSelectorButton
|
||||
{
|
||||
text: model.metadata["connect_group_name"]
|
||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
||||
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"]
|
||||
result |= Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Preset printers")
|
||||
visible: virtualPrintersModel.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: virtualPrinters
|
||||
|
||||
model: UM.ContainerStacksModel
|
||||
{
|
||||
id: virtualPrintersModel
|
||||
filter:
|
||||
{
|
||||
"type": "machine",
|
||||
"um_network_key": null
|
||||
}
|
||||
}
|
||||
|
||||
delegate: MachineSelectorButton
|
||||
{
|
||||
text: model.name
|
||||
checked: Cura.MachineManager.activeMachineId == model.id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue