-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStepsView.qml
33 lines (24 loc) · 889 Bytes
/
StepsView.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
import "js/constants.js" as constants;
import "StepDelegate.qml";
GridView {
id: stepView;
cellWidth: 605;
cellHeight: 170;
focus: true;
clip: true;
delegate: StepDelegate {}
model: ListModel { id: stepModel; }
function loadData(data) {
stepModel.reset();
log("LoadSteps!!!")
var catalog = data;
if(catalog != null){
log("JsonLoads!!!")
catalog.forEach(function (catalogItem) {
log(catalogItem["text"] + " " + catalogItem["img"]);
stepModel.append( { text: catalogItem["text"],
img: catalogItem["img"] } );
});
}
}
}