diff --git a/src/activities/binary_bulb/ActivityInfo.qml b/src/activities/binary_bulb/ActivityInfo.qml index 285229208..d15445940 100644 --- a/src/activities/binary_bulb/ActivityInfo.qml +++ b/src/activities/binary_bulb/ActivityInfo.qml @@ -1,40 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Rajat Asthana * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "binary_bulb/BinaryBulb.qml" difficulty: 3 icon: "binary_bulb/binary_bulb.svg" author: "Rajat Asthana <rajatasthana4@gmail.com>" demo: true //: Activity title title: qsTr("Binary bulbs") //: Help title description: qsTr("This activity helps you to learn the concept of conversion of decimal number system to binary number system.") //intro: "Turn on the right bulbs to represent the binary of the given decimal number. When you have achieved it, press OK" //: Help goal - goal: qsTr("To get familiar with binary number system") + goal: qsTr("To get familiar with the binary number system") //: Help prerequisite prerequisite: qsTr("Decimal number system") //: Help manual manual: qsTr("Turn on the right bulbs to represent the binary of the given decimal number. When you have achieved it, press OK.") credit: "" section: "experiment" createdInVersion: 9500 } diff --git a/src/activities/binary_bulb/binary_bulb.js b/src/activities/binary_bulb/binary_bulb.js index 034302f0a..692050e81 100644 --- a/src/activities/binary_bulb/binary_bulb.js +++ b/src/activities/binary_bulb/binary_bulb.js @@ -1,149 +1,149 @@ /* GCompris - binary_bulb.js * * Copyright (C) 2018 Rajat Asthana * * Authors: * "RAJAT ASTHANA" * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ .pragma library .import QtQuick 2.6 as Quick .import "qrc:/gcompris/src/core/core.js" as Core var numberOfLevel var items var dataset var url = "qrc:/gcompris/src/activities/binary_bulb/resource/" var tutorialInstructions = [ { "instruction": qsTr("This activity teaches how to convert decimal numbers to binary numbers."), "instructionQml" : "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial1.qml" }, { "instruction": qsTr("Computers use transistors to count and transistors have only two states, 0 and 1. Mathematically, these states are represented by 0 and 1, which makes up the binary system of numeration."), "instructionQml" : "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial2.qml" }, { "instruction": qsTr("In the activity 0 and 1 are simulated by bulbs, switched on or off."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial3.qml" }, { "instruction": qsTr("Binary system uses these numbers very efficiently, allowing to count from 0 to 255 with 8 bits only."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial4.qml" }, { - "instruction": qsTr("Each bit had a progressive value, corresponding to the powers of 2, ascending from right to left: bit 1 → 2⁰=1 , bit 2 → 2¹=2 , bit 3 → 2²=4 , bit 4 → 2³=8 , bit 5 → 2⁴=16 , bit 6 → 2⁵=32 , bit 7 → 2⁶=64 , bit 8 → 2⁷=128."), + "instruction": qsTr("Each bit adds a progressive value, corresponding to the powers of 2, ascending from right to left: bit 1 → 2⁰=1 , bit 2 → 2¹=2 , bit 3 → 2²=4 , bit 4 → 2³=8 , bit 5 → 2⁴=16 , bit 6 → 2⁵=32 , bit 7 → 2⁶=64 , bit 8 → 2⁷=128."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial5.qml" }, { "instruction": qsTr("To convert a decimal 5 to a binary value, 1 and 4 are added."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial6.qml" }, { "instruction": qsTr("Their corresponding bits are set to 1, the others set to 0. Decimal 5 is equal to binary 101."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial7.qml" }, { "instruction": qsTr("This image will help you to compute bits' value."), "instructionQml": "qrc:/gcompris/src/activities/binary_bulb/resource/tutorial5.qml" } ] var levelDataset function start(items_, dataset_) { items = items_ dataset = dataset_.get() items.currentLevel = 0 numberOfLevel = dataset.length } function stop() { } function resetBulbs() { for(var i = 0; i < items.numberOfBulbs; i++) { items.bulbs.itemAt(i).state = "off" } } function initializeValues() { items.currentSelectedBulb = -1 items.numberSoFar = 0 items.numberToConvert = levelDataset[items.score.currentSubLevel - 1] } function equalityCheck() { if(items.numberSoFar == items.numberToConvert) { if(items.score.currentSubLevel < items.score.numberOfSubLevels) { items.score.currentSubLevel++; items.score.playWinAnimation() resetBulbs() initializeValues() } else { items.bonus.good("lion") resetBulbs() } } else { items.bonus.bad("lion") resetBulbs() items.numberSoFar = 0 } } function changeState(index) { var currentBulb = items.bulbs.itemAt(index) if(currentBulb.state == "off") { currentBulb.state = "on" items.numberSoFar += currentBulb.value } else { currentBulb.state = "off" items.numberSoFar -= currentBulb.value } } function initLevel() { items.bar.level = items.currentLevel + 1 items.score.numberOfSubLevels = dataset[items.currentLevel].numbersToBeConverted.length items.score.currentSubLevel = 1 items.numberOfBulbs = dataset[items.currentLevel].bulbCount levelDataset = Core.shuffle(dataset[items.currentLevel].numbersToBeConverted) initializeValues() resetBulbs() } function nextLevel() { if(numberOfLevel <= items.currentLevel + 1) { items.currentLevel = 0 } else { ++ items.currentLevel } items.score.currentSubLevel = 1 initLevel(); } function previousLevel() { if(items.currentLevel-1 < 0) { items.currentLevel = numberOfLevel - 1 } else { --items.currentLevel } items.score.currentSubLevel = 1 initLevel(); } diff --git a/src/activities/checkers/ActivityInfo.qml b/src/activities/checkers/ActivityInfo.qml index e9ea12ad8..2555aaa4d 100644 --- a/src/activities/checkers/ActivityInfo.qml +++ b/src/activities/checkers/ActivityInfo.qml @@ -1,43 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Johnny Jazeix * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "checkers/Checkers.qml" difficulty: 4 icon: "checkers/checkers.svg" author: "Johnny Jazeix <jazeix@gmail.com>" demo: true //: Activity title title: qsTr("Play checkers against the computer") //: Help title description: qsTr("The version in GCompris is the international draughts.") //intro: "play checkers against the computer" //: Help goal - goal: qsTr("Capture all the pieces of your opponent before your opponent capture all of yours.") + goal: qsTr("Capture all the pieces of your opponent before your opponent captures all of yours.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Checkers is played by two opponents, on opposite sides of the gameboard. One player has the dark pieces; the other has the light pieces. Players alternate turns. A player may not move an opponent's piece. A move consists of moving a piece diagonally to an adjacent unoccupied square. If the adjacent square contains an opponent's piece, and the square immediately beyond it is vacant, the piece may be captured (and removed from the game) by jumping over it. Only the dark squares of the checkered board are used. A piece may move only diagonally into an unoccupied square. Capturing is mandatory. The player without pieces remaining, or who cannot move due to being blocked, loses the game. When a man reaches the crownhead or kings row (the farthest row forward), it becomes a king, and is marked by placing an additional piece on top of the first man, and acquires additional powers including the ability to move backwards. If there is a piece in a diagonal that a king can capture, he can move any distance along the diagonal, and may capture an opposing man any distance away by jumping to any of the unoccupied squares immediately beyond it. ") credit: qsTr("The checkers library is draughts.js <https://github.com/shubhendusaurabh/draughts.js>. Manual is from wikipedia <https://en.wikipedia.org/wiki/Draughts>") section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/checkers_2players/ActivityInfo.qml b/src/activities/checkers_2players/ActivityInfo.qml index 772b6359b..35ff9b66b 100644 --- a/src/activities/checkers_2players/ActivityInfo.qml +++ b/src/activities/checkers_2players/ActivityInfo.qml @@ -1,43 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Johnny Jazeix * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "checkers_2players/Checkers2Players.qml" difficulty: 4 icon: "checkers_2players/checkers_2players.svg" author: "Johnny Jazeix <jazeix@gmail.com>" demo: true //: Activity title title: qsTr("Play checkers with your friend") //: Help title description: qsTr("The version in GCompris is the international draughts.") //intro: "play checkers with your friend" //: Help goal - goal: qsTr("Capture all the pieces of your opponent before your opponent capture all of yours.") + goal: qsTr("Capture all the pieces of your opponent before your opponent captures all of yours.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Checkers is played by two opponents, on opposite sides of the gameboard. One player has the dark pieces; the other has the light pieces. Players alternate turns. A player may not move an opponent's piece. A move consists of moving a piece diagonally to an adjacent unoccupied square. If the adjacent square contains an opponent's piece, and the square immediately beyond it is vacant, the piece may be captured (and removed from the game) by jumping over it. Only the dark squares of the checkered board are used. A piece may move only diagonally into an unoccupied square. Capturing is mandatory. The player without pieces remaining, or who cannot move due to being blocked, loses the game. When a man reaches the crownhead or kings row (the farthest row forward), it becomes a king, and is marked by placing an additional piece on top of the first man, and acquires additional powers including the ability to move backwards. If there is a piece in a diagonal that a king can capture, he can move any distance along the diagonal, and may capture an opposing man any distance away by jumping to any of the unoccupied squares immediately beyond it. ") credit: qsTr("The checkers library is draughts.js <https://github.com/shubhendusaurabh/draughts.js>. Manual is from wikipedia <https://en.wikipedia.org/wiki/Draughts>") section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/gnumch-inequality/ActivityInfo.qml b/src/activities/gnumch-inequality/ActivityInfo.qml index 178d7bc1f..8f68b9331 100644 --- a/src/activities/gnumch-inequality/ActivityInfo.qml +++ b/src/activities/gnumch-inequality/ActivityInfo.qml @@ -1,43 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 // Must be updated once GnumchEquality is reviewed ActivityInfo { name: "gnumch-inequality/GnumchInequality.qml" difficulty: 3 icon: "gnumch-inequality/gnumch-inequality.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" demo: true //: Activity title title: qsTr("Gnumch Inequality") //: Help title - description: qsTr("Guide the Number Muncher to the all the expressions that do not equal the number at the bottom of the screen.") + description: qsTr("Guide the Number Muncher to all the expressions that do not equal the number at the bottom of the screen.") // intro: "Guide the number eater with the arrow keys to the numbers that are different from the ones displayed and press the space bar to swallow them." //: Help goal goal: qsTr("Practice addition, subtraction, multiplication and division.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math" createdInVersion: 0 } diff --git a/src/activities/piano_composition/melodies.js b/src/activities/piano_composition/melodies.js index 2b457a52e..d29b310b5 100644 --- a/src/activities/piano_composition/melodies.js +++ b/src/activities/piano_composition/melodies.js @@ -1,266 +1,266 @@ /* GCompris - melodies.js * * Copyright (C) 2016 Johnny Jazeix * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Beth Hadley (GTK+ version) * Johnny Jazeix (Qt Quick port) * Aman Kumar Gupta (Qt Quick port) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . **/ function get() { return [ { "title": "Twinkle Twinkle Little Star", "_origin": qsTr("America: English Lullaby"), "lyrics": "Twinkle, twinkle, little star, how I wonder what you are; Up above the world so high, like a diamond in the sky. Twinkle, twinkle, little star, how I wonder what you are.", "defaultBPM": 120, "melody": "Treble C4Quarter C4Quarter G4Quarter G4Quarter A4Quarter A4Quarter G4Half F4Quarter F4Quarter E4Quarter E4Quarter D4Quarter D4Quarter C4Half G4Quarter G4Quarter F4Quarter F4Quarter E4Quarter E4Quarter D4Half G4Quarter G4Quarter F4Quarter F4Quarter E4Quarter E4Quarter D4Half C4Quarter C4Quarter G4Quarter G4Quarter A4Quarter A4Quarter G4Half F4Quarter F4Quarter E4Quarter E4Quarter D4Quarter D4Quarter C4Whole" }, { "title": "Yankee Doodle", "_origin": qsTr("America: Patriotic"), "lyrics": "Yankee Doodle went to town, Riding on a pony; He stuck a feather in his hat, And called it macaroni", "defaultBPM": 120, "melody": "Treble G4Eighth G4Eighth A4Eighth B4Eighth G4Eighth B4Eighth A4Quarter G4Eighth G4Eighth A4Eighth B4Eighth G4Quarter F#4Quarter G4Eighth G4Eighth A4Eighth B4Eighth C5Eighth B4Eighth A4Eighth G4Eighth F#4Eighth D4Eighth E4Eighth F#4Eighth G4Quarter G4Quarter" }, { "title": "Simple Gifts", "_origin": qsTr("America: Shaker Tune"), "lyrics": "Tis the gift to be simple, 'tis the gift to be free, 'tis the gift to come down where we ought to be. And when we find ourselves in the place just right, 'Twill be in the valley of love and delight.", "defaultBPM": 116, "melody": "Treble C4Eighth C4Eighth F4Quarter F4Eighth G4Eighth A4Eighth F4Eighth A4Eighth Bb4Eighth C5Quarter C5Eighth Bb4Eighth A4Quarter G4Eighth F4Eighth G4Quarter C4Quarter G4Quarter F4Quarter G4Eighth A4Eighth G4Eighth E4Eighth C4Quarter C4Quarter F4Eighth E4Eighth F4Eighth G4Eighth A4Quarter G4Eighth G4Eighth A4Quarter Bb4Quarter C5Quarter A4Quarter G4Quarter G4Eighth G4Eighth A4Quarter A4Eighth G4Eighth F4Quarter F4Eighth F4Eighth F4Half" }, { "title": "Old MacDonald Had a Farm", "_origin": qsTr("America: Nursery Rhyme"), "lyrics": "Old MacDonald had a farm, EE-I-EE-I-O, And on that farm he had a [animal name], EE-I-EE-I-O", "defaultBPM": 152, "melody": "Bass G3Quarter G3Quarter G3Quarter D3Quarter E3Quarter E3Quarter D3Half B3Quarter B3Quarter A3Quarter A3Quarter G3Half D3Half G3Quarter G3Quarter G3Quarter D3Quarter E3Quarter E3Quarter D3Half B3Quarter B3Quarter A3Quarter A3Quarter G3Whole" }, { "title": "Un elefante se balanceaba", "_origin": qsTr("Mexico"), "lyrics": "Un elefante se columpiaba sobre la tela de una araña. Como veia que resistía fue a llamar a otro elefante", "defaultBPM": 122, "melody": "Treble G4Quarter G4Eighth G4Eighth E4Quarter E4Quarter G4Quarter G4Eighth G4Eighth E4Quarter E4Quarter G4Quarter G4Eighth G4Eighth A4Eighth G4Eighth F4Eighth E4Eighth F4Half D4Half F4Quarter F4Eighth F4Eighth D4Quarter D4Quarter F4Quarter F4Eighth F4Eighth D4Quarter D4Quarter F4Quarter F4Eighth F4Eighth G4Eighth F4Eighth E4Eighth D4Eighth E4Half C4Half" }, { "title": "Piove, Piove", "_origin": qsTr("Italy"), "lyrics": "Piove, piove. La gatta non si muove. La fiamma traballa. La mucca è nella stalla. La mucca ha il vitello. La pecora ha l’agnello. [La chioccia ha il pulcino.] Ognuno ha il suo bambino. Ognuno ha la sua mamma. E tutti fanno nanna!", "defaultBPM": 116, "melody": "Treble E4Eighth G4Quarter G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Half E4Eighth G4Half E4Eighth G4Eighth A4Eighth G4Eighth E4Eighth G4Half" }, { "title": "Que llueva, que llueva", "_origin": qsTr("Spain"), "lyrics": "Que llueva, que llueva. La Virgen de la Cueva. Los pajaritos cantan, Las nubes se levantan. ¡Que sí, que no, que caiga un chaparrón! Que siga lloviendo, Los pájaros corriendo. Florezca la pradera. Al sol de la primavera....", "defaultBPM": 116, "melody": "Treble E4Eighth G4Quarter G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Eighth G4Eighth G4Eighth A4Eighth G4Quarter G4Eighth E4Eighth G4Half E4Eighth G4Half E4Eighth G4Eighth A4Eighth G4Eighth E4Eighth G4Half" }, { "title": "Backe, backe Kuchen", "_origin": qsTr("German Kid's Song"), "lyrics": "Backe, backe, Kuchen Der Bäcker hat gerufen! Wer will guten Kuchen backen Der muß haben sieben Sachen: Eier und Schmalz Butter und Salz Milch und Mehl/Safran macht den Kuchen gehl!Schieb, schieb in´n Ofen ´nein.", "defaultBPM": 92, "melody": "Treble A4Quarter A4Quarter B4Quarter B4Quarter A4Half F#4Quarter D4Quarter A4Quarter A4Quarter B4Quarter B4Quarter A4Half F#4Half A4Quarter A4Quarter B4Quarter B4Quarter A4Quarter A4Quarter F#4Quarter D4Quarter A4Quarter A4Quarter B4Quarter B4Quarter A4Quarter A4Quarter F#4Quarter F#4Quarter A4Eighth A4Eighth A4Quarter F#4Half A4Eighth A4Eighth A4Quarter F#4Half A4Quarter A4Quarter F#4Half" }, { "title": "Se essa rua fosse minha", "_origin": qsTr("Children's Song from Brazil"), "lyrics": "Se essa rua Se essa rua fosse minha Eu mandava Eu mandava ladrilhar Com pedrinhas Com pedrinhas de brilhante Só pra ver Só pra ver meu bem passar Nessa rua Nessa rua tem um bosque Que se chama Que se chama solidão...", "defaultBPM": 120, "melody": "Treble E4Eighth E4Eighth A4Eighth A4Eighth E4Eighth C4Eighth A4Eighth C4Eighth F4Eighth E4Eighth E4Quarter D4Quarter E4Eighth E4Eighth B4Eighth B4Eighth F4Eighth E4Eighth G#4Eighth E4Eighth C4Eighth B4Eighth A4Half A4Eighth A4Eighth Bb4Eighth A4Eighth E4Eighth C#4Eighth A4Eighth G4Eighth F4Eighth E4Eighth G4Eighth F4Eighth E4Eighth D4Eighth E4Quarter B4Eighth G#4Eighth E4Eighth D4Eighth C4Eighth B4Eighth A4Half" }, { "title": "Fuchs du hast die Gans gestohlen", - "_origin": qsTr("German"), + "_origin": qsTr("Germany"), "lyrics": "Fuchs, du hast die Gans gestohlen, gib sie wieder her, gib sie wieder her! Sonst wird dich der Jäger holen, mit dem Schießgewehr! Sonst wird dich der Jäger holen, mit dem Schießgewehr!", "defaultBPM": 100, "melody": "Treble D4Quarter E4Quarter F#4Quarter G4Quarter A4Quarter A4Quarter A4Quarter A4Quarter B4Quarter G4Quarter D5Quarter B4Quarter A4Whole B4Quarter G4Quarter D5Quarter B4Quarter A4Whole A4Quarter G4Quarter G4Quarter G4Quarter G4Quarter F#4Quarter F#4Quarter F#4Quarter F#4Quarter E4Quarter F#4Quarter E4Quarter D4Quarter F#4Quarter A4Half" }, { "title": "Un éléphant qui se balançait", "_origin": qsTr("France"), "lyrics": "Un éléphant qui se balançait\nSur une toile toile toile\nToile d'araignée\nIl trouvait ça tellement amusant\nQu'il alla chercher un\nDeuxième éléphant.", "defaultBPM": 122, "melody": "Treble G4Quarter G4Eighth G4Eighth E4Quarter E4Quarter G4Quarter G4Eighth G4Eighth E4Quarter E4Quarter G4Quarter G4Eighth G4Eighth A4Eighth G4Eighth F4Eighth E4Eighth F4Half D4Half F4Quarter F4Eighth F4Eighth D4Quarter D4Quarter F4Quarter F4Eighth F4Eighth D4Quarter D4Quarter F4Quarter F4Eighth F4Eighth G4Eighth F4Eighth E4Eighth D4Eighth E4Half C4Half" }, { "title": "Alle Meine Entchen", "_origin": qsTr("Germany"), "lyrics": "Alle meine Entchen schwimmen auf dem See, schwimmen auf dem See, Köpfchen in das Wasser, Schwänzchen in die Höh'.", "defaultBPM": 100, "melody": "Treble C4Eighth D4Eighth E4Eighth F4Eighth G4Quarter G4Quarter A4Eighth A4Eighth A4Eighth A4Eighth G4Half A4Eighth A4Eighth A4Eighth A4Eighth G4Half F4Eighth F4Eighth F4Eighth F4Eighth E4Quarter E4Quarter D4Eighth D4Eighth D4Eighth G4Eighth C4Half" }, { "title": "À la claire fontaine", "_origin": qsTr("France"), "lyrics": "À la claire fontaine\nM'en allant promener\nJ'ai trouvé l'eau si belle\nQue je m'y suis baigné\nIl y a longtemps que je t'aime\nJamais je ne t'oublierai.", "defaultBPM": 77, "melody": "Treble G4Quarter G4Eighth B4Eighth B4Eighth A4Eighth B4Eighth B4Eighth G4Quarter G4Eighth B4Eighth B4Eighth A4Eighth B4Quarter B4Quarter B4Eighth A4Eighth G4Eighth B4Eighth D5Eighth B4Eighth D5Quarter D5Eighth B4Eighth G4Eighth B4Eighth A4Half G4Half G4Quarter B4Quarter B4Quarter A4Eighth G4Eighth B4Quarter G4Quarter B4Half B4Quarter A4Eighth G4Eighth B4Quarter A4Quarter G4Whole" }, { "title": "O Cravo e a Rosa", "_origin": qsTr("Brazil"), "lyrics": "O Cravo brigou com a Rosa Debaixo de uma sacada O Cravo ficou ferido E a Rosa despedaçada O Cravo ficou doente A Rosa foi visitar O Cravo teve um desmaio A Rosa pôs-se a chorar", "defaultBPM": 120, "melody": "Treble G4Quarter G4Quarter E4Quarter C5Eighth B4Eighth A4Eighth G4Quarter F4Half A4Quarter A4Quarter F4Quarter C5Eighth B4Eighth A4Eighth G4Quarter G4Half G4Quarter C5Quarter C5Quarter C5Eighth D5Eighth C5Eighth B4Quarter A4Half A4Quarter G4Quarter B4Half A4Eighth F4Eighth D4Eighth C4Quarter" }, { "title": "Marcha Soldado", "_origin": qsTr("Brazil"), "lyrics": "Marcha soldado Cabeça de papel Se não marchar direito Vai preso pro quartel O quartel pegou fogo A polícia deu sinal Acode acode acode A bandeira nacional", "defaultBPM": 120, "melody": "Treble G4Quarter G4Eighth E4Eighth C4Quarter C4Eighth E4Eighth G4Eighth G4Eighth G4Eighth E4Eighth D4Half E4Eighth F4Eighth F4Eighth F4Eighth D4Eighth G4Quarter G4Eighth A4Eighth G4Eighth F4Eighth E4Eighth D4Eighth C4Half" }, { "title": "Frère jacques", "_origin": qsTr("France"), "lyrics": "Frère Jacques\nFrère Jacques\nDormez-vous ?\nDormez-vous ?\nSonnez les matines\nSonnez les matines\nDing ding dong\nDing ding dong", "defaultBPM": 120, "melody": "Treble F4Quarter G4Quarter A4Quarter F4Quarter F4Quarter G4Quarter A4Quarter F4Quarter A4Quarter Bb4Quarter C5Half A4Quarter Bb4Quarter C5Half C5Eighth D5Eighth C5Eighth Bb4Eighth A4Quarter F4Quarter C5Eighth D5Eighth C5Eighth Bb4Eighth A4Quarter F4Quarter F4Quarter C4Quarter F4Half F4Quarter C4Quarter F4Half" }, { "title": "Au clair de la lune", "_origin": qsTr("France"), "lyrics": "Au clair de la lune\nMon ami Pierrot\nPrête-moi ta plume\nPour écrire un mot\nMa chandelle est morte\nJe n'ai plus de feu\nOuvre-moi ta porte\nPour l'amour de Dieu.", "defaultBPM": 85, "melody": "Treble G4Quarter G4Quarter G4Quarter A4Quarter B4Half A4Half G4Quarter B4Quarter A4Quarter A4Quarter G4Whole G4Quarter G4Quarter G4Quarter A4Quarter B4Half A4Half G4Quarter B4Quarter A4Quarter A4Quarter G4Whole A4Quarter A4Quarter A4Quarter A4Quarter E4Half E4Half A4Quarter G4Quarter F#4Quarter E4Quarter D4Whole G4Quarter G4Quarter G4Quarter A4Quarter B4Half A4Half G4Quarter B4Quarter A4Quarter A4Quarter G4Whole" }, { "title": "Boci, boci tarka", "_origin": qsTr("Hungary, Nursery Rhyme"), "lyrics": "Boci, boci tarka, Se füle, se farka, Oda megyünk lakni, Ahol tejet kapni.", "defaultBPM": 120, "melody": "Treble D4Eighth F#4Eighth D4Eighth F#4Eighth A4Quarter A4Quarter D4Eighth F#4Eighth D4Eighth F#4Eighth A4Quarter A4Quarter D5Eighth C#5Eighth B4Eighth A4Eighth G4Quarter B4Quarter A4Eighth G4Eighth F#4Eighth E4Eighth D4Quarter D4Quarter" }, { "title": "Nyuszi ül a fűben", "_origin": qsTr("Hungary, Nursery Rhyme"), "lyrics": "Nyuszi ül a fűben, ülve szundikálva. Nyuszi talán beteg vagy, hogy már nem is ugorhatsz? Nyuszi hopp! Nyuszi hopp! Máris egyet elkapott.", "defaultBPM": 120, "melody": "Treble A4Eighth A4Eighth A4Eighth B4Eighth A4Quarter F#4Quarter A4Eighth A4Eighth A4Eighth B4Eighth A4Eighth G4Eighth F#4Quarter F#4Eighth E4Eighth F#4Eighth E4Eighth D4Eighth D4Eighth D4Quarter A4Eighth A4Eighth D5Quarter A4Eighth A4Eighth D5Quarter F#4Eighth E4Eighth F#4Eighth E4Eighth D4Eighth D4Eighth D4Quarter" }, { "title": "Lánc, lánc, eszterlánc", "_origin": qsTr("Hungary, Children's Song"), "lyrics": "Lánc, lánc, eszterlánc,/ eszterlánci cérna,/ cérna volna, selyem volna,/ mégis kifordulna. / Pénz volna karika, karika,/ forduljon ki Marika,/ Marikának lánca.", "defaultBPM": 120, "melody": "Treble A4Quarter B4Quarter A4Eighth A4Eighth F#4Quarter A4Eighth A4Eighth A4Eighth B4Eighth A4Quarter F#4Quarter A4Eighth A4Eighth A4Eighth B4Eighth A4Eighth G4Eighth F#4Eighth E4Eighth F#4Eighth E4Eighth F#4Eighth E4Eighth D4Quarter D4Quarter A4Quarter A4Eighth A4Eighth A4Eighth D5Eighth A4Quarter A4Eighth G4Eighth F#4Eighth E4Eighth D4Eighth D5Eighth A4Quarter A4Eighth G4Eighth F#4Eighth E4Eighth D4Quarter D4Quarter" }, { "title": "Tavaszi szél vizet áraszt", "_origin": qsTr("Hungary, Children's Song"), "lyrics": "Tavaszi szél vizet áraszt, virágom, virágom. / Minden madár társat választ virágom, virágom. / Hát én immár kit válasszak? Virágom, virágom. / Te engemet, én tégedet, virágom, virágom.", "defaultBPM": 120, "melody": "Treble F4Quarter G4Quarter A4Quarter A4Quarter G4Quarter G4Eighth A4Eighth F4Quarter G4Quarter A4Eighth A4Quarter G4Quarter G4Eighth A4Eighth F4Half C4Half F4Quarter G4Quarter A4Eighth A4Quarter G4Quarter G4Eighth A4Eighth F4Eighth E4Eighth D4Quarter G4Eighth G4Quarter A4Eighth F4Quarter E4Quarter D4Half D4Half" }, { "title": "Zec kopa repu", "_origin": qsTr("Serbia"), "lyrics": "Zec kopa repu, a lisica cveklu / Vuk im se prikrade, zeca da ukrade / Zec spazi repu, a lisica cveklu / Vuka nije bilo, u snu im se snilo", "defaultBPM": 180, "melody": "Treble A4Half A4Quarter F#4Quarter G4Half E4Half D4Quarter E4Quarter E4Quarter E4Quarter E4Half D4Half F4Quarter F4Quarter E4Quarter F4Quarter G4Half E4Half F4Quarter F4Quarter E4Quarter D4Quarter E4Half D4Half" }, { "title": "Jack and Jill", "_origin": qsTr("Britain"), "lyrics": "Jack and Jill went up the hill / To fetch a pail of water. / Jack fell down and broke his crown,/ And Jill came tumbling after", "defaultBPM": 101, "melody": "Treble C4Quarter C4Eighth D4Quarter D4Eighth E4Quarter E4Eighth F4Quarter F4Eighth G4Quarter G4Eighth A4Quarter A4Eighth B4Half C5Half C5Quarter C5Eighth B4Quarter B4Eighth A4Quarter A4Eighth G4Quarter G4Eighth F4Quarter F4Eighth E4Quarter E4Eighth D4Half C4Half" }, { "title": "Wlazł kotek na płotek", "_origin": qsTr("Poland"), "lyrics": "Wlazł kotek na płotek i mruga,/ Ładna to piosenka nie długa. / Nie długa, nie krótka, lecz w sam raz,/ Zaśpiewaj koteczku jeszcze raz.", "defaultBPM": 120, "melody": "Treble G4Quarter E4Quarter E4Quarter F4Quarter D4Quarter D4Quarter C4Eighth E4Eighth G4Half G4Quarter E4Quarter E4Quarter F4Quarter D4Quarter D4Quarter C4Eighth E4Eighth C4Half" }, { "title": "Φεγγαράκι μου λαμπρό", "_origin": qsTr("Greece"), "lyrics": "Φεγγαράκι μου λαμπρό,/ Φέγγε μου να περπατώ,/ Να πηγαίνω στο σχολειό / Να μαθαίνω γράμματα,/ Γράμματα σπουδάματα / Του Θεού τα πράματα.", "defaultBPM": 120, "melody": "Treble C4Quarter C4Quarter G4Quarter G4Quarter A4Quarter A4Quarter G4Half F4Quarter F4Quarter E4Quarter E4Quarter D4Quarter D4Quarter C4Half G4Quarter G4Quarter F4Quarter F4Quarter E4Quarter E4Quarter D4Half G4Quarter G4Quarter F4Quarter F4Quarter E4Quarter E4Quarter D4Half C4Quarter C4Quarter G4Quarter G4Quarter A4Quarter A4Quarter G4Half F4Quarter F4Quarter E4Quarter E4Quarter D4Quarter D4Quarter C4Whole" }, { "title": "Βρέχει, χιονίζει", "_origin": qsTr("Greece"), "lyrics": "Βρέχει, χιονίζει,/ Τα μάρμαρα ποτίζει,/ Κι' ο γέρος πα στα ξύλα / Κ' η γριά του μαγειρεύει / Κουρκούτι με το μέλι. / \"'Ελα γέρο μου να φας / Πού να φας την / κουτσουλιά,/ Και του σκύλλου την οριά.\"", "defaultBPM": 120, "melody": "Treble D4Eighth G4Eighth G4Eighth G4Eighth A4Eighth A4Eighth G4Eighth G4Eighth D4Eighth G4Eighth G4Eighth G4Eighth A4Eighth A4Eighth G4Eighth G4Eighth D4Eighth G4Eighth G4Eighth G4Eighth A4Eighth A4Eighth G4Eighth G4Eighth D4Eighth G4Eighth G4Eighth G4Eighth A4Eighth A4Eighth G4Eighth G4Eighth" }, { "title": "Котику сіренький", "_origin": qsTr("Ukraine"), "lyrics": "Котику сіренький,/ Котику біленький,/ Котку волохатий,/ Не ходи по хаті! / Не ходи по хаті,/ Не буди дитяти! / Дитя буде спати,/ Котик воркотати. / Ой на кота воркота,/ На дитину дрімота. / А-а, люлі!", "defaultBPM": 120, "melody": "Treble C4Quarter F4Quarter G4Quarter Bb4Eighth Ab4Eighth G4Quarter F4Quarter C4Quarter F4Quarter G4Quarter Bb4Eighth Ab4Eighth G4Half F4Half Bb4Quarter Bb4Quarter Bb4Quarter Ab4Quarter G4Half F4Half Bb4Quarter Bb4Quarter Bb4Quarter Ab4Quarter G4Half F4Half C4Quarter F4Quarter G4Quarter Bb4Eighth Ab4Eighth G4Eighth F4Eighth G4Quarter F4Half" }, { "title": "Baa, Baa, Blacksheep", "_origin": qsTr("Britain"), "lyrics": "Baa, baa, black sheep, / Have you any wool? / Yes, sir, yes, sir, / Three bags full; / One for the master, / And one for the dame, / And one for the little boy / Who lives down the lane", "defaultBPM": 105, "melody": "Treble G4Quarter G4Quarter D5Quarter D5Quarter E5Eighth E5Eighth E5Eighth E5Eighth D5Half C5Quarter C5Quarter B4Quarter B4Quarter A4Quarter A4Quarter G4Half D5Quarter D5Eighth D5Eighth C5Quarter C5Quarter B4Quarter B4Eighth B4Eighth A4Half D5Quarter D5Eighth D5Eighth C5Eighth C5Eighth C5Eighth C5Eighth B4Quarter B4Eighth B4Eighth A4Half" }, { "title": "A la rueda de San Miguel", "_origin": qsTr("Mexico"), "lyrics": "A la rueda, a la rueda de San Miguel / Todos traen su caja de miel. / A lo maduro, a lo maduro / Que se voltee (nombre del niño) de burro.", "defaultBPM": 120, "melody": "Treble G4Quarter G4Quarter C5Quarter G4Quarter C5Quarter G4Eighth G4Eighth C5Quarter D5Quarter E5Half C5Quarter D5Quarter E5Half C5Quarter C5Quarter D5Quarter D5Eighth D5Eighth G4Quarter G4Eighth G4Eighth C5Half" }, { "title": "Arroz con leche", "_origin": qsTr("Mexico"), "lyrics": "Arroz con leche / me quiero casar / con una mexicana / de la capital.", "defaultBPM": 120, "melody": "Treble C4Eighth F4Half A4Eighth F4Quarter F4Eighth C4Eighth F4Quarter F4Eighth A4Eighth G4Half A4Eighth Bb4Eighth A4Eighth G4Eighth F4Eighth E4Quarter E4Eighth C4Eighth D4Quarter E4Eighth E4Eighth F4Quarter" }, { "title": "Los pollitos dicen", "_origin": qsTr("Mexico"), "lyrics": "Los pollitos dicen / pío pío pío / cuando tienen hambre / cuando tienen frío", "defaultBPM": 117, "melody": "Treble A4Eighth E4Eighth A4Eighth B4Eighth C#5Quarter C#5Quarter B4Eighth D5Eighth C#5Eighth B4Eighth A4Quarter A4Quarter A4Eighth G#4Eighth F#4Eighth E4Eighth B4Quarter B4Quarter E4Eighth E4Eighth F#4Eighth G#4Eighth A4Quarter A4Quarter" }, { "title": "Dale dale dale", "_origin": qsTr("Mexican song to break a piñata"), "lyrics": "Dale dale dale / no pierdas el tino / porque si lo pierdes / pierdes el camino", "defaultBPM": 120, "melody": "Treble G4Eighth G4Eighth G4Eighth E4Eighth A4Quarter A4Quarter B4Eighth B4Eighth B4Eighth G4Eighth C5Quarter C5Quarter G4Eighth G4Eighth G4Eighth E4Eighth A4Quarter A4Quarter B4Eighth B4Eighth B4Eighth G4Eighth C5Half" }, { "title": "Kolme varista", "_origin": qsTr("Finland"), "lyrics": "Kolme varista istui aidalla. Silivati seilaa, silivati seilaa, yksi lensi pois. Kaksi varista istui aidalla. Silivati seilaa, silivati seilaa, yksi lensi pois. Yksi varis vain istui aidalla. Silivati seilaa, silivati seilaa, sekin lensi pois.", "defaultBPM": 120, "melody": "Treble A4Quarter Bb4Quarter A4Eighth F4Half D4Whole A4Quarter D4Quarter C5Quarter Bb4Quarter G4Whole A4Eighth A4Eighth A4Eighth G4Eighth E4Quarter G4Quarter A4Eighth A4Eighth A4Eighth G4Eighth E4Quarter G4Quarter A4Half G4Eighth F4Quarter E4Quarter D4Quarter" }, { "title": "Humpty Dumpty", "_origin": qsTr("Britain"), "lyrics": "Humpty Dumpty sat on a wall, / Humpty Dumpty had a great fall. / All the king's horses and all the king's men / Couldn't put Humpty together again", "defaultBPM": 120, "melody": "Treble E4Quarter G4Eighth F4Quarter A4Eighth G4Eighth A4Eighth B4Eighth C5Half E4Quarter G4Eighth F4Quarter A4Eighth G4Eighth F4Eighth E4Eighth D4Half E4Eighth E4Eighth G4Eighth F4Eighth F4Eighth A4Eighth G4Eighth A4Eighth B4Eighth C5Quarter C5Eighth E5Eighth E5Eighth C5Eighth F5Quarter E5Eighth D5Eighth C5Eighth B4Eighth C5Half" } ]; } diff --git a/src/activities/reversecount/Reversecount.qml b/src/activities/reversecount/Reversecount.qml index 89b6b10ce..ae949f9a4 100644 --- a/src/activities/reversecount/Reversecount.qml +++ b/src/activities/reversecount/Reversecount.qml @@ -1,289 +1,289 @@ /* GCompris - ReverseCount.qml * * Copyright (C) 2014 Emmanuel Charruau * * Authors: * Bruno Coudoin (GTK+ version) * Emmanuel Charruau (Qt Quick port) * Bruno Coudoin (Major rework) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import GCompris 1.0 import "../../core" import "reversecount.js" as Activity ActivityBase { id: activity onStart: focus = true onStop: {} pageComponent: Rectangle { id: background anchors.fill: parent color: "#ff00a4b0" signal start signal stop Component.onCompleted: { dialogActivityConfig.getInitialConfiguration() activity.start.connect(start) activity.stop.connect(stop) } // Add here the QML items you need to access in javascript QtObject { id: items property Item main: activity.main property GCSfx audioEffects: activity.audioEffects property alias background: background property alias backgroundImg: backgroundImg property alias bar: bar property alias bonus: bonus property alias chooseDiceBar: chooseDiceBar property alias tux: tux property alias fishToReach: fishToReach property int clockPosition: 4 property string mode: "dot" } onStart: { Activity.start(items) } onStop: { Activity.stop() } Keys.onEnterPressed: Activity.moveTux() Keys.onReturnPressed: Activity.moveTux() onWidthChanged: { if(Activity.fishIndex > 0) { // set x fishToReach.x = Activity.iceBlocksLayout[Activity.fishIndex % Activity.iceBlocksLayout.length][0] * background.width / 5 + (background.width / 5 - tux.width) / 2 // set y fishToReach.y = Activity.iceBlocksLayout[Activity.fishIndex % Activity.iceBlocksLayout.length][1] * (background.height - background.height/5) / 5 + (background.height / 5 - tux.height) / 2 // Move Tux Activity.moveTuxToIceBlock() } } onHeightChanged: { if(Activity.fishIndex > 0) { // set x fishToReach.x = Activity.iceBlocksLayout[Activity.fishIndex % Activity.iceBlocksLayout.length][0] * background.width / 5 + (background.width / 5 - tux.width) / 2 // set y fishToReach.y = Activity.iceBlocksLayout[Activity.fishIndex % Activity.iceBlocksLayout.length][1] * (background.height - background.height/5) / 5 + (background.height / 5 - tux.height) / 2 // Move Tux Activity.moveTuxToIceBlock() } } Image { id: backgroundImg source: Activity.url + Activity.backgrounds[0] sourceSize.height: parent.height * 0.5 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter } // === The ice blocks === Repeater { model: Activity.iceBlocksLayout Image { x: modelData[0] * background.width / 5 y: modelData[1] * (background.height- background.height/5) / 5 width: background.width / 5 height: background.height / 5 source: Activity.url + "iceblock.svg" } } Tux { id: tux sourceSize.width: Math.min(background.width / 6, background.height / 6) z: 11 } Image { id: fishToReach sourceSize.width: Math.min(background.width / 6, background.height / 6) z: 10 property string nextSource property int nextX property int nextY function showParticles() { particles.burst(40) } ParticleSystemStarLoader { id: particles clip: false } onOpacityChanged: { if(opacity == 0) { source = ""; source = nextSource; } } onSourceChanged: { if(source != "") { x = nextX y = nextY opacity = 1 } } Behavior on opacity { NumberAnimation { duration: 500 } } } DialogHelp { id: dialogHelp onClose: home() } Bar { id: bar content: BarEnumContent { value: help | home | level | config } onHelpClicked: { displayDialog(dialogHelp) } onPreviousLevelClicked: Activity.previousLevel() onNextLevelClicked: Activity.nextLevel() onHomeClicked: activity.home() onConfigClicked: { dialogActivityConfig.active = true dialogActivityConfig.setDefaultValues() displayDialog(dialogActivityConfig) } } Image { id: clock anchors { right: parent.right bottom: parent.bottom margins: 10 } sourceSize.width: 66 * bar.barZoom property int remainingLife: items.clockPosition onRemainingLifeChanged: if(remainingLife >= 0) clockAnim.restart() SequentialAnimation { id: clockAnim alwaysRunToEnd: true ParallelAnimation { NumberAnimation { target: clock; properties: "opacity"; to: 0; duration: 800; easing.type: Easing.OutCubic } NumberAnimation { target: clock; properties: "rotation"; from: 0; to: 180; duration: 800; easing.type: Easing.OutCubic } } PropertyAction { target: clock; property: 'source'; value: "qrc:/gcompris/src/activities/reversecount/resource/" + "flower" + items.clockPosition + ".svg" } ParallelAnimation { NumberAnimation { target: clock; properties: "opacity"; to: 1; duration: 800; easing.type: Easing.OutCubic } NumberAnimation { target: clock; properties: "rotation"; from: 180; to: 0; duration: 800; easing.type: Easing.OutCubic } } } } DialogActivityConfig { id: dialogActivityConfig currentActivity: activity content: Component { Item { property alias modeBox: modeBox property var availableModes: [ { "text": qsTr("Dots"), "value": "dot" }, - { "text": qsTr("Numbers"), "value": "number" }, - { "text": qsTr("Romans"), "value": "roman" }, + { "text": qsTr("Arabic numbers"), "value": "number" }, + { "text": qsTr("Roman numbers"), "value": "roman" }, { "text": qsTr("Images"), "value": "image" } ] Flow { id: flow spacing: 5 width: dialogActivityConfig.width GCComboBox { id: modeBox model: availableModes background: dialogActivityConfig label: qsTr("Select Domino Representation") } } } } onClose: home() onLoadData: { if(dataToSave && dataToSave["mode"]) { items.mode = dataToSave["mode"]; } } onSaveData: { var newMode = dialogActivityConfig.configItem.availableModes[dialogActivityConfig.configItem.modeBox.currentIndex].value; if (newMode !== items.mode) { items.mode = newMode; dataToSave = {"mode": items.mode}; } Activity.initLevel(); } function setDefaultValues() { for(var i = 0 ; i < dialogActivityConfig.configItem.availableModes.length ; i++) { if(dialogActivityConfig.configItem.availableModes[i].value === items.mode) { dialogActivityConfig.configItem.modeBox.currentIndex = i; break; } } } } ChooseDiceBar { id: chooseDiceBar mode: items.mode x: background.width / 5 + 20 y: (background.height - background.height/5) * 3 / 5 audioEffects: activity.audioEffects } Bonus { id: bonus winSound: "qrc:/gcompris/src/activities/ballcatch/resource/tuxok.wav" looseSound: "qrc:/gcompris/src/activities/ballcatch/resource/youcannot.wav" onWin: Activity.nextLevel() onLoose: Activity.initLevel() } } } diff --git a/src/activities/roman_numerals/ActivityInfo.qml b/src/activities/roman_numerals/ActivityInfo.qml index 5a545a3fe..4bb6ae6e8 100644 --- a/src/activities/roman_numerals/ActivityInfo.qml +++ b/src/activities/roman_numerals/ActivityInfo.qml @@ -1,44 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Bruno Coudoin < bruno.coudoin@gcompris.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "roman_numerals/RomanNumerals.qml" difficulty: 4 icon: "roman_numerals/roman_numerals.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" demo: true //: Activity title title: qsTr("Roman numerals") //: Help title description: "" //intro: "Learn and practice roman to arabic numerals conversion" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A Roman numeral is the name for a number when it is written in the way the Romans used to write numbers. Roman numerals are not used very often today in the west. They are used to write the names of kings and queens, or popes. For example: Queen Elizabeth II. They may be used to write the year a book or movie was made.\n The building of the roman numbers is made up by an agglutination of numbers (the thousands, joined with the hundreds, joined with the tens, joined with the units → just like the arab decimal system). This agglutination of numbers is interpreted as the sum of these particular numbers (again → just like the arab decimal system: you add up thousands+hundreds+tens+units, and you write the respective figures combined).\n Examples:\n - 2394: we got a sum of 2000 (MM), 300 (CCC), ninety (XC) and 4 units (IV), so we write this combined: MMCCCXCIV\n - MMMCMXLIX: we got first thousands (MMM=3000), then we got hundreds (CM=1000–100=900), then we got tens (XL=50–10=40), and at last we got units (IX=10–1=9), so we write this in the decimal system: 3949).") + 2394: we got a sum of 2000 (MM), 300 (CCC), 90 (XC) and 4 units (IV), so we write this combined: MMCCCXCIV\n + MMMCMXLIX: we got first thousands (MMM=3000), then we got hundreds (CM=1000–100=900), then we got tens (XL=50–10=40), and at last we got units (IX=10–1=9), so we write this in the decimal system: 3949.") credit: "" section: "math" createdInVersion: 7000 } diff --git a/src/activities/roman_numerals/RomanNumerals.qml b/src/activities/roman_numerals/RomanNumerals.qml index 12ecb4969..3b55020c8 100644 --- a/src/activities/roman_numerals/RomanNumerals.qml +++ b/src/activities/roman_numerals/RomanNumerals.qml @@ -1,530 +1,530 @@ /* GCompris - roman_numerals.qml * * Copyright (C) 2016 Bruno Coudoin * * Authors: * Bruno Coudoin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import GCompris 1.0 import "../../core" ActivityBase { id: activity onStart: focus = true onStop: {} pageComponent: Image { id: background source: items.toArabic ? "qrc:/gcompris/src/activities/roman_numerals/resource/arcs.svg" : "qrc:/gcompris/src/activities/roman_numerals/resource/torrazzo-crema.svg" fillMode: Image.PreserveAspectCrop sourceSize.width: Math.max(parent.width, parent.height) signal start signal stop Component.onCompleted: { activity.start.connect(start) activity.stop.connect(stop) } // Add here the QML items you need to access in javascript QtObject { id: items property Item main: activity.main property alias background: background property alias bar: bar property alias bonus: bonus property alias score: score property alias textInput: textInput property bool toArabic: dataset[currentLevel].toArabic property string questionText: dataset[currentLevel].question property string instruction: dataset[currentLevel].instruction property string questionValue property int currentLevel: 0 property int numberOfLevel: dataset.length property var dataset: [ { values: ['I', 'V', 'X', 'L', 'C', 'D', 'M'], instruction: qsTr("The roman numbers are all built out of these 7 numbers:\nI and V (units, 1 and 5)\nX and L (tens, 10 and 50)\nC and D (hundreds, 100 and 500)\n and M (1000).\n An interesting observation here is that the roman numeric system lacks the number 0."), question: qsTr("Convert the roman number %1 in arabic."), toArabic: true }, { values: [1, 5, 10, 50, 100, 500, 1000], instruction: qsTr("The roman numbers are all built out of these 7 numbers:\nI and V (units, 1 and 5)\nX and L (tens, 10 and 50)\nC and D (hundreds, 100 and 500)\n and M (1000).\n An interesting observation here is that the roman numeric system lacks the number 0."), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'], instruction: qsTr("All the units except 4 and 9 are built using sums of I and V:\nI, II, III, V, VI, VII, VIII.\n The 4 and the 9 units are built using differences:\nIV (5 – 1) and IX (10 – 1)"), question: qsTr("Convert the roman number %1 in arabic."), toArabic: true }, { values: [2, 3, 4, 5, 6, 7, 8, 9], instruction: qsTr("All the units except 4 and 9 are built using sums of I and V:\nI, II, III, V, VI, VII, VIII.\n The 4 and the 9 units are built using differences:\nIV (5 – 1) and IX (10 – 1)"), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['XX', 'XXX', 'XL', 'LX', 'LXX', 'LXXX', 'XC'], instruction: qsTr("All the tens except 40 and 90 are built using sums of X and L:\nX, XX, XXX, L, LX, LXX, LXXX.\nThe 40 and the 90 tens are built using differences:\nXL (10 taken from 50) and XC (10 taken from 100)\n "), question: qsTr("Convert the roman number %1 in arabic."), toArabic: true }, { values: [20, 30, 40, 60, 70, 80, 90], instruction: qsTr("All the tens except 40 and 90 are built using sums of X and L:\nX, XX, XXX, L, LX, LXX, LXXX.\nThe 40 and the 90 tens are built using differences:\nXL (10 taken from 50) and XC (10 taken from 100)\n "), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['CC', 'CCC', 'CD', 'DC', 'DCC', 'DCCC', 'CM', ], instruction: qsTr("All the hundreds except 400 and 900 are built using sums of C and D:\nC, CC, CCC, D, DC, DCC, DCCC.\nThe 400 and the 900 hundreds are built using differences:\nCD (100 taken from 500) and CM (100 taken from 1000)"), question: qsTr("Convert the roman number %1 in arabic."), toArabic: true }, { values: [200, 300, 400, 600, 700, 800, 900], instruction: qsTr("All the hundreds except 400 and 900 are built using sums of C and D:\nC, CC, CCC, D, DC, DCC, DCCC.\nThe 400 and the 900 hundreds are built using differences:\nCD (100 taken from 500) and CM (100 taken from 1000)"), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['MM', 'MMM'], instruction: qsTr("Sums of M are used for building thousands: M, MM, MMM.\nNotice that you cannot join more than three identical symbols. The first implication of this rule is that you cannot use just sums for building all possible units, tens or hundreds, you must use differences too. On the other hand, it limits the maximum roman number to 3999 (MMMCMXCIX).\n"), question: qsTr("Convert the roman number %1 in arabic."), toArabic: true }, { values: [2000, 3000], instruction: qsTr("Sums of M are used for building thousands: M, MM, MMM.\nNotice that you cannot join more than three identical symbols. The first implication of this rule is that you cannot use just sums for building all possible units, tens or hundreds, you must use differences too. On the other hand, it limits the maximum roman number to 3999 (MMMCMXCIX).\n"), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['_random_', 50 /* up to this number */ , 10 /* sublevels */], - instruction: qsTr("Now you know the rules, you can read and write any number in roman numerals."), + instruction: qsTr("Now you know the rules, you can read and write numbers in roman numerals."), question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['_random_', 100, 10], instruction: '', question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['_random_', 500, 10], instruction: '', question: qsTr("Convert the arabic number %1 in roman."), toArabic: false }, { values: ['_random_', 1000, 10], instruction: '', question: qsTr("Convert the arabic number %1 in roman."), toArabic: false } ] onQuestionValueChanged: { textInput.text = '' romanConverter.arabic = 0 if(toArabic) keyboard.populateArabic() else keyboard.populateRoman() } function start() { if (!ApplicationInfo.isMobile) textInput.forceActiveFocus(); items.currentLevel = 0 initLevel() } function initLevel() { score.currentSubLevel = 1 initSubLevel() } function initSubLevel() { if(dataset[currentLevel].values[0] == '_random_') { questionValue = Math.round(Math.random() * dataset[currentLevel].values[1] + 1) score.numberOfSubLevels = dataset[currentLevel].values[2] } else { questionValue = dataset[currentLevel].values[score.currentSubLevel - 1] score.numberOfSubLevels = dataset[currentLevel].values.length } } function nextLevel() { if(numberOfLevel - 1 == currentLevel ) { currentLevel = 0 } else { currentLevel++ } initLevel(); } function previousLevel() { if(currentLevel == 0) { currentLevel = numberOfLevel - 1 } else { currentLevel-- } initLevel(); } function nextSubLevel() { if(++score.currentSubLevel > score.numberOfSubLevels) { nextLevel() } else { initSubLevel(); } } property bool isChecking: false function check() { if(isChecking) { return } isChecking = true if(feedback.value == items.questionValue) { bonus.good('tux') } else { bonus.bad('tux') } } } onStart: { items.start() } onStop: { } Keys.onPressed: { if ((event.key === Qt.Key_Enter) || (event.key === Qt.Key_Return)) { items.check() } } QtObject { id: romanConverter property int arabic property string roman // conversion code copied from: // http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter function arabic2Roman(num) { if (!+num) return ''; var digits = String(+num).split(""), key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM", "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC", "","I","II","III","IV","V","VI","VII","VIII","IX"], roman = "", i = 3; while (i--) roman = (key[+digits.pop() + (i * 10)] || "") + roman; return new Array(+digits.join("") + 1).join("M") + roman; } function roman2Arabic(str) { var str = str.toUpperCase(), validator = /^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/, token = /[MDLV]|C[MD]?|X[CL]?|I[XV]?/g, key = {M:1000,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}, num = 0, m; if (!(str && validator.test(str))) return false; while (m = token.exec(str)) num += key[m[0]]; return num; } onArabicChanged: roman = arabic2Roman(arabic) onRomanChanged: arabic = roman2Arabic(roman) } Column { id: column anchors.fill: parent anchors.topMargin: 10 GCText { id: questionLabel anchors.horizontalCenter: parent.horizontalCenter wrapMode: TextEdit.WordWrap text: items.questionValue ? items.questionText.arg(items.questionValue) : '' color: 'white' width: parent.width * 0.9 horizontalAlignment: Text.AlignHCenter Rectangle { z: -1 border.color: 'black' border.width: 1 anchors.centerIn: parent width: parent.width * 1.1 height: parent.height opacity: 0.8 gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } radius: 10 } } Item { // Just a margin width: 1 height: 5 * ApplicationInfo.ratio } TextInput { id: textInput x: parent.width / 2 width: 60 * ApplicationInfo.ratio color: 'white' text: '' maximumLength: items.toArabic ? ('' + romanConverter.roman2Arabic(items.questionValue)).length + 1 : romanConverter.arabic2Roman(items.questionValue).length + 1 horizontalAlignment: Text.AlignHCenter verticalAlignment: TextInput.AlignVCenter anchors.horizontalCenter: parent.horizontalCenter font.pointSize: questionLabel.pointSize font.weight: Font.DemiBold font.family: GCSingletonFontLoader.fontLoader.name font.capitalization: ApplicationSettings.fontCapitalization font.letterSpacing: ApplicationSettings.fontLetterSpacing cursorVisible: true validator: RegExpValidator{regExp: items.toArabic ? /[0-9]+/ : /[ivxlcdmIVXLCDM]*/} onTextChanged: if(text) { text = text.toUpperCase(); if(items.toArabic) romanConverter.arabic = parseInt(text) else romanConverter.roman = text } Rectangle { z: -1 opacity: 0.8 gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } radius: 10 border.color: 'black' border.width: 1 anchors.horizontalCenter: parent.horizontalCenter width: column.width * 0.7 height: parent.height } function appendText(car) { if(car === keyboard.backspace) { if(text && cursorPosition > 0) { var oldPos = cursorPosition text = text.substring(0, cursorPosition - 1) + text.substring(cursorPosition) cursorPosition = oldPos - 1 } return } var oldPos = cursorPosition text = text.substring(0, cursorPosition) + car + text.substring(cursorPosition) cursorPosition = oldPos + 1 } } Item { // Just a margin width: 1 height: 5 * ApplicationInfo.ratio } GCText { id: feedback anchors.horizontalCenter: parent.horizontalCenter text: items.toArabic ? qsTr("Roman value: %1").arg(value) : qsTr('Arabic value: %1').arg(value) color: 'white' Rectangle { z: -1 opacity: 0.8 gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } radius: 10 border.color: 'black' border.width: 1 anchors.centerIn: parent width: parent.width * 1.1 height: parent.height } property string value: items.toArabic ? romanConverter.roman : romanConverter.arabic ? romanConverter.arabic : '' } Item { // Just a margin width: 1 height: 5 * ApplicationInfo.ratio } Rectangle { color: "transparent" width: parent.width height: (background.height - (y + bar.height + okButton.height + keyboard.height) * 1.1 ) Flickable { width: parent.width height: parent.height contentWidth: parent.width contentHeight: instructionContainer.height anchors.fill: parent flickableDirection: Flickable.VerticalFlick clip: true GCText { id: instruction visible: items.instruction != '' wrapMode: TextEdit.WordWrap fontSize: tinySize anchors.horizontalCenter: parent.horizontalCenter width: parent.width * 0.95 text: items.instruction horizontalAlignment: Text.AlignHCenter color: 'white' Rectangle { id: instructionContainer z: -1 opacity: 0.8 gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } radius: 10 border.color: 'black' border.width: 1 anchors.centerIn: parent width: parent.width height: parent.contentHeight } } } } } Score { id: score anchors.bottom: bar.top currentSubLevel: 0 numberOfSubLevels: 1 } DialogHelp { id: dialogHelp onClose: home() } VirtualKeyboard { id: keyboard anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter function populateArabic() { layout = [ [ { label: "0" }, { label: "1" }, { label: "2" }, { label: "3" }, { label: "4" }, { label: "5" }, { label: "6" }, { label: "7" }, { label: "8" }, { label: "9" }, { label: keyboard.backspace } ] ] } function populateRoman() { layout = [ [ { label: "I" }, { label: "V" }, { label: "X" }, { label: "L" }, { label: "C" }, { label: "D" }, { label: "M" }, { label: keyboard.backspace } ] ] } onKeypress: textInput.appendText(text) onError: console.log("VirtualKeyboard error: " + msg); } Bar { id: bar anchors.bottom: keyboard.top content: BarEnumContent { value: help | home | level | hint } onHelpClicked: { displayDialog(dialogHelp) } onPreviousLevelClicked: items.previousLevel() onNextLevelClicked: items.nextLevel() onHomeClicked: activity.home() level: items.currentLevel + 1 onHintClicked: feedback.visible = !feedback.visible } BarButton { id: okButton source: "qrc:/gcompris/src/core/resource/bar_ok.svg"; sourceSize.width: 60 * ApplicationInfo.ratio visible: true anchors { verticalCenter: score.verticalCenter right: score.left rightMargin: 10 * ApplicationInfo.ratio bottomMargin: 10 * ApplicationInfo.ratio } onClicked: items.check() } Bonus { id: bonus Component.onCompleted: win.connect(items.nextSubLevel) onWin: items.isChecking = false onLoose: items.isChecking = false } } } diff --git a/src/activities/solar_system/ActivityInfo.qml b/src/activities/solar_system/ActivityInfo.qml index d8c8a2e30..8409fc6a6 100644 --- a/src/activities/solar_system/ActivityInfo.qml +++ b/src/activities/solar_system/ActivityInfo.qml @@ -1,43 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Aman Kumar Gupta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "solar_system/SolarSystem.qml" difficulty: 5 icon: "solar_system/solar_system.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" demo: true //: Activity title title: qsTr("Solar System") //: Help title - description: qsTr("Answer the questions presented and get a 100% correctness among the options.") + description: qsTr("Answer the questions with a correctness of 100%.") //intro: "Answer the questions presented and get a 100% correctness among the options." //: Help goal goal: qsTr("Learn information about the solar system. If you want to learn more about astronomy, try downloading KStars (https://edu.kde.org/kstars/) or Stellarium (http://stellarium.org/) which are open source astronomy softwares.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click on a planet or the Sun to reveal questions. Each question contains 4 options. One of those is 100% correct. Try to answer the questions until you get a 100% closeness in the closeness meter.") credit: "" section: "experiment" createdInVersion: 9500 } diff --git a/src/activities/solar_system/Dataset.js b/src/activities/solar_system/Dataset.js index d78861827..4941db615 100644 --- a/src/activities/solar_system/Dataset.js +++ b/src/activities/solar_system/Dataset.js @@ -1,383 +1,383 @@ /* GCompris - Dataset.js * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Aman Kumar Gupta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ function get() { return [ { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/sun.png", "bodyName": qsTr("Sun"), "bodySize": 1.3, "levels": [ { // sub-level 1 - "question": qsTr("How large is the Sun compared to other planets in our Solar System?"), + "question": qsTr("How large is the Sun compared to the planets in our Solar System?"), "options": [qsTr("Sixth largest"), qsTr("Third largest"), qsTr("Largest"), qsTr("Seventh largest")], "closeness": [17.5, 67, 100, 1] }, { // sub-level 2 "question": qsTr("The temperature of the Sun is around:"), - "options": [qsTr("1000 degrees celsius"), qsTr("4500 degrees celsius"), qsTr("5505 degrees celsius"), qsTr("3638 degrees celsius")], + "options": [qsTr("1000 °C"), qsTr("4500 °C"), qsTr("5505 °C"), qsTr("3638 °C")], "closeness": [1, 78, 100, 60] }, { // sub-level 3 "question": qsTr("How old is the Sun?"), "options": [qsTr("1.2 billion years"), qsTr("3 billion years"), qsTr("7 billion years"), qsTr("4.5 billion years")], "closeness": [1, 55, 25, 100] }, { // sub-level 4 "question": qsTr("How long does it take for the Sun’s light to reach the Earth?"), "options": [qsTr("8 minutes"), qsTr("30 minutes"), qsTr("60 minutes"), qsTr("15 minutes")], "closeness": [100, 58, 1, 86.6] }, { // sub-level 5 "question": qsTr("The Sun is as big as:"), "options": [qsTr("1 million Earths"), qsTr("2.6 million Earths"), qsTr("1.3 million Earths"), qsTr("5 million Earths")], "closeness": [92, 65, 100, 1] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/mercury.png", "bodyName": qsTr("Mercury"), "bodySize": 0.12, - "temperatureHint": qsTr("The maximum temperature on Earth is 58 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Earth is 58 °C."), "lengthOfYearHint": qsTr("The length of a year on Venus is 225 days."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Mercury in the Solar System?"), "options": [qsTr("Seventh"), qsTr("Sixth"), qsTr("First"), qsTr("Fourth")], "closeness": [1, 17.5, 100, 50.5] }, { // sub-level 2 "question": qsTr("How small is Mercury compared to other planets in our Solar System?"), "options": [qsTr("Smallest"), qsTr("Second smallest"), qsTr("Third smallest"), qsTr("Fifth smallest")], "closeness": [100, 75.3, 50.5, 1] }, { // sub-level 3 "question": qsTr("How many moons has Mercury?"), "options": ["5", "200", "0", "10"], "closeness": [97.5, 1, 100, 95] }, { // sub-level 4 "question": qsTr("The maximum temperature on Mercury is:"), - "options": [qsTr("50 degrees celsius"), qsTr("35 degrees celsius"), qsTr("427 degrees celsius"), qsTr("273 degrees celsius")], + "options": [qsTr("50 °C"), qsTr("35 °C"), qsTr("427 °C"), qsTr("273 °C")], "closeness": [4.8, 1, 100, 61] }, { // sub-level 5 "question": qsTr("How many days make a year on Mercury?"), "options": [qsTr("365 days"), qsTr("433 days"), qsTr("88 days"), qsTr("107 days")], "closeness": [20.5, 1, 100, 94.5] }, { // sub-level 6 "question": qsTr("How long is a day on Mercury?"), "options": [qsTr("50 Earth days"), qsTr("365 Earth days"), qsTr("59 Earth days"), qsTr("107 Earth days")], "closeness": [97, 1, 100, 84.4] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/venus.png", "bodyName": qsTr("Venus"), "bodySize": 0.22, - "temperatureHint": qsTr("The maximum temperature on Earth is 58 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Earth is 58 °C."), "lengthOfYearHint": qsTr("The length of a year on Earth is 365 days."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Venus in the Solar System?"), "options": [qsTr("Seventh"), qsTr("Sixth"), qsTr("Second"), qsTr("Fourth")], "closeness": [1, 20.8, 100, 60.4] }, { // sub-level 2 "question": qsTr("Venus is as heavy as:"), "options": [qsTr("0.7 Earths"), qsTr("0.8 Earths"), qsTr("1.3 Earths"), qsTr("2.5 Earths")], "closeness": [94, 100, 71, 1] }, { // sub-level 3 "question": qsTr("How large is Venus compared to other planets in our Solar System?"), "options": [qsTr("Seventh largest"), qsTr("Sixth largest"), qsTr("Fifth largest"), qsTr("Fourth largest")], "closeness": [50.5, 100, 50.5, 1] }, { // sub-level 4 "question": qsTr("How long is a year on Venus?"), "options": [qsTr("225 days"), qsTr("365 days"), qsTr("116 days"), qsTr("100 days")], "closeness": [100, 1, 23, 11.6] }, { // sub-level 5 "question": qsTr("How long is a day on Venus?"), "options": [qsTr("117 Earth days"), qsTr("365 Earth days"), qsTr("88 Earth days"), qsTr("107 Earth days")], "closeness": [100, 1, 88.8, 96.4] }, { // sub-level 6 "question": qsTr("The maximum temperature on Venus is:"), - "options": [qsTr("100 degrees celsius"), qsTr("20 degrees celsius"), qsTr("467 degrees celsius"), qsTr("45 degrees celsius")], + "options": [qsTr("100 °C"), qsTr("20 °C"), qsTr("467 °C"), qsTr("45 °C")], "closeness": [18.7, 1, 100, 6.5] }, { // sub-level 7 "question": qsTr("How many moons has Venus?"), "options": ["5", "10", "2", "0"], "closeness": [63, 1, 100, 75.3] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/earth.png", "bodyName": qsTr("Earth"), "bodySize": 0.3, - "temperatureHint": qsTr("The maximum temperature on Mars is 20 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Mars is 20 °C."), "lengthOfYearHint": qsTr("The length of a year on Venus is 225 days."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Earth in the Solar System?"), "options": [qsTr("Sixth"), qsTr("Third"), qsTr("First"), qsTr("Fifth")], "closeness": [1, 100, 35, 35] }, { // sub-level 2 "question": qsTr("How long does it take for Earth to complete one year?"), "options": [qsTr("200 days"), qsTr("30 days"), qsTr("7 days"), qsTr("365 days")], "closeness": [54.3, 7.3, 1, 100] }, { // sub-level 3 "question": qsTr("How many moons has Earth?"), "options": ["1", "5", "2", "3"], "closeness": [100, 15, 75, 50.5] }, { // sub-level 4 "question": qsTr("How long is a day on Earth?"), "options": [qsTr("12 hours"), qsTr("24 hours"), qsTr("365 hours"), qsTr("48 hours")], "closeness": [96.5, 100, 1, 93] }, { // sub-level 5 "question": qsTr("How many seasons has Earth?"), "options": ["2", "4", "6", "1"], "closeness": [34, 100, 34, 1] }, { // sub-level 6 "question": qsTr("Maximum temperature on Earth is:"), - "options": [qsTr("100 degrees celsius"), qsTr("58 degrees celsius"), qsTr("30 degrees celsius"), qsTr("45 degrees celsius")], + "options": [qsTr("100 °C"), qsTr("58 °C"), qsTr("30 °C"), qsTr("45 °C")], "closeness": [1, 100, 33, 69.3] }, { // sub-level 7 "question": qsTr("How large is Earth compared to other planets in our Solar System?"), "options": [qsTr("Seventh largest"), qsTr("Sixth largest"), qsTr("Fifth largest"), qsTr("Fourth largest")], "closeness": [1, 50.5, 100, 50.5] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/mars.png", "bodyName": qsTr("Mars"), "bodySize": 0.15, - "temperatureHint": qsTr("The maximum temperature on Earth is 58 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Earth is 58 °C."), "lengthOfYearHint": qsTr("The length of a year on Earth is 365 days."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Mars in the Solar System?"), "options": [qsTr("Sixth"), qsTr("Fourth"), qsTr("First"), qsTr("Fifth")], "closeness": [34, 100, 1, 67] }, { // sub-level 2 "question": qsTr("The maximum temperature on Mars is:"), - "options": [qsTr("20 degrees celsius"), qsTr("35 degrees celsius"), qsTr("100 degrees celsius"), qsTr("60 degrees celsius")], + "options": [qsTr("20 °C"), qsTr("35 °C"), qsTr("100 °C"), qsTr("60 °C")], "closeness": [100, 81.4, 1, 51.5] }, { // sub-level 3 "question": qsTr("How big is the size of Mars compared to Earth?"), "options": [qsTr("The same"), qsTr("Half"), qsTr("Two times"), qsTr("Three times")], "closeness": [80, 100, 40.6, 1] }, { // sub-level 4 "question": qsTr("How many moons has Mars?"), "options": ["1", "5", "2", "3"], "closeness": [67, 1, 100, 50.5] }, { // sub-level 5 "question": qsTr("How long is a day on Mars?"), "options": [qsTr("12 hours"), qsTr("24 hours"), qsTr("24.5 hours"), qsTr("48 hours")], "closeness": [47.3, 91, 100, 1] }, { // sub-level 6 "question": qsTr("How long does it take for Mars to complete one year?"), "options": [qsTr("687 days"), qsTr("30 days"), qsTr("7 days"), qsTr("365 days")], "closeness": [100, 4.3, 1, 53] }, { // sub-level 7 "question": qsTr("How small is Mars compared to other planets in our Solar System?"), "options": [qsTr("Smallest"), qsTr("Second smallest"), qsTr("Third smallest"), qsTr("Fifth smallest")], "closeness": [67, 100, 67, 1] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/jupiter.png", "bodyName": qsTr("Jupiter"), "bodySize": 1, - "temperatureHint": qsTr("The maximum temperature on Mars is 20 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Mars is 20 °C."), "lengthOfYearHint": qsTr("The length of a year on Saturn is 29.5 Earth years."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Jupiter in the Solar System?"), "options": [qsTr("Sixth"), qsTr("Fifth"), qsTr("First"), qsTr("Fourth")], "closeness": [75, 100, 1, 75] }, { // sub-level 2 "question": qsTr("How large is Jupiter compared to other planets in the Solar System?"), "options": [qsTr("Third largest"), qsTr("Largest"), qsTr("Fifth largest"), qsTr("Second largest")], "closeness": [50.5, 100, 1, 75] }, { // sub-level 3 "question": qsTr("The minimum temperature on Jupiter is:"), - "options": [qsTr("-145 degrees celsius"), qsTr("100 degrees celsius"), qsTr("50 degrees celsius"), qsTr("-180 degrees celsius")], + "options": [qsTr("-145 °C"), qsTr("100 °C"), qsTr("50 °C"), qsTr("-180 °C")], "closeness": [100, 63, 24.7, 1] }, { // sub-level 4 "question": qsTr("How many moons has Jupiter?"), "options": ["1", "20", "25", "53"], "closeness": [1, 37, 46.7, 100] }, { // sub-level 5 "question": qsTr("How long is one day on Jupiter?"), "options": [qsTr("10 hours"), qsTr("24 hours"), qsTr("12 hours"), qsTr("48 hours")], "closeness": [100, 63.5, 94.8, 1] }, { // sub-level 6 "question": qsTr("How long does it take for Jupiter to complete one year?"), "options": [qsTr("5 Earth years"), qsTr("12 Earth years"), qsTr("30 Earth years"), qsTr("1 Earth year")], "closeness": [61.5, 100, 1, 39.5] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/saturn.png", "bodyName": qsTr("Saturn"), "bodySize": 1.2, - "temperatureHint": qsTr("The minimum temperature on Jupiter is -145 degrees celsius."), + "temperatureHint": qsTr("The minimum temperature on Jupiter is -145 °C."), "lengthOfYearHint": qsTr("The length of a year on Jupiter is 12 Earth years."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Saturn in the Solar System?"), "options": [qsTr("Sixth"), qsTr("Fourth"), qsTr("First"), qsTr("Fifth")], "closeness": [100, 60.4, 1, 80] }, { // sub-level 2 "question": qsTr("How large is Saturn compared to other planets in the Solar System?"), "options": [qsTr("Third largest"), qsTr("Largest"), qsTr("Fifth largest"), qsTr("Second largest")], "closeness": [67, 67, 1, 100] }, { // sub-level 3 "question": qsTr("How many moons has Saturn?"), "options": ["120", "1", "150", "200"], "closeness": [80, 1, 100, 60.8] }, { // sub-level 4 "question": qsTr("How long is one day on Saturn?"), "options": [qsTr("10.5 hours"), qsTr("24 hours"), qsTr("12 hours"), qsTr("48 hours")], "closeness": [100, 64.3, 96, 1] }, { // sub-level 5 "question": qsTr("The minimum temperature on Saturn is:"), - "options": [qsTr("0 degrees celsius"), qsTr("100 degrees celsius"), qsTr("-178 degrees celsius"), qsTr("-100 degrees celsius")], + "options": [qsTr("0 °C"), qsTr("100 °C"), qsTr("-178 °C"), qsTr("-100 °C")], "closeness": [36.6, 1, 100, 72] }, { // sub-level 6 "question": qsTr("How long does it take for Saturn to complete one year?"), "options": [qsTr("29.5 Earth years"), qsTr("20 Earth years"), qsTr("10 Earth years"), qsTr("1 Earth year")], "closeness": [100, 67, 32, 1] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/uranus.png", "bodyName": qsTr("Uranus"), "bodySize": 0.5, - "temperatureHint": qsTr("The temperature on Saturn is -178 degrees celsius."), + "temperatureHint": qsTr("The temperature on Saturn is -178 °C."), "lengthOfYearHint": qsTr("The length of a year on Saturn is 29.5 Earth years."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Uranus in the Solar System?"), "options": [qsTr("Seventh"), qsTr("Fourth"), qsTr("Eighth"), qsTr("Fifth")], "closeness": [100, 1, 67, 34] }, { // sub-level 2 "question": qsTr("How many years does it take for Uranus to go once around the Sun?"), "options": [qsTr("1 year"), qsTr("24 years"), qsTr("68 years"), qsTr("84 years")], "closeness": [1, 28.4, 81, 100] }, { // sub-level 3 "question": qsTr("How many moons has Uranus?"), "options": ["120", "87", "27", "50"], "closeness": [1, 36, 100, 75.5] }, { // sub-level 4 "question": qsTr("How long is one day on Uranus?"), "options": [qsTr("10 hours"), qsTr("27 hours"), qsTr("17 hours"), qsTr("48 hours")], "closeness": [77.6, 68, 100, 1] }, { // sub-level 5 "question": qsTr("How large is Uranus compared to other planets in the Solar System?"), "options": [qsTr("Third largest"), qsTr("Largest"), qsTr("Seventh largest"), qsTr("Second largest")], "closeness": [100, 50.5, 1, 75] }, { // sub-level 6 "question": qsTr("The maximum temperature on Uranus is:"), - "options": [qsTr("100 degrees celsius"), qsTr("-216 degrees celsius"), qsTr("0 degrees celsius"), qsTr("-100 degrees celsius")], + "options": [qsTr("100 °C"), qsTr("-216 °C"), qsTr("0 °C"), qsTr("-100 °C")], "closeness": [1, 100, 32.3, 63.6] } ] }, { "realImg": "qrc:/gcompris/src/activities/solar_system/resource/neptune.png", "bodyName": qsTr("Neptune"), "bodySize": 0.4, - "temperatureHint": qsTr("The maximum temperature on Saturn is -178 degrees celsius."), + "temperatureHint": qsTr("The maximum temperature on Saturn is -178 °C."), "lengthOfYearHint": qsTr("The length of a year on Uranus is 84 years."), "levels": [ { // sub-level 1 "question": qsTr("At which position is Neptune in the Solar System?"), "options": [qsTr("Seventh"), qsTr("Fourth"), qsTr("Eighth"), qsTr("Fifth")], "closeness": [75, 1, 100, 25.7] }, { // sub-level 2 "question": qsTr("How long does it take for Neptune to make one revolution around the Sun?"), "options": [qsTr("165 years"), qsTr("3 years"), qsTr("100 years"), qsTr("1 year")], "closeness": [100, 2, 60.7, 1] }, { // sub-level 3 "question": qsTr("How many moons has Neptune?"), "options": ["120", "87", "14", "50"], "closeness": [1, 31.8, 100, 66.3] }, { // sub-level 4 "question": qsTr("How long is one day on Neptune?"), "options": [qsTr("16 hours"), qsTr("27 hours"), qsTr("17 hours"), qsTr("48 hours")], "closeness": [100, 66, 97, 1] }, { // sub-level 5 "question": qsTr("The average temperature on Neptune is:"), - "options": [qsTr("100 degrees celsius"), qsTr("30 degrees celsius"), qsTr("-210 degrees celsius"), qsTr("-100 degrees celsius")], + "options": [qsTr("100 °C"), qsTr("30 °C"), qsTr("-210 °C"), qsTr("-100 °C")], "closeness": [1, 23, 100, 64] }, { // sub-level 6 "question": qsTr("How large is Neptune compared to other planets in the Solar System?"), "options": [qsTr("Fourth largest"), qsTr("Largest"), qsTr("Third largest"), qsTr("Second largest")], "closeness": [100, 1, 67, 34] } ] } ]; } diff --git a/src/activities/solar_system/QuizScreen.qml b/src/activities/solar_system/QuizScreen.qml index 1141f08cd..084460ae0 100644 --- a/src/activities/solar_system/QuizScreen.qml +++ b/src/activities/solar_system/QuizScreen.qml @@ -1,307 +1,307 @@ /* GCompris - QuizScreen.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Aman Kumar Gupta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import GCompris 1.0 import QtGraphicalEffects 1.0 import QtQuick.Controls 1.5 import "../../core" import "solar_system.js" as Activity Item { id: mainQuizScreen width: parent.width height: parent.height focus: true property alias score: score property alias optionListModel: optionListModel property alias restartAssessmentMessage: restartAssessmentMessage property alias blockAnswerButtons: optionListView.blockAnswerButtons property alias closenessMeter: closenessMeter property string planetRealImage property string question property string closenessMeterValue property int numberOfCorrectAnswers: 0 Rectangle { id: questionArea anchors.right: score.left anchors.top: parent.top anchors.left: parent.left anchors.margins: 10 * ApplicationInfo.ratio height: questionText.height + 10 * ApplicationInfo.ratio color: 'white' radius: 10 border.width: 3 opacity: 0.8 border.color: "black" GCText { id: questionText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter anchors.centerIn: parent.Center color: "black" width: parent.width wrapMode: Text.Wrap text: mainQuizScreen.question } } // Model of options for a question ListModel { id: optionListModel } // This grid has image of the planet in its first column/row (row in case of vertical screen) and the options on the 2nd column/row Grid { id: imageAndOptionGrid columns: (background.horizontalLayout && !items.assessmentMode && items.bar.level != 2) ? 2 : 1 spacing: 10 * ApplicationInfo.ratio anchors.top: (questionArea.y + questionArea.height) > (score.y + score.height) ? questionArea.bottom : score.bottom anchors.left: parent.left anchors.right: parent.right // An item to hold image of the planet Item { width: background.horizontalLayout ? background.width * 0.40 : background.width - imageAndOptionGrid.anchors.margins * 2 height: background.horizontalLayout ? background.height - bar.height - questionArea.height - 10 * ApplicationInfo.ratio : (background.height - bar.height - questionArea.height - 10 * ApplicationInfo.ratio) * 0.37 visible: !items.assessmentMode && (items.bar.level != 2) Image { id: planetImageMain sourceSize.width: Math.min(parent.width, parent.height) * 0.9 anchors.centerIn: parent source: mainQuizScreen.planetRealImage fillMode: Image.PreserveAspectCrop } } // An item to hold the list view of options Item { width: ( items.assessmentMode || items.bar.level == 2 ) ? mainQuizScreen.width : background.horizontalLayout ? background.width * 0.55 : background.width - imageAndOptionGrid.anchors.margins * 2 height: background.horizontalLayout ? itemHeightHorizontal : itemHeightVertical readonly property real itemHeightHorizontal: background.height - bar.height - closenessMeter.height - questionArea.height - 10 * ApplicationInfo.ratio readonly property real itemHeightVertical: (items.bar.level != 2 && !items.assessmentMode) ? itemHeightHorizontal * 0.39 : itemHeightHorizontal * 0.8 ListView { id: optionListView anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter width: background.horizontalLayout ? background.width * 0.40 : background.width - imageAndOptionGrid.anchors.margins * 2 height: background.horizontalLayout ? background.height - bar.height - closenessMeter.height * 1.5 - questionArea.height - 50 * ApplicationInfo.ratio : parent.itemHeightVertical spacing: background.horizontalLayout ? 10 * ApplicationInfo.ratio : 7.5 * ApplicationInfo.ratio orientation: Qt.Vertical verticalLayoutDirection: ListView.TopToBottom interactive: false model: optionListModel readonly property real buttonHeight: (height - 3 * spacing) / 4 add: Transition { NumberAnimation { properties: "y"; from: parent.y; duration: 500 } onRunningChanged: { optionListView.blockAnswerButtons = running } } property bool blockAnswerButtons: false delegate: AnswerButton { id: optionButton width: parent.width height: optionListView.buttonHeight textLabel: optionValue anchors.right: parent.right anchors.left: parent.left blockAllButtonClicks: optionListView.blockAnswerButtons isCorrectAnswer: closeness === 100 onPressed: optionListView.blockAnswerButtons = true onIncorrectlyPressed: { if(!items.assessmentMode) { closenessMeter.stopAnimations() closenessMeterIncorrectAnswerAnimation.start() mainQuizScreen.closenessMeterValue = closeness } else { optionListView.blockAnswerButtons = false Activity.appendAndAddQuestion() } } onCorrectlyPressed: { if(!items.assessmentMode) { closenessMeter.stopAnimations() particles.burst(30) closenessMeterCorrectAnswerAnimation.start() mainQuizScreen.closenessMeterValue = closeness } else { Activity.assessmentModeQuestions.shift() mainQuizScreen.numberOfCorrectAnswers++ Activity.nextSubLevel(true) } } } } } } Rectangle { id: closenessMeter x: ((background.width - items.bar.barZoom * items.bar.fullButton * 5.6) < (width + 10 * ApplicationInfo.ratio) && background.horizontalLayout) ? background.width - width - 42 * ApplicationInfo.ratio : background.width - width - 10 * ApplicationInfo.ratio y: (background.width - items.bar.barZoom * items.bar.fullButton * 5.6) < (width + 10 * ApplicationInfo.ratio) ? background.height - bar.height - height - 10 * ApplicationInfo.ratio : background.height - height - 10 * ApplicationInfo.ratio height: 40 * ApplicationInfo.ratio width: 150 * ApplicationInfo.ratio radius: width * 0.06 border.width: 2 border.color: "black" opacity: 0.78 visible: !items.assessmentMode Item { width: parent.width - 3 * ApplicationInfo.ratio height: parent.height anchors.centerIn: parent GCText { id: closenessText color: "black" anchors.fill: parent fontSizeMode: Text.Fit horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - text: qsTr("Closeness: %1%").arg(closenessMeterValue) + text: qsTr("Accuracy: %1%").arg(closenessMeterValue) } } SequentialAnimation { id: closenessMeterIncorrectAnswerAnimation onStarted: optionListView.blockAnswerButtons = true NumberAnimation { target: closenessMeter; property: "scale"; to: 1.1; duration: 450 } NumberAnimation { target: closenessMeter; property: "scale"; to: 1.0; duration: 450 } onStopped: optionListView.blockAnswerButtons = false } SequentialAnimation { id: closenessMeterCorrectAnswerAnimation onStarted: optionListView.blockAnswerButtons = true NumberAnimation { target: closenessMeter; property: "scale"; to: 1.1; duration: 450 } NumberAnimation { target: closenessMeter; property: "scale"; to: 1.0; duration: 450 } NumberAnimation { target: closenessMeter; property: "scale"; to: 1.1; duration: 450 } NumberAnimation { target: closenessMeter; property: "scale"; to: 1.0; duration: 450 } ScriptAction { script: { Activity.nextSubLevel() } } } ParticleSystemStarLoader { id: particles clip: false } function stopAnimations() { optionListView.blockAnswerButtons = false closenessMeterCorrectAnswerAnimation.stop() closenessMeterIncorrectAnswerAnimation.stop() } } ProgressBar { id: progressBar height: bar.height * 0.35 width: parent.width * 0.35 readonly property real percentage: (mainQuizScreen.numberOfCorrectAnswers / score.numberOfSubLevels) * 100 readonly property string message: qsTr("%1%").arg(value) value: Math.round(percentage * 10) / 10 maximumValue: 100 visible: items.assessmentMode y: parent.height - bar.height - height - 10 * ApplicationInfo.ratio x: parent.width - width * 1.1 GCText { id: progressbarText anchors.centerIn: parent fontSize: mediumSize font.bold: true color: "black" text: parent.message z: 2 } } Rectangle { id: restartAssessmentMessage width: parent.width height: parent.height - bar.height * 1.25 anchors.top: parent.top anchors.margins: 10 * ApplicationInfo.ratio anchors.horizontalCenter: parent.horizontalCenter radius: 4 * ApplicationInfo.ratio visible: items.assessmentMode && (score.currentSubLevel >= score.numberOfSubLevels) z: 4 GCText { anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter wrapMode: Text.WordWrap fontSizeMode: mediumSize - text: qsTr("Your final score is: %1%.

%2").arg(progressBar.value).arg(progressBar.value <= 90 ? qsTr("You should score above 90% to become a Solar System expert!
Retry to test your skills more or train in normal mode to explore more about the Solar System.") : qsTr("Great! You can replay the assessment to test your knowledge on more questions.")) + text: qsTr("Your final score is: %1%.

%2").arg(progressBar.value).arg(progressBar.value <= 90 ? qsTr("You should score above 90% to become a Solar System expert!
Retry to test your skills again or train in normal mode to explore more about the Solar System.") : qsTr("Great! You can replay the assessment to test your knowledge on more questions.")) } // To prevent clicking on options under it MouseArea { anchors.fill: parent } onVisibleChanged: scaleAnimation.start() NumberAnimation { id: scaleAnimation target: restartAssessmentMessage properties: "scale" from: 0 to: 1 duration: 1500 easing.type: Easing.OutBounce } } Score { id: score anchors.bottom: undefined anchors.right: parent.right anchors.rightMargin: 10 * ApplicationInfo.ratio anchors.top: parent.top z: 0 } }