2025-01-07 14:41:48 +01:00
|
|
|
import Lomiri.Components 1.3
|
|
|
|
import Lomiri.Components.Popups 1.3
|
2025-01-10 15:28:42 +01:00
|
|
|
import QtQuick 2.4
|
2019-09-20 21:29:39 +02:00
|
|
|
|
|
|
|
Dialog {
|
2025-01-13 20:51:29 +01:00
|
|
|
id: dialog
|
2019-09-20 21:29:39 +02:00
|
|
|
|
|
|
|
property string text
|
2025-01-13 20:51:29 +01:00
|
|
|
property string continueText: i18n.tr("Ok")
|
|
|
|
property color continueColor: theme.palette.normal.positive
|
2019-09-20 21:29:39 +02:00
|
|
|
|
2025-01-10 15:28:42 +01:00
|
|
|
signal validated()
|
|
|
|
signal canceled()
|
2019-09-20 21:29:39 +02:00
|
|
|
|
|
|
|
Text {
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2025-01-13 20:51:29 +01:00
|
|
|
text: dialog.text
|
2019-09-20 21:29:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
2025-01-13 20:51:29 +01:00
|
|
|
id: continueButton
|
|
|
|
|
|
|
|
text: dialog.continueText
|
|
|
|
color: dialog.continueColor
|
2019-09-20 21:29:39 +02:00
|
|
|
onClicked: {
|
2025-01-10 15:28:42 +01:00
|
|
|
validated();
|
2025-01-13 20:51:29 +01:00
|
|
|
PopupUtils.close(dialog);
|
2019-09-20 21:29:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: cancelButton
|
2025-01-10 15:28:42 +01:00
|
|
|
|
2019-09-20 21:29:39 +02:00
|
|
|
text: i18n.tr("Cancel")
|
|
|
|
onClicked: {
|
2025-01-10 15:28:42 +01:00
|
|
|
canceled();
|
2025-01-13 20:51:29 +01:00
|
|
|
PopupUtils.close(dialog);
|
2019-09-20 21:29:39 +02:00
|
|
|
}
|
|
|
|
}
|
2025-01-10 15:28:42 +01:00
|
|
|
|
2019-09-20 21:29:39 +02:00
|
|
|
}
|