-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplicationsPage.qml
More file actions
80 lines (78 loc) · 3.23 KB
/
ApplicationsPage.qml
File metadata and controls
80 lines (78 loc) · 3.23 KB
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
import bb.cascades 1.4
import "../Elements"
NavigationPane {
id: nav
Page {
titleBar: TitleBar {
title: qsTr("Applications")
acceptAction: ActionItem {
title: qsTr("Refresh")
}
}
Container {
ListView {
dataModel: GroupDataModel {
id: applicationsDataModel
sortingKeys: [ "name" ]
sortedAscending: true
grouping: ItemGrouping.None
}
listItemComponents: ListItemComponent {
type: "item"
Container {
TwoLineListContainer {
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
ImageView {
imageSource: "asset:///images/actions/custom/ic_swarm.png"
verticalAlignment: VerticalAlignment.Center
}
Container {
layoutProperties: StackLayoutProperties {
spaceQuota: 1
}
verticalAlignment: VerticalAlignment.Center
Label {
text: ListItemData.application_name
textStyle.fontSize: FontSize.Large
bottomMargin: 0
}
Label {
text: ListItemData.company_name + "/" + ListItemData.environment_name
verticalAlignment: VerticalAlignment.Center
textStyle.fontSize: FontSize.Small
textStyle.color: Color.Gray
topMargin: ui.du(0)
}
}
ImageView {
imageSource: "asset:///images/actions/custom/ic_next.png"
verticalAlignment: VerticalAlignment.Center
}
}
Divider {}
}
}
onCreationCompleted: {
applicationsDataModel.insertList(
giantswarm.getAllApplications().map(function (application) {
return {
application_name: application["application"],
company_name: application["company"],
environment_name: application["environment"]
};
})
);
}
onTriggered: {
nav.push(Qt.createComponent(
"ApplicationPage.qml"
).createObject(nav, applicationsDataModel.data(
indexPath
)));
}
}
}
}
}