1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-01-26 00:26:40 +00:00
UTPass/qml/dialogs/SimpleValidationDialog.qml

42 lines
770 B
QML
Raw Normal View History

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 {
id: dialog
2019-09-20 21:29:39 +02:00
property string text
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
text: dialog.text
2019-09-20 21:29:39 +02:00
}
Button {
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();
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();
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
}