diff --git a/examples/M-modules/quick/Tic-Tac-Toe/README.txt b/examples/M-modules/quick/Tic-Tac-Toe/README.txt index 7891531..6e7fa2b 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/README.txt +++ b/examples/M-modules/quick/Tic-Tac-Toe/README.txt @@ -89,6 +89,6 @@ same name. QML Example: Item { - id: myItem - objectName: "myItem" + id: my_item + objectName: "my_item" } diff --git a/examples/M-modules/quick/Tic-Tac-Toe/game-logic.lisp b/examples/M-modules/quick/Tic-Tac-Toe/game-logic.lisp index b1bcb6e..a0b13ae 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/game-logic.lisp +++ b/examples/M-modules/quick/Tic-Tac-Toe/game-logic.lisp @@ -47,7 +47,7 @@ (return-from winner t))) (defun restart-game () - (qml-set "messageDisplay" "visible" nil) + (qml-set "message_display" "visible" nil) (qml-set "game" "running" t) (dotimes (i 9) (set-cell-state i ""))) @@ -129,6 +129,6 @@ (make-move choice "O"))))) (defun game-finished (message) - (qml-set "messageDisplay" "text" message) - (qml-set "messageDisplay" "visible" t) + (qml-set "message_display" "text" message) + (qml-set "message_display" "visible" t) (qml-set "game" "running" nil)) diff --git a/examples/M-modules/quick/Tic-Tac-Toe/qml/ext/Button.qml b/examples/M-modules/quick/Tic-Tac-Toe/qml/ext/Button.qml index 50c3f1a..9fa33af 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/qml/ext/Button.qml +++ b/examples/M-modules/quick/Tic-Tac-Toe/qml/ext/Button.qml @@ -11,7 +11,7 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 + width: button_label.width + 20; height: button_label.height + 6 border { width: 1; color: Qt.darker(container.color) } radius: 8 color: "lightgray" @@ -34,8 +34,8 @@ Rectangle { } Text { - id: buttonLabel - objectName: "buttonLabel" + id: button_label + objectName: "button_label" anchors.centerIn: container text: container.text font.pixelSize: 14 diff --git a/examples/M-modules/quick/Tic-Tac-Toe/qml/tic-tac-toe.qml b/examples/M-modules/quick/Tic-Tac-Toe/qml/tic-tac-toe.qml index 0730506..89dd4e0 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/qml/tic-tac-toe.qml +++ b/examples/M-modules/quick/Tic-Tac-Toe/qml/tic-tac-toe.qml @@ -13,8 +13,8 @@ Rectangle { property int difficulty: 10 // chance it will actually think Image { - id: boardImage - objectName: "boardImage" + id: board_image + objectName: "board_image" source: "../pics/board.png" } @@ -25,7 +25,7 @@ Rectangle { Grid { id: board objectName: "board" - width: boardImage.width; height: boardImage.height + width: board_image.width; height: board_image.height columns: 3 Repeater { @@ -63,8 +63,8 @@ Rectangle { } Text { - id: messageDisplay - objectName: "messageDisplay" + id: message_display + objectName: "message_display" anchors.centerIn: parent color: "blue" style: Text.Outline; styleColor: "white" @@ -72,7 +72,7 @@ Rectangle { visible: false Timer { - running: messageDisplay.visible + running: message_display.visible onTriggered: { Lisp.call("restart-game") } } } diff --git a/examples/M-modules/quick/palindrome-1/generate-qml.lisp b/examples/M-modules/quick/palindrome-1/generate-qml.lisp index 4428057..2a207d0 100644 --- a/examples/M-modules/quick/palindrome-1/generate-qml.lisp +++ b/examples/M-modules/quick/palindrome-1/generate-qml.lisp @@ -42,7 +42,7 @@ "color: 'black'" (let ((n 0)) (dolist (char *chars*) - (qml "Image { id: img~A; source: 'img/~A.png' }" + (qml "Image { id: img~D; source: 'img/~A.png' }" (incf n) (image-of-char char)))) (qml "SequentialAnimation" @@ -59,11 +59,11 @@ (let ((target 0)) (mapc (lambda (from-xy to-xy) (incf target) - (qml "PalindromeAnimation { target: img~A; property: 'x'; from: ~A; to: ~A }" + (qml "PalindromeAnimation { target: img~D; property: 'x'; from: ~D; to: ~D }" target (* 31 (first from-xy)) (* 31 (first to-xy))) - (qml "PalindromeAnimation { target: img~A; property: 'y'; from: ~A; to: ~A }" + (qml "PalindromeAnimation { target: img~D; property: 'y'; from: ~D; to: ~D }" target (* 31 (second from-xy)) (* 31 (second to-xy)))) diff --git a/examples/M-modules/quick/palindrome-2/generate-qml.lisp b/examples/M-modules/quick/palindrome-2/generate-qml.lisp index 1d1aba6..d913939 100644 --- a/examples/M-modules/quick/palindrome-2/generate-qml.lisp +++ b/examples/M-modules/quick/palindrome-2/generate-qml.lisp @@ -14,7 +14,7 @@ (let ((num 0)) (mapc (lambda (char xy) (incf num) - (qml "PalindromeImage { objectName: 'img~A'; source: 'img/~A.png'; x: ~D; y: ~D }" + (qml "PalindromeImage { objectName: 'img~D'; source: 'img/~A.png'; x: ~D; y: ~D }" num (image-of-char char) (* 31 (first xy)) diff --git a/examples/M-modules/quick/qml-lisp/README.txt b/examples/M-modules/quick/qml-lisp/README.txt index 36bd246..3004db5 100644 --- a/examples/M-modules/quick/qml-lisp/README.txt +++ b/examples/M-modules/quick/qml-lisp/README.txt @@ -94,7 +94,7 @@ same name. QML Example: Item { - id: myItem - objectName: "myItem" + id: my_item + objectName: "my_item" } diff --git a/examples/M-modules/quick/sokoban/qml/items/box2.qml b/examples/M-modules/quick/sokoban/qml/items/box2.qml index 9b3505d..6c3baa9 100644 --- a/examples/M-modules/quick/sokoban/qml/items/box2.qml +++ b/examples/M-modules/quick/sokoban/qml/items/box2.qml @@ -21,7 +21,7 @@ Image { // final animation SequentialAnimationExt { - objectName: "wiggle" + objectName: "wiggle_box" loops: 5 RotationAnimation { diff --git a/examples/M-modules/quick/sokoban/qml/items/player.qml b/examples/M-modules/quick/sokoban/qml/items/player.qml index d12b090..e39396d 100644 --- a/examples/M-modules/quick/sokoban/qml/items/player.qml +++ b/examples/M-modules/quick/sokoban/qml/items/player.qml @@ -2,6 +2,8 @@ import QtQuick 2.0 import "../ext/" Image { + id: player + Behavior on x { NumberAnimationExt { duration: 120 @@ -15,5 +17,15 @@ Image { easing.type: Easing.InOutSine } } -} + // final animation + + RotationAnimation { + objectName: "rotate_player" + target: player + property: "rotation" + from: 0; to: 360 + duration: 600 + loops: 5 + } +} diff --git a/examples/M-modules/quick/sokoban/qml/sokoban.qml b/examples/M-modules/quick/sokoban/qml/sokoban.qml index dedb018..f7582ae 100644 --- a/examples/M-modules/quick/sokoban/qml/sokoban.qml +++ b/examples/M-modules/quick/sokoban/qml/sokoban.qml @@ -19,7 +19,7 @@ Rectangle { // level change animations ScaleAnimatorExt { - objectName: "zoomOut" + objectName: "zoom_board_out" target: root from: 0.8 to: 0 @@ -27,7 +27,7 @@ Rectangle { } ScaleAnimatorExt { - objectName: "zoomIn" + objectName: "zoom_board_in" target: root from: 0 to: 0.8 diff --git a/examples/M-modules/quick/sokoban/sokoban.lisp b/examples/M-modules/quick/sokoban/sokoban.lisp index 920b853..2efa5d5 100644 --- a/examples/M-modules/quick/sokoban/sokoban.lisp +++ b/examples/M-modules/quick/sokoban/sokoban.lisp @@ -136,9 +136,9 @@ *level*)))))) (when (/= level *level*) (setf *level* level) - (queued (qml-set "zoomOut" "running" t) ; start animation + (queued (qml-set "zoom_board_out" "running" t) (set-maze) - (qml-set "zoomIn" "running" t)))) ; start animation + (qml-set "zoom_board_in" "running" t)))) *level*) (defun key-pressed (object event) @@ -229,7 +229,8 @@ t) (defun final-animation () - (queued (qml-set-all "wiggle" "running" t) ; start animation + (qml-set "rotate_player" "running" t) + (queued (qml-set-all "wiggle_box" "running" t) (qml-set-all "object2" "rotation" 0))) (defun run ()