mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-24 11:21:14 -07:00
Fix merge conflicts
This commit is contained in:
commit
25caf1a087
25 changed files with 226 additions and 2079 deletions
|
|
@ -123,6 +123,17 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This is a placehoder for adding a pattern in the header
|
||||
Image
|
||||
{
|
||||
id: backgroundPattern
|
||||
anchors.fill: parent
|
||||
fillMode: Image.Tile
|
||||
source: UM.Theme.getImage("header_pattern")
|
||||
horizontalAlignment: Image.AlignLeft
|
||||
verticalAlignment: Image.AlignTop
|
||||
}
|
||||
}
|
||||
|
||||
MainWindowHeader
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ Cura.ExpandablePopup
|
|||
|
||||
onVisibleChanged:
|
||||
{
|
||||
is_connected = Cura.MachineManager.activeMachineNetworkKey !== "" && Cura.MachineManager.printerConnected // Re-evaluate.
|
||||
is_connected = Cura.MachineManager.activeMachineHasRemoteConnection && Cura.MachineManager.printerConnected //Re-evaluate.
|
||||
|
||||
// If the printer is not connected, we switch always to the custom mode. If is connected instead, the auto mode
|
||||
// or the previous state is selected
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2016 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
|
|
@ -91,7 +91,7 @@ UM.ManagementPage
|
|||
|
||||
Item
|
||||
{
|
||||
width: childrenRect.width + 2 * screenScaleFactor
|
||||
width: Math.round(childrenRect.width + 2 * screenScaleFactor)
|
||||
height: childrenRect.height
|
||||
Button
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import Cura 1.0 as Cura
|
|||
import "PrinterOutput"
|
||||
|
||||
|
||||
Rectangle
|
||||
Item
|
||||
{
|
||||
id: base
|
||||
UM.I18nCatalog { id: catalog; name: "cura"}
|
||||
|
|
|
|||
|
|
@ -39,17 +39,6 @@ Item
|
|||
{
|
||||
target: Cura.QualityProfilesDropDownMenuModel
|
||||
onItemsChanged: qualityModel.update()
|
||||
onDataChanged:
|
||||
{
|
||||
// If a custom profile is selected and then a user decides to change any of setting the slider should show
|
||||
// the reset button. After clicking the reset button the QualityProfilesDropDownMenuModel(ListModel) is
|
||||
// updated before the property isProfileCustomized is called to update.
|
||||
if (Cura.SimpleModeSettingsManager.isProfileCustomized)
|
||||
{
|
||||
Cura.SimpleModeSettingsManager.updateIsProfileUserCreated()
|
||||
}
|
||||
qualityModel.update()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
@ -97,7 +86,7 @@ Item
|
|||
if (Cura.MachineManager.activeQualityType == qualityItem.quality_type)
|
||||
{
|
||||
// set to -1 when switching to user created profile so all ticks are clickable
|
||||
if (Cura.SimpleModeSettingsManager.isProfileUserCreated)
|
||||
if (Cura.MachineManager.hasCustomQuality)
|
||||
{
|
||||
qualityModel.qualitySliderActiveIndex = -1
|
||||
}
|
||||
|
|
@ -192,7 +181,7 @@ Item
|
|||
{
|
||||
id: customisedSettings
|
||||
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
|
||||
height: visible ? UM.Theme.getSize("print_setup_icon").height : 0
|
||||
width: height
|
||||
anchors
|
||||
|
|
@ -358,7 +347,7 @@ Item
|
|||
{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: !Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||
enabled: !Cura.MachineManager.hasCustomQuality
|
||||
onEntered:
|
||||
{
|
||||
var tooltipContent = catalog.i18nc("@tooltip", "This quality profile is not available for your current material and nozzle configuration. Please change these to enable this quality profile")
|
||||
|
|
@ -417,7 +406,7 @@ Item
|
|||
implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width
|
||||
implicitHeight: implicitWidth
|
||||
radius: Math.round(implicitWidth / 2)
|
||||
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated && qualityModel.existingQualityProfile
|
||||
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.MachineManager.hasCustomQuality && qualityModel.existingQualityProfile
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -441,7 +430,7 @@ Item
|
|||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.NoButton
|
||||
enabled: !Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||
enabled: !Cura.MachineManager.hasCustomQuality
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -451,7 +440,7 @@ Item
|
|||
{
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
visible: Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||
visible: Cura.MachineManager.hasCustomQuality
|
||||
|
||||
onEntered:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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