2018-11-22 12:39:09 +01:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Window 2.3
|
|
|
|
import QtQuick.Controls 2.4
|
|
|
|
import "./"
|
|
|
|
|
|
|
|
|
|
|
|
Window {
|
|
|
|
visible: true
|
|
|
|
width: 640
|
|
|
|
height: 480
|
|
|
|
title: qsTr("Training")
|
|
|
|
Item {
|
|
|
|
id: game
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2018-11-26 19:33:59 +01:00
|
|
|
state: "starting"
|
2018-11-22 12:39:09 +01:00
|
|
|
|
|
|
|
states: [
|
|
|
|
State {
|
2018-11-26 19:33:59 +01:00
|
|
|
name: "starting"
|
2018-11-22 12:39:09 +01:00
|
|
|
PropertyChanges {
|
|
|
|
target: mainStack
|
|
|
|
currPage: startPageComp
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
State {
|
|
|
|
name: "calender"
|
|
|
|
PropertyChanges {
|
|
|
|
target: mainStack
|
2018-11-24 13:50:06 +01:00
|
|
|
currPage: calenderPageComp
|
2018-11-22 12:39:09 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
2018-11-24 13:50:06 +01:00
|
|
|
name: "calculator"
|
2018-11-22 12:39:09 +01:00
|
|
|
PropertyChanges {
|
|
|
|
target: mainStack
|
2018-11-24 13:50:06 +01:00
|
|
|
currPage: calculatorPageComp
|
2018-11-22 12:39:09 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
StackView {
|
|
|
|
id: mainStack
|
|
|
|
|
|
|
|
property var currPage
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
onCurrPageChanged: {
|
|
|
|
mainStack.replace(currPage)
|
|
|
|
}
|
|
|
|
onCurrentItemChanged: {
|
|
|
|
mainStack.currentItem.pageOpened()
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: startPageComp
|
|
|
|
StartPage {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
2018-11-24 13:50:06 +01:00
|
|
|
id: calenderPageComp
|
2018-11-22 12:39:09 +01:00
|
|
|
CalenderPage {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
2018-11-24 13:50:06 +01:00
|
|
|
id: calculatorPageComp
|
|
|
|
Calculator {
|
2018-11-22 12:39:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
replaceExit: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
from: 1
|
|
|
|
to: 0
|
|
|
|
property: "opacity"
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
replaceEnter: Transition {
|
|
|
|
NumberAnimation {
|
|
|
|
from: 0
|
|
|
|
to: 1
|
|
|
|
property: "opacity"
|
|
|
|
duration: 200
|
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|