JLearner All functionality
This commit is contained in:
@@ -15,6 +15,11 @@ PanelWindow {
|
||||
visible: true
|
||||
focusable: true
|
||||
|
||||
Component.onCompleted: {
|
||||
semiJLoader.all_invisible()
|
||||
languageChooser.visible = true
|
||||
}
|
||||
|
||||
FocusScope {
|
||||
id: jLearnerScope
|
||||
focus: true
|
||||
@@ -35,60 +40,100 @@ PanelWindow {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 10
|
||||
color: Qt.alpha(Colors.surfaceContainerLowest, 0.5)
|
||||
// color: Qt.alpha(Colors.surfaceContainerLowest, 0.5)
|
||||
|
||||
color: "blue"
|
||||
|
||||
border.width: 2
|
||||
border.color: Colors.outlineVariant
|
||||
|
||||
clip: true
|
||||
|
||||
Column {
|
||||
id: window
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
Rectangle{
|
||||
width: parent.width - 20
|
||||
height: parent.height - 20
|
||||
anchors.centerIn: parent
|
||||
color: "pink"
|
||||
|
||||
Rectangle {
|
||||
id: head
|
||||
width: window.width
|
||||
height: window.height * 0.1
|
||||
color: "#FFFFFF"
|
||||
Column {
|
||||
id: learnerWindow
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
|
||||
Text {
|
||||
text: "Language Learner"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 48
|
||||
color: "black"
|
||||
Rectangle {
|
||||
id: head
|
||||
width: parent.width
|
||||
height: parent.height * 0.1
|
||||
color: "#FFFFFF"
|
||||
|
||||
Text {
|
||||
text: "Language Learner"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * 0.8
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
id: semiJLoader
|
||||
width: parent.width
|
||||
height: parent.height * 0.9 - parent.spacing
|
||||
|
||||
color: "orange"
|
||||
|
||||
function all_invisible() {
|
||||
languageChooser.visible = false
|
||||
kanaVoicing.visible = false
|
||||
voicingKana.visible = false
|
||||
learnerResult.visible = false
|
||||
}
|
||||
|
||||
function switchModeChooser() {
|
||||
all_invisible()
|
||||
languageChooser.visible = true
|
||||
languageChooser.start()
|
||||
}
|
||||
|
||||
function switch_KanaVoicing() {
|
||||
all_invisible()
|
||||
kanaVoicing.visible = true
|
||||
kanaVoicing.start()
|
||||
}
|
||||
|
||||
function switch_VoicingKana() {
|
||||
all_invisible()
|
||||
voicingKana.visible = true
|
||||
voicingKana.start()
|
||||
}
|
||||
|
||||
function switchResult(result, mode, results) {
|
||||
all_invisible()
|
||||
console.log("Result: " + result)
|
||||
console.log("Mode: " + mode)
|
||||
learnerResult.visible = true
|
||||
learnerResult.result = result
|
||||
learnerResult.mode = mode
|
||||
learnerResult.results = results
|
||||
learnerResult.start()
|
||||
}
|
||||
|
||||
ModeChooser {
|
||||
id: languageChooser
|
||||
}
|
||||
|
||||
KanaVoicing {
|
||||
id: kanaVoicing
|
||||
}
|
||||
|
||||
VoicingKana {
|
||||
id: voicingKana
|
||||
}
|
||||
|
||||
JLearnerResult {
|
||||
id: learnerResult
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switch_KanaVoicing() {
|
||||
languageChooser.visible = false
|
||||
kanaVoicing.visible = true
|
||||
}
|
||||
|
||||
function switchModeChooser() {
|
||||
languageChooser.visible = true
|
||||
kanaVoicing.visible = false
|
||||
}
|
||||
|
||||
function switchResult(result) {
|
||||
console.log("Result: " + result)
|
||||
languageChooser.visible = true
|
||||
kanaVoicing.visible = false
|
||||
}
|
||||
|
||||
ModeChooser {
|
||||
id: languageChooser
|
||||
}
|
||||
|
||||
KanaVoicing {
|
||||
id: kanaVoicing
|
||||
}
|
||||
|
||||
// KanaVoicing {
|
||||
// id: kanaVoicing
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user