mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 07:15:03 -06:00
Merge pull request #966 from thopiekar/master-CURA-2157
CURA-2157: Adding an confirmation dialog
This commit is contained in:
commit
56f81043ec
1 changed files with 14 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
|
@ -160,7 +161,7 @@ Rectangle
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
text: catalog.i18nc("@label:", "Abort Print")
|
||||
onClicked: Cura.MachineManager.printerOutputDevices[0].setJobState("abort")
|
||||
onClicked: confirmationDialog.visible = true
|
||||
|
||||
style: ButtonStyle
|
||||
{
|
||||
|
@ -216,6 +217,18 @@ Rectangle
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: confirmationDialog
|
||||
|
||||
title: catalog.i18nc("@text:MessageDialog", "Abort print")
|
||||
icon: StandardIcon.Warning
|
||||
text: catalog.i18nc("@text:MessageDialog", "Do you really want to abort the print?")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
Component.onCompleted: visible = false
|
||||
onYes: Cura.MachineManager.printerOutputDevices[0].setJobState("abort")
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: pauseResumeButton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue