-
Notifications
You must be signed in to change notification settings - Fork 11
/
Home.qml
91 lines (77 loc) · 1.97 KB
/
Home.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
import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import components 1.0 as Components
Item {
id: root
property string organism
signal selected(var selectedComponent)
Rectangle {
anchors.fill: parent
color: "#55ADAB"
z: 0
}
Text {
id: headerText
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 90
}
font.pointSize: 70
color: "#ffffff"
text: "Human Body Atlas"
}
Text {
id: subtitleText
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 210
}
font.pointSize: 20
color: "#ffffff"
text: "Know how your body works"
}
ListView {
id: organsListView
anchors {
top: parent.top
topMargin: 350
left: parent.left
leftMargin: 260
horizontalCenter: parent.horizontalCenter
}
orientation: ListView.Horizontal
spacing: 30
delegate: Item {
height: 150
width: 150
Image {
id: icon
anchors.fill: parent
source: image
}
MouseArea {
anchors.fill: parent
onClicked: {
root.selected(componentNameRole)
}
}
Text {
text: nameRole
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 160
}
color: "white"
font.bold: true
}
}
}
onOrganismChanged: {
var organSystemsModel = Qt.createQmlObject("import " + organism + " 1.0; OrganSystems {}", root)
organsListView.model = organSystemsModel
}
}