mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-05 18:20:33 -08:00
36 lines
726 B
QML
36 lines
726 B
QML
import QtQuick 2.15
|
|
|
|
Item {
|
|
id: dialogs
|
|
objectName: "dialogs"
|
|
anchors.fill: parent
|
|
|
|
Loader {
|
|
id: loader
|
|
anchors.centerIn: parent
|
|
}
|
|
|
|
function message(text) {
|
|
if (Lisp.call("qml:mobile-p")) {
|
|
loader.source = "MessageMobile.qml"
|
|
} else {
|
|
loader.source = "Message.qml"
|
|
}
|
|
loader.item.text = text
|
|
main.showKeyboard(false)
|
|
loader.item.open()
|
|
}
|
|
|
|
function confirm(title, text, callback) {
|
|
if (Lisp.call("qml:mobile-p")) {
|
|
loader.source = "ConfirmMobile.qml"
|
|
} else {
|
|
loader.source = "Confirm.qml"
|
|
}
|
|
loader.item.title = title
|
|
loader.item.text = text
|
|
loader.item.callback = callback
|
|
main.showKeyboard(false)
|
|
loader.item.open()
|
|
}
|
|
}
|