mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Replace UM.MessageDialog
with newly added Cura.MessageDialog
This dialog is different from the `UM.MessageDialog` in that it CURA-8688
This commit is contained in:
parent
e75993e7f3
commit
e03176a1fa
10 changed files with 37 additions and 17 deletions
|
@ -87,7 +87,7 @@ Item
|
||||||
anchors.top: dataRow.bottom
|
anchors.top: dataRow.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmDeleteDialog
|
id: confirmDeleteDialog
|
||||||
title: catalog.i18nc("@dialog:title", "Delete Backup")
|
title: catalog.i18nc("@dialog:title", "Delete Backup")
|
||||||
|
@ -96,7 +96,7 @@ Item
|
||||||
onAccepted: CuraDrive.deleteBackup(modelData.backup_id)
|
onAccepted: CuraDrive.deleteBackup(modelData.backup_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmRestoreDialog
|
id: confirmRestoreDialog
|
||||||
title: catalog.i18nc("@dialog:title", "Restore Backup")
|
title: catalog.i18nc("@dialog:title", "Restore Backup")
|
||||||
|
|
|
@ -256,7 +256,7 @@ Cura.MachineAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: invalidIPAddressMessageDialog
|
id: invalidIPAddressMessageDialog
|
||||||
title: catalog.i18nc("@title:window", "Invalid IP address")
|
title: catalog.i18nc("@title:window", "Invalid IP address")
|
||||||
|
|
|
@ -133,7 +133,7 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: sendToTopConfirmationDialog
|
id: sendToTopConfirmationDialog
|
||||||
onAccepted: OutputDevice.sendJobToTop(printJob.key)
|
onAccepted: OutputDevice.sendJobToTop(printJob.key)
|
||||||
|
@ -142,7 +142,7 @@ Item
|
||||||
title: catalog.i18nc("@window:title", "Move print job to top")
|
title: catalog.i18nc("@window:title", "Move print job to top")
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: deleteConfirmationDialog
|
id: deleteConfirmationDialog
|
||||||
onAccepted: OutputDevice.deleteJobFromQueue(printJob.key)
|
onAccepted: OutputDevice.deleteJobFromQueue(printJob.key)
|
||||||
|
@ -151,7 +151,7 @@ Item
|
||||||
title: catalog.i18nc("@window:title", "Delete print job")
|
title: catalog.i18nc("@window:title", "Delete print job")
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: abortConfirmationDialog
|
id: abortConfirmationDialog
|
||||||
onAccepted: printJob.setState("abort")
|
onAccepted: printJob.setState("abort")
|
||||||
|
|
|
@ -585,7 +585,7 @@ UM.MainWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: exitConfirmationDialog
|
id: exitConfirmationDialog
|
||||||
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
|
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
|
||||||
|
@ -743,14 +743,14 @@ UM.MainWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: packageInstallDialog
|
id: packageInstallDialog
|
||||||
title: catalog.i18nc("@window:title", "Install Package")
|
title: catalog.i18nc("@window:title", "Install Package")
|
||||||
standardButtons: StandardButton.Ok
|
standardButtons: StandardButton.Ok
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: infoMultipleFilesWithGcodeDialog
|
id: infoMultipleFilesWithGcodeDialog
|
||||||
title: catalog.i18nc("@title:window", "Open File(s)")
|
title: catalog.i18nc("@title:window", "Open File(s)")
|
||||||
|
|
20
resources/qml/Dialogs/MessageDialog.qml
Normal file
20
resources/qml/Dialogs/MessageDialog.qml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
|
import UM 1.5 as UM
|
||||||
|
import Cura 1.5 as Cura
|
||||||
|
|
||||||
|
// Wrapper around the UM.MessageBox with the primary/secondarybuttons
|
||||||
|
// set to Cura.PrimaryButton and Cura.SecondaryButton respectively
|
||||||
|
UM.MessageDialog
|
||||||
|
{
|
||||||
|
primaryButton: Cura.PrimaryButton
|
||||||
|
{
|
||||||
|
text: model.text
|
||||||
|
}
|
||||||
|
|
||||||
|
secondaryButton: Cura.TertiaryButton
|
||||||
|
{
|
||||||
|
text: model.text
|
||||||
|
}
|
||||||
|
}
|
|
@ -55,7 +55,7 @@ Item
|
||||||
onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: newProjectDialog
|
id: newProjectDialog
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,7 @@ Item
|
||||||
onClicked: confirmationDialog.visible = true
|
onClicked: confirmationDialog.visible = true
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmationDialog
|
id: confirmationDialog
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dialogs
|
// Dialogs
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmRemoveMaterialDialog
|
id: confirmRemoveMaterialDialog
|
||||||
title: catalog.i18nc("@title:window", "Confirm Remove")
|
title: catalog.i18nc("@title:window", "Confirm Remove")
|
||||||
|
@ -337,7 +337,7 @@ Item
|
||||||
{
|
{
|
||||||
const result = Cura.ContainerManager.importMaterialContainer(fileUrl);
|
const result = Cura.ContainerManager.importMaterialContainer(fileUrl);
|
||||||
|
|
||||||
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
|
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||||
messageDialog.standardButtons = Dialog.Ok;
|
messageDialog.standardButtons = Dialog.Ok;
|
||||||
messageDialog.title = catalog.i18nc("@title:window", "Import Material");
|
messageDialog.title = catalog.i18nc("@title:window", "Import Material");
|
||||||
switch (result.status)
|
switch (result.status)
|
||||||
|
@ -365,7 +365,7 @@ Item
|
||||||
{
|
{
|
||||||
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl);
|
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl);
|
||||||
|
|
||||||
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
|
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||||
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
||||||
messageDialog.standardButtons = Dialog.Ok;
|
messageDialog.standardButtons = Dialog.Ok;
|
||||||
switch (result.status)
|
switch (result.status)
|
||||||
|
|
|
@ -119,7 +119,7 @@ Item
|
||||||
width: base.width
|
width: base.width
|
||||||
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
|
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
|
||||||
|
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmDiameterChangeDialog
|
id: confirmDiameterChangeDialog
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ UM.ManagementPage
|
||||||
base.toActivateNewQuality = false;
|
base.toActivateNewQuality = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: messageDialog
|
id: messageDialog
|
||||||
standardButtons: Dialog.Ok
|
standardButtons: Dialog.Ok
|
||||||
|
@ -245,7 +245,7 @@ UM.ManagementPage
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confirmation dialog for removing a profile
|
// Confirmation dialog for removing a profile
|
||||||
UM.MessageDialog
|
Cura.MessageDialog
|
||||||
{
|
{
|
||||||
id: confirmRemoveQualityDialog
|
id: confirmRemoveQualityDialog
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue