-
Notifications
You must be signed in to change notification settings - Fork 11
/
main.qml
108 lines (94 loc) · 2.26 KB
/
main.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
import QtQuick 2.2
import QtQuick.Controls 1.2
ApplicationWindow {
id: app
visible: true
minimumHeight: 768
minimumWidth: 1024
title: qsTr("Human Atlas - Bala Swecha")
property string currentOrganism: "humanbody"
property string currentOrganSystem
Theme { //This will be accessed all over the code
id: theme //Global ID
}
StackView {
id: stack
anchors.fill: parent
initialItem: Home {
id: homeSelection
organism: app.currentOrganism
onSelected: {
app.currentOrganSystem = selectedComponent;
stack.push(modeSelection);
}
}
}
Component {
id: buildSelection
ModeLoader {
mode: "build"
organism: app.currentOrganism
organSystem: app.currentOrganSystem
}
}
Component {
id: exploreSelection
ModeLoader {
mode: "explore"
organism: app.currentOrganism
organSystem: app.currentOrganSystem
}
}
Component {
id: quizSelection
ModeLoader {
mode: "quiz"
organism: app.currentOrganism
organSystem: app.currentOrganSystem
}
}
Component {
id: modeSelection
Mode {
onBuildSelected: {
stack.push(buildSelection)
}
onExploreSelected: {
stack.push(exploreSelection)
}
onQuizSelected: {
stack.push(quizSelection)
}
}
}
Item {
height: 50
width: 50
anchors {
left: parent.left
leftMargin: 30
top: parent.top
topMargin: 20
}
Image {
anchors.fill: parent
source: "images/quit.png"
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
Text {
text: "Quit"
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: 50
}
color: "white"
font.bold: true
}
}
}