fix QML examples to work with Qt 5.9

This commit is contained in:
polos 2017-06-21 21:13:29 +02:00
parent a7957a1289
commit 80de7638fc
13 changed files with 53 additions and 53 deletions

View file

@ -1,7 +1,7 @@
// for (c) please see COPYING.txt
import QtQuick 2.0
import "ext"
import "ext/" as Ext
import EQL5 1.0
Rectangle {
@ -31,7 +31,7 @@ Rectangle {
Repeater {
model: 9
TicTac {
Ext.TicTac {
width: board.width / 3
height: board.height / 3
@ -44,17 +44,17 @@ Rectangle {
spacing: 4
anchors.horizontalCenter: parent.horizontalCenter
Button {
Ext.Button {
text: "Hard"
pressed: game.difficulty == 10
onClicked: { game.difficulty = 10 }
}
Button {
Ext.Button {
text: "Moderate"
pressed: game.difficulty == 8
onClicked: { game.difficulty = 8 }
}
Button {
Ext.Button {
text: "Easy"
pressed: game.difficulty == 2
onClicked: { game.difficulty = 2 }

View file

@ -36,7 +36,7 @@
(with-qml-file ("qml/palindrome.qml")
"import QtQuick 2.0"
"import 'ext/'"
"import 'ext/' as Ext"
(qml "Rectangle"
"width: 527; height: 527"
"color: 'black'"
@ -59,11 +59,11 @@
(let ((target 0))
(mapc (lambda (from-xy to-xy)
(incf target)
(qml "PalindromeAnimation { target: img~D; property: 'x'; from: ~D; to: ~D }"
(qml "Ext.PalindromeAnimation { target: img~D; property: 'x'; from: ~D; to: ~D }"
target
(* 31 (first from-xy))
(* 31 (first to-xy)))
(qml "PalindromeAnimation { target: img~D; property: 'y'; from: ~D; to: ~D }"
(qml "Ext.PalindromeAnimation { target: img~D; property: 'y'; from: ~D; to: ~D }"
target
(* 31 (second from-xy))
(* 31 (second to-xy))))

View file

@ -7,14 +7,14 @@
(with-qml-file ("qml/palindrome.qml")
"import QtQuick 2.0"
"import 'ext/'"
"import 'ext/' as Ext"
(qml "Rectangle"
"width: 527; height: 527"
"color: 'black'"
(let ((num 0))
(mapc (lambda (char xy)
(incf num)
(qml "PalindromeImage { objectName: 'img~D'; source: 'img/~A.png'; x: ~D; y: ~D }"
(qml "Ext.PalindromeImage { objectName: 'img~D'; source: 'img/~A.png'; x: ~D; y: ~D }"
num
(image-of-char char)
(* 31 (first xy))

View file

@ -1,34 +1,34 @@
// THIS FILE IS GENERATED
import QtQuick 2.0
import 'ext/'
import 'ext/' as Ext
Rectangle {
width: 527; height: 527
color: 'black'
PalindromeImage { objectName: 'img1'; source: 'img/R.png'; x: 186; y: 186 }
PalindromeImage { objectName: 'img2'; source: 'img/O.png'; x: 217; y: 186 }
PalindromeImage { objectName: 'img3'; source: 'img/T.png'; x: 248; y: 186 }
PalindromeImage { objectName: 'img4'; source: 'img/A.png'; x: 279; y: 186 }
PalindromeImage { objectName: 'img5'; source: 'img/S.png'; x: 310; y: 186 }
PalindromeImage { objectName: 'img6'; source: 'img/O.png'; x: 186; y: 217 }
PalindromeImage { objectName: 'img7'; source: 'img/P.png'; x: 217; y: 217 }
PalindromeImage { objectName: 'img8'; source: 'img/E.png'; x: 248; y: 217 }
PalindromeImage { objectName: 'img9'; source: 'img/R.png'; x: 279; y: 217 }
PalindromeImage { objectName: 'img10'; source: 'img/A.png'; x: 310; y: 217 }
PalindromeImage { objectName: 'img11'; source: 'img/T.png'; x: 186; y: 248 }
PalindromeImage { objectName: 'img12'; source: 'img/E.png'; x: 217; y: 248 }
PalindromeImage { objectName: 'img13'; source: 'img/N.png'; x: 248; y: 248 }
PalindromeImage { objectName: 'img14'; source: 'img/E.png'; x: 279; y: 248 }
PalindromeImage { objectName: 'img15'; source: 'img/T.png'; x: 310; y: 248 }
PalindromeImage { objectName: 'img16'; source: 'img/A.png'; x: 186; y: 279 }
PalindromeImage { objectName: 'img17'; source: 'img/R.png'; x: 217; y: 279 }
PalindromeImage { objectName: 'img18'; source: 'img/E.png'; x: 248; y: 279 }
PalindromeImage { objectName: 'img19'; source: 'img/P.png'; x: 279; y: 279 }
PalindromeImage { objectName: 'img20'; source: 'img/O.png'; x: 310; y: 279 }
PalindromeImage { objectName: 'img21'; source: 'img/S.png'; x: 186; y: 310 }
PalindromeImage { objectName: 'img22'; source: 'img/A.png'; x: 217; y: 310 }
PalindromeImage { objectName: 'img23'; source: 'img/T.png'; x: 248; y: 310 }
PalindromeImage { objectName: 'img24'; source: 'img/O.png'; x: 279; y: 310 }
PalindromeImage { objectName: 'img25'; source: 'img/R.png'; x: 310; y: 310 }
Ext.PalindromeImage { objectName: 'img1'; source: 'img/R.png'; x: 186; y: 186 }
Ext.PalindromeImage { objectName: 'img2'; source: 'img/O.png'; x: 217; y: 186 }
Ext.PalindromeImage { objectName: 'img3'; source: 'img/T.png'; x: 248; y: 186 }
Ext.PalindromeImage { objectName: 'img4'; source: 'img/A.png'; x: 279; y: 186 }
Ext.PalindromeImage { objectName: 'img5'; source: 'img/S.png'; x: 310; y: 186 }
Ext.PalindromeImage { objectName: 'img6'; source: 'img/O.png'; x: 186; y: 217 }
Ext.PalindromeImage { objectName: 'img7'; source: 'img/P.png'; x: 217; y: 217 }
Ext.PalindromeImage { objectName: 'img8'; source: 'img/E.png'; x: 248; y: 217 }
Ext.PalindromeImage { objectName: 'img9'; source: 'img/R.png'; x: 279; y: 217 }
Ext.PalindromeImage { objectName: 'img10'; source: 'img/A.png'; x: 310; y: 217 }
Ext.PalindromeImage { objectName: 'img11'; source: 'img/T.png'; x: 186; y: 248 }
Ext.PalindromeImage { objectName: 'img12'; source: 'img/E.png'; x: 217; y: 248 }
Ext.PalindromeImage { objectName: 'img13'; source: 'img/N.png'; x: 248; y: 248 }
Ext.PalindromeImage { objectName: 'img14'; source: 'img/E.png'; x: 279; y: 248 }
Ext.PalindromeImage { objectName: 'img15'; source: 'img/T.png'; x: 310; y: 248 }
Ext.PalindromeImage { objectName: 'img16'; source: 'img/A.png'; x: 186; y: 279 }
Ext.PalindromeImage { objectName: 'img17'; source: 'img/R.png'; x: 217; y: 279 }
Ext.PalindromeImage { objectName: 'img18'; source: 'img/E.png'; x: 248; y: 279 }
Ext.PalindromeImage { objectName: 'img19'; source: 'img/P.png'; x: 279; y: 279 }
Ext.PalindromeImage { objectName: 'img20'; source: 'img/O.png'; x: 310; y: 279 }
Ext.PalindromeImage { objectName: 'img21'; source: 'img/S.png'; x: 186; y: 310 }
Ext.PalindromeImage { objectName: 'img22'; source: 'img/A.png'; x: 217; y: 310 }
Ext.PalindromeImage { objectName: 'img23'; source: 'img/T.png'; x: 248; y: 310 }
Ext.PalindromeImage { objectName: 'img24'; source: 'img/O.png'; x: 279; y: 310 }
Ext.PalindromeImage { objectName: 'img25'; source: 'img/R.png'; x: 310; y: 310 }
}

View file

@ -1,16 +1,16 @@
import QtQuick 2.0
import "../ext/"
import "../ext/" as Ext
Image {
Behavior on x {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 150
easing.type: Easing.InQuart
}
}
Behavior on y {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 150
easing.type: Easing.InQuart
}

View file

@ -1,18 +1,18 @@
import QtQuick 2.0
import "../ext/"
import "../ext/" as Ext
Image {
id: box2
Behavior on x {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 150
easing.type: Easing.InQuart
}
}
Behavior on y {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 150
easing.type: Easing.InQuart
}
@ -20,7 +20,7 @@ Image {
// final animation
SequentialAnimationExt {
Ext.SequentialAnimation {
objectName: "wiggle_box"
loops: 3

View file

@ -1,18 +1,18 @@
import QtQuick 2.0
import "../ext/"
import "../ext/" as Ext
Image {
id: player
Behavior on x {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 120
easing.type: Easing.InOutSine
}
}
Behavior on y {
NumberAnimationExt {
Ext.NumberAnimation {
duration: 120
easing.type: Easing.InOutSine
}
@ -20,7 +20,7 @@ Image {
// final animation
RotationAnimationExt {
Ext.RotationAnimation {
objectName: "rotate_player"
target: player
property: "rotation"

View file

@ -1,7 +1,7 @@
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import "ext/"
import "ext/" as Ext
import EQL5 1.0
Rectangle {
@ -51,7 +51,7 @@ Rectangle {
// level change animations
ScaleAnimatorExt {
Ext.ScaleAnimator {
objectName: "zoom_board_out"
target: board
from: 0.8
@ -59,7 +59,7 @@ Rectangle {
duration: 250
}
ScaleAnimatorExt {
Ext.ScaleAnimator {
objectName: "zoom_board_in"
target: board
from: 0.0

View file

@ -3,11 +3,11 @@ BUILD
You'll need:
Qt 5.5 (for module :webkit)
Qt 5.7+ (for module :webengine)
Qt 5.8+ (for module :webengine)
- compile module :webkit with Qt 5.5
- compile lib/* with Qt 5.5
- compile EQL (including module :webengine) with Qt 5.7+
- compile ./lib/* with Qt 5.5
- compile EQL5 (including module :webengine) with Qt 5.8+