-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestPage.qml
114 lines (84 loc) · 2.35 KB
/
TestPage.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick.Controls.Material 2.1
import QtQuick.Window 2.2
Rectangle {
Connections{
target: ark
onUpChildVal: {
}
}
function addTab(qmlString, title)
{
}
function addCustomPage(qmlString)
{
console.log("adding custom page: ");
//console.log(qmlString);
viewSwipe.addPage(viewSwipe.createPage(qmlString));
}
function iterateChildren()
{
viewSwipe.iterateChildren();
}
function upChild(box, card, value)
{
viewSwipe.upChild(box, card, value);
}
color: "#9E9E9E"
property int currIndex: 0
SwipeView{
id: viewSwipe
width: parent.width
height: parent.height * .7
anchors.top: parent.top
anchors.topMargin: parent.height * .05
anchors.left: parent.left
currentIndex: 0
property int childCount: 0
Component.onCompleted: {
}
function addPage(page){
addItem(page);
childCount += 1;
page.visible = true;
}
function createPage(qmlString){
var page = Qt.createQmlObject(qmlString, viewSwipe, "whatevs.txt");
return page;
}
function iterateChildren()
{
for (var i = 0; i < childCount; i++)
{
console.log(viewSwipe.itemAt(i).token);
}
}
function upChild(box, card, value)
{
for (var i = 0; i < childCount; i++)
{
if (viewSwipe.itemAt(i).token === box){
var pager = viewSwipe.itemAt(i);
console.log(pager.count);
for (var j = 0; j < pager.count; j++)
{
console.log(pager.itemAt(j).cardToken);
}
}
}
}
}
PageIndicator{
id: erer
count: viewSwipe.count
currentIndex: viewSwipe.currentIndex
interactive: true
onCurrentIndexChanged: viewSwipe.currentIndex = currentIndex
width: parent.width
height: parent.height * .1
anchors.top: viewSwipe.bottom
anchors.topMargin: parent.height * .05
anchors.left: parent.left
}
}