diff --git a/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp b/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp +++ b/examples/M-modules/quick/Tic-Tac-Toe/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/item-model/qml-lisp.lisp b/examples/M-modules/quick/item-model/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/item-model/qml-lisp.lisp +++ b/examples/M-modules/quick/item-model/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/painted-item/qml-lisp.lisp b/examples/M-modules/quick/painted-item/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/painted-item/qml-lisp.lisp +++ b/examples/M-modules/quick/painted-item/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/palindrome-2/qml-lisp.lisp b/examples/M-modules/quick/palindrome-2/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/palindrome-2/qml-lisp.lisp +++ b/examples/M-modules/quick/palindrome-2/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/qml-lisp/qml-lisp.lisp b/examples/M-modules/quick/qml-lisp/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/qml-lisp/qml-lisp.lisp +++ b/examples/M-modules/quick/qml-lisp/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/sokoban/qml-lisp.lisp b/examples/M-modules/quick/sokoban/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/sokoban/qml-lisp.lisp +++ b/examples/M-modules/quick/sokoban/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name) diff --git a/examples/M-modules/quick/table-view/qml-lisp.lisp b/examples/M-modules/quick/table-view/qml-lisp.lisp index 1fc2c05..c3781ac 100644 --- a/examples/M-modules/quick/table-view/qml-lisp.lisp +++ b/examples/M-modules/quick/table-view/qml-lisp.lisp @@ -1,6 +1,7 @@ ;;; ;;; * enables QML to call Lisp functions ;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set) +;;; * allows to call QML methods from Lisp (needs 'objectName' to be set) ;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set) ;;; @@ -13,6 +14,7 @@ #:children #:find-quick-item #:js + #:qml-call #:qml-get #:qml-set #:qml-set-all @@ -113,6 +115,12 @@ (|clearComponentCache| (|engine| *quick-view*)) (|setSource| *quick-view* (|source| *quick-view*))) +;;; call QML methods + +(defun qml-call (item/name method-name &rest arguments) + ;; QFUN+ comes in handy here + (apply 'qfun+ (quick-item item/name) method-name arguments)) + ;;; get/set QQmlProperty (defun qml-get (item/name property-name)