8
property int duration: 50
10
property int targetTransitionsDone
11
property int displaceTransitionsDone
13
property var targetTrans_items: new Object()
14
property var targetTrans_targetIndexes: new Array()
15
property var targetTrans_targetItems: new Array()
17
property var displacedTrans_items: new Object()
18
property var displacedTrans_targetIndexes: new Array()
19
property var displacedTrans_targetItems: new Array()
21
// for QQmlListProperty types
22
function copyList(propList) {
23
var temp = new Array()
24
for (var i=0; i<propList.length; i++)
25
temp.push(propList[i])
29
function checkPos(x, y, name) {
30
if (Qt.point(x, y) == targetItems_transitionFrom)
31
model_targetItems_transitionFrom.addItem(name, "")
32
if (Qt.point(x, y) == displacedItems_transitionVia)
33
model_displacedItems_transitionVia.addItem(name, "")
38
enabled: enableAddTransition
43
root.targetTrans_items[targetTransition.ViewTransition.item.nameData] = targetTransition.ViewTransition.index
44
root.targetTrans_targetIndexes.push(targetTransition.ViewTransition.targetIndexes)
45
root.targetTrans_targetItems.push(root.copyList(targetTransition.ViewTransition.targetItems))
49
NumberAnimation { properties: "x"; from: targetItems_transitionFrom.x; duration: root.duration }
50
NumberAnimation { properties: "y"; from: targetItems_transitionFrom.y; duration: root.duration }
53
ScriptAction { script: root.targetTransitionsDone += 1 }
63
root.displacedTrans_items[displaced.ViewTransition.item.nameData] = displaced.ViewTransition.index
64
root.displacedTrans_targetIndexes.push(displaced.ViewTransition.targetIndexes)
65
root.displacedTrans_targetItems.push(root.copyList(displaced.ViewTransition.targetItems))
69
NumberAnimation { properties: "x"; duration: root.duration; to: displacedItems_transitionVia.x }
70
NumberAnimation { properties: "y"; duration: root.duration; to: displacedItems_transitionVia.y }
72
NumberAnimation { properties: "x,y"; duration: root.duration }
74
ScriptAction { script: root.displaceTransitionsDone += 1 }
82
property int count: children.length - 1 // omit Repeater
85
width: 400; height: 400
87
objectName: "repeater"
89
property string nameData: name
96
Text { objectName: "name"; text: name }
97
Text { text: parent.parent.y }
99
onXChanged: root.checkPos(x, y, name)
100
onYChanged: root.checkPos(x, y, name)
104
add: targetTransition
111
property int count: children.length - 1 // omit Repeater
114
width: 400; height: 400
116
objectName: "repeater"
118
property string nameData: name
119
objectName: "wrapper"
125
Text { objectName: "name"; text: name }
126
Text { text: parent.parent.y }
128
onXChanged: root.checkPos(x, y, name)
129
onYChanged: root.checkPos(x, y, name)
133
add: targetTransition
140
property int count: children.length - 1 // omit Repeater
143
width: 400; height: 400
145
objectName: "repeater"
147
property string nameData: name
148
objectName: "wrapper"
154
Text { objectName: "name"; text: name }
155
Text { text: parent.parent.y }
158
onXChanged: root.checkPos(x, y, name)
159
onYChanged: root.checkPos(x, y, name)
163
add: targetTransition
170
property int count: children.length - 1 // omit Repeater
173
width: 400; height: 400
175
objectName: "repeater"
177
property string nameData: name
178
objectName: "wrapper"
184
Text { objectName: "name"; text: name }
185
Text { text: parent.parent.x + " " + parent.parent.y }
187
onXChanged: root.checkPos(x, y, name)
188
onYChanged: root.checkPos(x, y, name)
192
add: targetTransition