mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-15 14:51:14 -08:00
add Qt6 version of examples 'palindrome', 'swank-server', 'tilt-sensor'
This commit is contained in:
parent
b65922eca1
commit
d98de99c57
11 changed files with 400 additions and 1 deletions
35
examples/Qt6/palindrome/lisp/helper/generate-qml.lisp
Normal file
35
examples/Qt6/palindrome/lisp/helper/generate-qml.lisp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
;;; generates QML file for animation
|
||||
|
||||
(load "../package")
|
||||
(load "../definitions")
|
||||
(load "../utils")
|
||||
(load "with-qml-file")
|
||||
|
||||
(in-package :pal)
|
||||
|
||||
(with-qml-file ("../../qml/main.qml")
|
||||
"import QtQuick"
|
||||
"import 'ext/' as Ext"
|
||||
(qml "Rectangle"
|
||||
"width: 527; height: 527"
|
||||
"color: 'black'"
|
||||
(qml "Rectangle"
|
||||
"x: scale * (width - 527) / 2"
|
||||
"y: scale * (height - 527) / 2"
|
||||
"width: parent.width"
|
||||
"height: parent.height"
|
||||
"color: 'black'"
|
||||
"scale: Math.min(width, height) / 527"
|
||||
""
|
||||
(let ((num 0))
|
||||
(mapc (lambda (char xy)
|
||||
(incf num)
|
||||
(qml "Ext.PalindromeImage { objectName: 'img~D'; source: 'img/~A.png'; x: ~D; y: ~D }"
|
||||
num
|
||||
(image-of-char char)
|
||||
(* 31 (first xy))
|
||||
(* 31 (second xy))))
|
||||
*chars* (first *move-to-positions*))))))
|
||||
|
||||
(qlater 'qquit)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue