mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Change remaining MessageDialogs to our version
Contributes to issue CURA-8687.
This commit is contained in:
parent
a03988d146
commit
2606a3b847
7 changed files with 41 additions and 55 deletions
|
@ -1,10 +1,9 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -88,21 +87,21 @@ Item
|
|||
anchors.top: dataRow.bottom
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: confirmDeleteDialog
|
||||
title: catalog.i18nc("@dialog:title", "Delete Backup")
|
||||
text: catalog.i18nc("@dialog:info", "Are you sure you want to delete this backup? This cannot be undone.")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
onYes: CuraDrive.deleteBackup(modelData.backup_id)
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
onAccepted: CuraDrive.deleteBackup(modelData.backup_id)
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: confirmRestoreDialog
|
||||
title: catalog.i18nc("@dialog:title", "Restore Backup")
|
||||
text: catalog.i18nc("@dialog:info", "You will need to restart Cura before your backup is restored. Do you want to close Cura now?")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
onYes: CuraDrive.restoreBackup(modelData.backup_id)
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
onAccepted: CuraDrive.restoreBackup(modelData.backup_id)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import QtQuick 2.2
|
|||
import QtQuick.Controls 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
Cura.MachineAction
|
||||
{
|
||||
|
@ -281,15 +280,12 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: invalidIPAddressMessageDialog
|
||||
x: parent ? (parent.x + (parent.width) / 2) : 0
|
||||
y: parent ? (parent.y + (parent.height) / 2) : 0
|
||||
title: catalog.i18nc("@title:window", "Invalid IP address")
|
||||
text: catalog.i18nc("@text", "Please enter a valid IP address.")
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Ok
|
||||
standardButtons: Dialog.Ok
|
||||
}
|
||||
|
||||
UM.Dialog
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Dialogs 1.1
|
||||
import UM 1.3 as UM
|
||||
import QtQuick.Controls 2.15
|
||||
import UM 1.5 as UM
|
||||
|
||||
/**
|
||||
* A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context
|
||||
|
@ -134,32 +133,29 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: sendToTopConfirmationDialog
|
||||
Component.onCompleted: visible = false
|
||||
icon: StandardIcon.Warning
|
||||
onYes: OutputDevice.sendJobToTop(printJob.key)
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
onAccepted: OutputDevice.sendJobToTop(printJob.key)
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to move %1 to the top of the queue?").arg(printJob.name) : ""
|
||||
title: catalog.i18nc("@window:title", "Move print job to top")
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: deleteConfirmationDialog
|
||||
Component.onCompleted: visible = false
|
||||
icon: StandardIcon.Warning
|
||||
onYes: OutputDevice.deleteJobFromQueue(printJob.key)
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
onAccepted: OutputDevice.deleteJobFromQueue(printJob.key)
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to delete %1?").arg(printJob.name) : ""
|
||||
title: catalog.i18nc("@window:title", "Delete print job")
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: abortConfirmationDialog
|
||||
Component.onCompleted: visible = false
|
||||
icon: StandardIcon.Warning
|
||||
onYes: printJob.setState("abort")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
onAccepted: printJob.setState("abort")
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to abort %1?").arg(printJob.name) : ""
|
||||
title: catalog.i18nc("@window:title", "Abort print")
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2021 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
|
@ -61,15 +61,15 @@ Item
|
|||
onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: newProjectDialog
|
||||
modality: Qt.ApplicationModal
|
||||
anchors.centerIn: base
|
||||
|
||||
title: catalog.i18nc("@title:window", "New project")
|
||||
text: catalog.i18nc("@info:question", "Are you sure you want to start a new project? This will clear the build plate and any unsaved settings.")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
icon: StandardIcon.Question
|
||||
onYes:
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
onAccepted:
|
||||
{
|
||||
CuraApplication.resetWorkspace()
|
||||
Cura.Actions.resetProfile.trigger()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//Copyright (c) 2018 Ultimaker B.V.
|
||||
//Copyright (c) 2022 Ultimaker B.V.
|
||||
//Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.1
|
|||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item
|
||||
|
@ -325,16 +325,14 @@ Item
|
|||
onClicked: confirmationDialog.visible = true
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: confirmationDialog
|
||||
|
||||
title: catalog.i18nc("@window:title", "Abort print")
|
||||
icon: StandardIcon.Warning
|
||||
text: catalog.i18nc("@label", "Are you sure you want to abort the print?")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
Component.onCompleted: visible = false
|
||||
onYes: activePrintJob.setState("abort")
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
onAccepted: activePrintJob.setState("abort")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,21 +119,20 @@ Item
|
|||
width: base.width
|
||||
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
|
||||
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: confirmDiameterChangeDialog
|
||||
anchors.centerIn: base
|
||||
|
||||
icon: StandardIcon.Question;
|
||||
title: catalog.i18nc("@title:window", "Confirm Diameter Change")
|
||||
text: catalog.i18nc("@label (%1 is a number)", "The new filament diameter is set to %1 mm, which is not compatible with the current extruder. Do you wish to continue?".arg(new_diameter_value))
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
modality: Qt.ApplicationModal
|
||||
standardButtons: Dialog.Yes | Dialog.No
|
||||
|
||||
property var new_diameter_value: null;
|
||||
property var old_diameter_value: null;
|
||||
property var old_approximate_diameter_value: null;
|
||||
|
||||
onYes:
|
||||
onAccepted:
|
||||
{
|
||||
base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString());
|
||||
base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value);
|
||||
|
@ -142,13 +141,11 @@ Item
|
|||
base.resetSelectedMaterial()
|
||||
}
|
||||
|
||||
onNo:
|
||||
onRejected:
|
||||
{
|
||||
base.properties.diameter = old_diameter_value;
|
||||
diameterSpinBox.value = Qt.binding(function() { return base.properties.diameter })
|
||||
}
|
||||
|
||||
onRejected: no()
|
||||
}
|
||||
|
||||
Label { width: informationPage.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") }
|
||||
|
|
|
@ -269,7 +269,7 @@ Item
|
|||
}
|
||||
|
||||
// Confirmation dialog for removing a profile
|
||||
MessageDialog
|
||||
UM.MessageDialog
|
||||
{
|
||||
id: confirmRemoveQualityDialog
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue