mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-7418-update-profile-window
This commit is contained in:
commit
f6e9bc7c3c
51 changed files with 697 additions and 296 deletions
|
@ -84,6 +84,21 @@ UM.MainWindow
|
|||
CuraApplication.purgeWindows()
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
// This connection is used when there is no ActiveMachine and the user is logged in
|
||||
target: CuraApplication
|
||||
onShowAddPrintersUncancellableDialog:
|
||||
{
|
||||
Cura.Actions.parent = backgroundItem
|
||||
|
||||
// Reuse the welcome dialog item to show "Add a printer" only.
|
||||
welcomeDialogItem.model = CuraApplication.getAddPrinterPagesModelWithoutCancel()
|
||||
welcomeDialogItem.progressBarVisible = false
|
||||
welcomeDialogItem.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
|
@ -117,6 +132,15 @@ UM.MainWindow
|
|||
welcomeDialogItem.progressBarVisible = false
|
||||
welcomeDialogItem.visible = true
|
||||
}
|
||||
|
||||
// Reuse the welcome dialog item to show the "Add printers" dialog. Triggered when there is no active
|
||||
// machine and the user is logged in.
|
||||
if (!Cura.MachineManager.activeMachine && Cura.API.account.isLoggedIn)
|
||||
{
|
||||
welcomeDialogItem.model = CuraApplication.getAddPrinterPagesModelWithoutCancel()
|
||||
welcomeDialogItem.progressBarVisible = false
|
||||
welcomeDialogItem.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ UM.Dialog
|
|||
id: base
|
||||
title: catalog.i18nc("@title:window", "Discard or Keep changes")
|
||||
|
||||
width: UM.Theme.getSize("popup_dialog").width
|
||||
height: UM.Theme.getSize("popup_dialog").height
|
||||
minimumWidth: UM.Theme.getSize("popup_dialog").width
|
||||
minimumHeight: UM.Theme.getSize("popup_dialog").height
|
||||
property var changesModel: Cura.UserChangesModel{ id: userChangesModel}
|
||||
onVisibilityChanged:
|
||||
{
|
||||
|
@ -80,6 +80,8 @@ UM.Dialog
|
|||
property var extruder_name: userChangesModel.getItem(styleData.row).extruder
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: parent.right
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("system")
|
||||
text:
|
||||
{
|
||||
|
|
|
@ -143,7 +143,7 @@ UM.Dialog
|
|||
{
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
model: Cura.MachineManager.activeMachine.extruderList
|
||||
model: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.extruderList : null
|
||||
delegate: Column
|
||||
{
|
||||
height: childrenRect.height
|
||||
|
|
|
@ -33,7 +33,7 @@ Cura.ExpandablePopup
|
|||
}
|
||||
|
||||
contentPadding: UM.Theme.getSize("default_lining").width
|
||||
enabled: Cura.MachineManager.activeMachine.hasMaterials || Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates; //Only let it drop down if there is any configuration that you could change.
|
||||
enabled: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials || Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates : false; //Only let it drop down if there is any configuration that you could change.
|
||||
|
||||
headerItem: Item
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ Cura.ExpandablePopup
|
|||
model: extrudersModel
|
||||
delegate: Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: Math.round(parent.width / extrudersModel.count)
|
||||
Layout.fillHeight: true
|
||||
|
||||
// Extruder icon. Shows extruder index and has the same color as the active material.
|
||||
|
@ -84,7 +84,7 @@ Cura.ExpandablePopup
|
|||
{
|
||||
id: variantLabel
|
||||
|
||||
visible: Cura.MachineManager.activeMachine.hasVariants
|
||||
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
|
||||
|
||||
text: model.variant
|
||||
elide: Text.ElideRight
|
||||
|
@ -114,7 +114,7 @@ Cura.ExpandablePopup
|
|||
color: UM.Theme.getColor("text")
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
visible: !Cura.MachineManager.activeMachine.hasMaterials && (Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates)
|
||||
visible: Cura.MachineManager.activeMachine ? !Cura.MachineManager.activeMachine.hasMaterials && (Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates) : false
|
||||
|
||||
anchors
|
||||
{
|
||||
|
|
|
@ -244,7 +244,7 @@ Item
|
|||
Row
|
||||
{
|
||||
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
|
||||
visible: Cura.MachineManager.activeMachine.hasMaterials
|
||||
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false
|
||||
|
||||
Label
|
||||
{
|
||||
|
@ -305,7 +305,7 @@ Item
|
|||
Row
|
||||
{
|
||||
height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0
|
||||
visible: Cura.MachineManager.activeMachine.hasVariants
|
||||
visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false
|
||||
|
||||
Label
|
||||
{
|
||||
|
|
|
@ -130,7 +130,11 @@ Item
|
|||
target: extruderModel
|
||||
onModelChanged:
|
||||
{
|
||||
supportExtruderCombobox.color = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
|
||||
var maybeColor = supportExtruderCombobox.model.getItem(supportExtruderCombobox.currentIndex).color
|
||||
if (maybeColor)
|
||||
{
|
||||
supportExtruderCombobox.color = maybeColor
|
||||
}
|
||||
}
|
||||
}
|
||||
onCurrentIndexChanged:
|
||||
|
|
|
@ -35,14 +35,21 @@ Cura.ExpandablePopup
|
|||
}
|
||||
}
|
||||
|
||||
readonly property string connectionStatusMessage: {
|
||||
function getConnectionStatusMessage() {
|
||||
if (connectionStatus == "printer_cloud_not_available")
|
||||
{
|
||||
if(Cura.API.connectionStatus.isInternetReachable)
|
||||
{
|
||||
if (Cura.API.account.isLoggedIn)
|
||||
{
|
||||
return catalog.i18nc("@status", "The cloud printer is offline. Please check if the printer is turned on and connected to the internet.")
|
||||
if (Cura.MachineManager.activeMachineIsLinkedToCurrentAccount)
|
||||
{
|
||||
return catalog.i18nc("@status", "The cloud printer is offline. Please check if the printer is turned on and connected to the internet.")
|
||||
}
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@status", "This printer is not linked to your account. Please visit the Ultimaker Digital Factory to establish a connection.")
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -139,12 +146,13 @@ Cura.ExpandablePopup
|
|||
{
|
||||
id: connectionStatusTooltipHoverArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: connectionStatusMessage !== ""
|
||||
hoverEnabled: getConnectionStatusMessage() !== ""
|
||||
acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks
|
||||
|
||||
onEntered:
|
||||
{
|
||||
machineSelector.mouseArea.entered() // we want both this and the outer area to be entered
|
||||
tooltip.tooltipText = getConnectionStatusMessage()
|
||||
tooltip.show()
|
||||
}
|
||||
onExited: { tooltip.hide() }
|
||||
|
@ -155,7 +163,7 @@ Cura.ExpandablePopup
|
|||
id: tooltip
|
||||
|
||||
width: 250 * screenScaleFactor
|
||||
tooltipText: connectionStatusMessage
|
||||
tooltipText: getConnectionStatusMessage()
|
||||
arrowSize: UM.Theme.getSize("button_tooltip_arrow").width
|
||||
x: connectionStatusImage.x - UM.Theme.getSize("narrow_margin").width
|
||||
y: connectionStatusImage.y + connectionStatusImage.height + UM.Theme.getSize("narrow_margin").height
|
||||
|
|
|
@ -28,11 +28,11 @@ ListView
|
|||
|
||||
delegate: MachineSelectorButton
|
||||
{
|
||||
text: model.name
|
||||
text: model.name ? model.name : ""
|
||||
width: listView.width
|
||||
outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
checked: Cura.MachineManager.activeMachine.id == model.id
|
||||
checked: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.id == model.id : false
|
||||
|
||||
onClicked:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue