mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Add reusable messagebox based on QML MessageDialog
Contributes to CURA-1730 and CURA-1850
This commit is contained in:
parent
2f3ffe2a18
commit
6eb502730c
2 changed files with 45 additions and 0 deletions
|
@ -683,6 +683,35 @@ UM.MainWindow
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: messageDialog
|
||||
modality: Qt.ApplicationModal
|
||||
onAccepted: Printer.messageBoxClosed(clickedButton)
|
||||
onApply: Printer.messageBoxClosed(clickedButton)
|
||||
onDiscard: Printer.messageBoxClosed(clickedButton)
|
||||
onHelp: Printer.messageBoxClosed(clickedButton)
|
||||
onNo: Printer.messageBoxClosed(clickedButton)
|
||||
onRejected: Printer.messageBoxClosed(clickedButton)
|
||||
onReset: Printer.messageBoxClosed(clickedButton)
|
||||
onYes: Printer.messageBoxClosed(clickedButton)
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Printer
|
||||
onShowMessageBox:
|
||||
{
|
||||
messageDialog.title = title
|
||||
messageDialog.text = text
|
||||
messageDialog.informativeText = informativeText
|
||||
messageDialog.detailedText = detailedText
|
||||
messageDialog.standardButtons = buttons
|
||||
messageDialog.icon = icon
|
||||
messageDialog.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.addMachine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue