-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.qml
117 lines (82 loc) · 3 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
109
110
111
112
113
114
115
116
117
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Web 0.2
MainView {
objectName: "mainView"
applicationName: "xake.hankamotz"
automaticOrientation: true
width: units.gu(100)
height: units.gu(70)
anchorToKeyboard: true
PageStack {
id: mainPageStack
Component.onCompleted: push(pageMain)
anchors.fill: parent
width: parent.width
Page {
id: pageMain
visible: false
header: PageHeader {
id: pageHeader
title: i18n.tr("Chess")
trailingActionBar {
numberOfSlots: 1
actions: [
Action {
id: actionAbout
iconName: "info"
text: i18n.tr("About")
onTriggered: mainPageStack.push(Qt.resolvedUrl("About.qml"))
}
]
}
}
Button {
anchors{
horizontalCenter: parent.horizontalCenter
top: pageHeader.bottom
topMargin: units.gu(6)
}
id: "whitebutton"
width: units.gu(22)
text: i18n.tr( "New game as white")
color: "#ffffff"
onTriggered: mainPageStack.push(Qt.resolvedUrl("white.qml"))
}
Button {
anchors{
horizontalCenter: parent.horizontalCenter
top: whitebutton.bottom
topMargin: units.gu(2)
}
id: "blackbutton"
width: units.gu(22)
text: i18n.tr("New game as black")
color: "#3b3b3b"
onTriggered: mainPageStack.push(Qt.resolvedUrl("black.qml"))
}
Button {
anchors{
horizontalCenter: parent.horizontalCenter
top: blackbutton.bottom
topMargin: units.gu(6)
}
id: "dailybutton"
width: units.gu(22)
text: i18n.tr("Daily Puzzle")
onTriggered: mainPageStack.push(Qt.resolvedUrl("daily_puzzle.qml"))
}
Button {
anchors{
horizontalCenter: parent.horizontalCenter
top: dailybutton.bottom
topMargin: units.gu(2)
}
id: "chesstvbutton"
width: units.gu(22)
text: i18n.tr("Chess TV")
onTriggered: mainPageStack.push(Qt.resolvedUrl("chess_tv.qml"))
}
}
}
}