mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
revert latest commit (crashes on iOS)
This commit is contained in:
parent
7e49027c57
commit
608c17f121
8 changed files with 2 additions and 123 deletions
|
|
@ -1,9 +1,5 @@
|
||||||
(in-package :app)
|
(in-package :app)
|
||||||
|
|
||||||
#+mobile
|
#+mobile
|
||||||
(qsingle-shot 1000 (lambda ()
|
(when qml::*remote-ip*
|
||||||
(when qml::*remote-ip*
|
(qsingle-shot 1000 'auto-reload-qml))
|
||||||
(qjs |message| ui:*dialogs*
|
|
||||||
(format nil "<qt>QML auto reload enabled from: <br><br>~A<br><br>Ensure <b>web-server.sh</b> is running.</qt>"
|
|
||||||
qml::*remote-ip*))
|
|
||||||
(auto-reload-qml))))
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
(defpackage ui
|
(defpackage ui
|
||||||
(:use :cl :qml)
|
(:use :cl :qml)
|
||||||
(:export
|
(:export
|
||||||
#:*dialogs*
|
|
||||||
#:*flick-output*
|
#:*flick-output*
|
||||||
#:*history-back*
|
#:*history-back*
|
||||||
#:*history-forward*
|
#:*history-forward*
|
||||||
|
|
@ -13,7 +12,6 @@
|
||||||
|
|
||||||
(in-package :ui)
|
(in-package :ui)
|
||||||
|
|
||||||
(defparameter *dialogs* "dialogs")
|
|
||||||
(defparameter *flick-output* "flick_output")
|
(defparameter *flick-output* "flick_output")
|
||||||
(defparameter *history-back* "history_back")
|
(defparameter *history-back* "history_back")
|
||||||
(defparameter *history-forward* "history_forward")
|
(defparameter *history-forward* "history_forward")
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
title: "LQML"
|
|
||||||
standardButtons: Dialog.Save | Dialog.Cancel
|
|
||||||
|
|
||||||
property alias text: message.text
|
|
||||||
property string callback
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: message
|
|
||||||
width: parent.width // without width word wrap won't work
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
}
|
|
||||||
|
|
||||||
onAccepted: Lisp.call(callback, true)
|
|
||||||
onRejected: Lisp.call(callback, false)
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
title: "Confirm"
|
|
||||||
font.pixelSize: 18
|
|
||||||
modal: true
|
|
||||||
standardButtons: Dialog.Save | Dialog.Cancel
|
|
||||||
|
|
||||||
property alias text: message.text
|
|
||||||
property string callback
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: message
|
|
||||||
width: parent.width // without width word wrap won't work
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: 18
|
|
||||||
}
|
|
||||||
|
|
||||||
onAccepted: Lisp.call(callback, true)
|
|
||||||
onRejected: Lisp.call(callback, false)
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: dialogs
|
|
||||||
objectName: "dialogs"
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Loader {
|
|
||||||
id: loader
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
function message(text) {
|
|
||||||
if ((Qt.platform.os === "android") ||
|
|
||||||
(Qt.platform.os === "ios")) {
|
|
||||||
loader.source = "MessageMobile.qml"
|
|
||||||
} else {
|
|
||||||
loader.source = "Message.qml"
|
|
||||||
}
|
|
||||||
loader.item.text = text
|
|
||||||
loader.item.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
function confirm(title, text, callback) {
|
|
||||||
if ((Qt.platform.os === "android") ||
|
|
||||||
(Qt.platform.os === "ios")) {
|
|
||||||
loader.source = "ConfirmMobile.qml"
|
|
||||||
} else {
|
|
||||||
loader.source = "Confirm.qml"
|
|
||||||
}
|
|
||||||
loader.item.title = title
|
|
||||||
loader.item.text = text
|
|
||||||
loader.item.callback = callback
|
|
||||||
loader.item.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Dialogs 1.3
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
title: "Info"
|
|
||||||
standardButtons: Dialog.Ok
|
|
||||||
|
|
||||||
property alias text: message.text
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: message
|
|
||||||
width: parent.width // without width word wrap won't work
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
|
|
||||||
Dialog {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
title: "Info"
|
|
||||||
font.pixelSize: 18
|
|
||||||
modal: true
|
|
||||||
standardButtons: Dialog.Ok
|
|
||||||
|
|
||||||
property alias text: message.text
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: message
|
|
||||||
width: parent.width // without width word wrap won't work
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
font.pixelSize: 18
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,6 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import ".ext/" as Ext // for single file auto reload (development)
|
import ".ext/" as Ext // for single file auto reload (development)
|
||||||
//import "ext/" as Ext // release version
|
//import "ext/" as Ext // release version
|
||||||
import 'ext/dialogs' as Dlg
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: main
|
id: main
|
||||||
|
|
@ -46,6 +45,4 @@ Rectangle {
|
||||||
FontLoader { id: fontIcons; source: "fonts/fontawesome-webfont.ttf" }
|
FontLoader { id: fontIcons; source: "fonts/fontawesome-webfont.ttf" }
|
||||||
FontLoader { id: fontHack; source: "fonts/Hack-Regular.ttf" }
|
FontLoader { id: fontHack; source: "fonts/Hack-Regular.ttf" }
|
||||||
FontLoader { id: fontHackBold; source: "fonts/Hack-Bold.ttf" }
|
FontLoader { id: fontHackBold; source: "fonts/Hack-Bold.ttf" }
|
||||||
|
|
||||||
Dlg.Dialogs {} // modal dialogs
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue