2020-08-10 12:15:57 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import "../imports"
|
|
|
|
import "./"
|
|
|
|
|
|
|
|
ModalPopup {
|
2020-08-10 13:06:46 +00:00
|
|
|
id: confirmationDialog
|
2020-08-10 12:15:57 +00:00
|
|
|
height: 186
|
|
|
|
width: 400
|
2020-08-10 13:06:46 +00:00
|
|
|
title: qsTr("Confirm your action")
|
|
|
|
|
|
|
|
property string confirmButtonLabel: qsTr("Confirm")
|
|
|
|
property string confirmationText: qsTr("Are you sure you want to this?")
|
|
|
|
signal confirmButtonClicked()
|
2020-08-10 12:15:57 +00:00
|
|
|
|
|
|
|
Text {
|
2020-08-10 13:06:46 +00:00
|
|
|
text: confirmationDialog.confirmationText
|
2020-08-10 12:15:57 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: Item {
|
|
|
|
id: footerContainer
|
|
|
|
width: parent.width
|
|
|
|
height: children[0].height
|
|
|
|
|
|
|
|
StyledButton {
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
|
|
|
btnColor: Style.current.lightRed
|
|
|
|
btnBorderWidth: 1
|
|
|
|
btnBorderColor: Style.current.grey
|
|
|
|
textColor: Style.current.red
|
2020-08-10 13:06:46 +00:00
|
|
|
label: confirmationDialog.confirmButtonLabel
|
2020-08-10 12:15:57 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2020-08-10 13:06:46 +00:00
|
|
|
onClicked: confirmationDialog.confirmButtonClicked()
|
2020-08-10 12:15:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-08-10 13:06:46 +00:00
|
|
|
|