diff --git a/src/activities/algebra_by/ActivityConfig.qml b/src/activities/algebra_by/ActivityConfig.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/ActivityConfig.qml @@ -0,0 +1,68 @@ +/* GCompris - ActivityConfig.qml + * +* Copyright (C) 2020 Johnny Jazeix + * + * Authors: + * 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 QtQuick 2.6 +import GCompris 1.0 + +import "../../core" + +Item { + id: activityConfiguration + property Item background + property alias speedSlider: speedSlider + property int speedSetting: 5 + + Flow { + id: flow + spacing: 5 + width: parent.width + GCText { + id: speedSliderText + text: qsTr("Speed") + fontSize: mediumSize + wrapMode: Text.WordWrap + } + Flow { + width: dialogActivityConfig.width + spacing: 5 + GCSlider { + id: speedSlider + width: 250 * ApplicationInfo.ratio + value: speedSetting + maximumValue: 5 + minimumValue: 1 + scrollEnabled: false + } + } + } + + property var dataToSave + function setDefaultValues() { + speedSlider.value = Qt.binding(function() {return activityConfiguration.speedSetting;}) + if(dataToSave && dataToSave.speedSetting) { + activityConfiguration.speedSetting = dataToSave.speedSetting + } + } + function saveValues() { + var oldSpeed = activityConfiguration.speedSetting + speedSetting = speedSlider.value + dataToSave = {"speedSetting": speedSetting} + } +} diff --git a/src/activities/algebra_by/ActivityInfo.qml b/src/activities/algebra_by/ActivityInfo.qml --- a/src/activities/algebra_by/ActivityInfo.qml +++ b/src/activities/algebra_by/ActivityInfo.qml @@ -37,5 +37,5 @@ credit: "" section: "math multiplication arithmetic" createdInVersion: 0 - levels: "1,2,3,4" + levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_by/Algebra.qml b/src/activities/algebra_by/Algebra.qml --- a/src/activities/algebra_by/Algebra.qml +++ b/src/activities/algebra_by/Algebra.qml @@ -24,7 +24,6 @@ ActivityBase { id: activity - property int speedSetting: 5 property alias operand: operand @@ -41,7 +40,7 @@ signal stop Component.onCompleted: { - dialogActivityConfig.getInitialConfiguration() + dialogActivityConfig.initialize() activity.start.connect(start) activity.stop.connect(stop) } @@ -52,64 +51,37 @@ property alias bar: bar property alias bonus: bonus property alias score: score + property alias okButton: okButton property alias balloon: balloon property alias timer: timer + property var levels: activity.datasetLoader.data.length !== 0 ? activity.datasetLoader.data : null property GCSfx audioEffects: activity.audioEffects } onStart: Activity.start(coreItems, otherItems, operand, speedSetting) onStop: Activity.stop() - DialogActivityConfig { + DialogChooseLevel { id: dialogActivityConfig - currentActivity: activity - content: Component { - Item { - property alias speedSlider: speedSlider - height: column.height - - Column { - id: column - spacing: 10 * ApplicationInfo.ratio - width: parent.width - GCText { - id: speedSliderText - text: qsTr("Speed") - fontSize: mediumSize - wrapMode: Text.WordWrap - } - Flow { - width: dialogActivityConfig.width - spacing: 5 - GCSlider { - id: speedSlider - width: 250 * ApplicationInfo.ratio - value: activity.speedSetting - maximumValue: 5 - minimumValue: 1 - scrollEnabled: false - } - } - } - } + currentActivity: activity.activityInfo + onClose: { + home() + } + onSaveData: { + levelFolder = dialogActivityConfig.chosenLevels + currentActivity.currentLevels = dialogActivityConfig.chosenLevels + ApplicationSettings.setCurrentLevels(currentActivity.name, dialogActivityConfig.chosenLevels) } - onClose: home() onLoadData: { - if(dataToSave) { - if(dataToSave["speedSetting"]) { - activity.speedSetting = dataToSave["speedSetting"]; - } + if(activityData && activityData["speedSetting"]) { + activity.speedSetting = activityData["speedSetting"]; } } - onSaveData: { - var oldSpeed = activity.speedSetting - activity.speedSetting = dialogActivityConfig.configItem.speedSlider.value - if(oldSpeed != activity.speedSetting) { - dataToSave = {"speedSetting": activity.speedSetting}; - background.stop(); - background.start(); - } + + onStartActivity: { + background.stop() + background.start() } } @@ -129,8 +101,7 @@ height: background.height Bar { id: bar - - content: BarEnumContent { value: (help | home | level | config) } + content: BarEnumContent { value: (help | home | level | activityConfig)} onHelpClicked: { displayDialog(dialogHelpLeftRight) } @@ -140,14 +111,49 @@ onNextLevelClicked: { Activity.nextLevel() } - onConfigClicked: { - dialogActivityConfig.active = true - displayDialog(dialogActivityConfig) - } + onActivityConfigClicked: { + displayDialog(dialogActivityConfig) + } onHomeClicked: home() } } + BarButton { + id: okButton + x: parent.width * 0.7 + z: 10 + source: "qrc:/gcompris/src/core/resource/bar_ok.svg" + anchors.bottom: score.top + anchors.bottomMargin: 0.8 * height + height: 0.80 * bar.height; + width: height + sourceSize.height: height + sourceSize.width: height + onClicked: Activity.questionsLeft(); + enabled: false + } + + Keys.onReturnPressed: { + if(okButton.enabled === true){ + okButton.clicked() + okButtonAnimation.start() + } + } + + Keys.onEnterPressed: { + if(okButton.enabled === true){ + okButton.clicked() + okButtonAnimation.start() + } + } + + SequentialAnimation { + id: okButtonAnimation + running: false + NumberAnimation { target: okButton; property: "scale"; to: 0.9; duration: 70 } + NumberAnimation { target: okButton; property: "scale"; to: 1; duration: 70 } + } + Balloon { id: balloon onTimeout: bonus.bad("smiley") @@ -183,7 +189,7 @@ NumPad { id: numpad - onAnswerChanged: Activity.questionsLeft() + onAnswerChanged: Activity.coreItems.okButton.enabled = (answer != "") maxDigit: ('' + otherItems.result).length + 1 } diff --git a/src/activities/algebra_by/algebra.js b/src/activities/algebra_by/algebra.js --- a/src/activities/algebra_by/algebra.js +++ b/src/activities/algebra_by/algebra.js @@ -21,37 +21,31 @@ .import "qrc:/gcompris/src/core/core.js" as Core var currentLevel +var maxLevel var coreItems var otherItems +var dataset var operand var secondOperandVal var firstOperandVal -var operations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +var subLevelData = [] var speedSetting var OperandsEnum = { TIMES_SIGN : "\u00D7", PLUS_SIGN : "\u002B", MINUS_SIGN : "\u2212", DIVIDE_SIGN : "\u2215" } -var nbLevel = operations.length function start(coreItems_, otherItems_, operand_, speedSetting_) { operand = operand_ coreItems = coreItems_ otherItems = otherItems_ speedSetting = speedSetting_ currentLevel = 0 - coreItems.score.numberOfSubLevels = 10 - // for multiplication and addition, the first levels will display - // currentLevel * N (N behind random) - // where the last levels will do: - // N * currentLevel - if(operand.text === OperandsEnum.TIMES_SIGN || operand.text === OperandsEnum.PLUS_SIGN) - nbLevel = 2 * operations.length - else - nbLevel = operations.length + dataset = coreItems.levels + maxLevel = dataset.length initLevel() } @@ -62,61 +56,65 @@ function initLevel() { coreItems.bar.level = currentLevel + 1 coreItems.score.visible = false + coreItems.okButton.visible = false coreItems.score.currentSubLevel = 1 - operations = Core.shuffle(operations) + subLevelData = [] + if(currentLevel === maxLevel) + initLastLevel(); + else { + coreItems.score.numberOfSubLevels = dataset[currentLevel].operands.length; + for( var i = 0; i < coreItems.score.numberOfSubLevels; i++) + subLevelData.push([dataset[currentLevel].operands[i].first, dataset[currentLevel].operands[i].second]) + } + subLevelData = Core.shuffle(subLevelData) calculateOperands() - otherItems.iAmReady.visible = true otherItems.firstOp.visible = false otherItems.secondOp.visible = false coreItems.balloon.stopMoving() } +function circularShiftElements() { + if(!validateAnswer(parseInt(otherItems.numpad.answer))) + subLevelData.push(subLevelData.shift()) + else + subLevelData.shift() +} + function nextLevel() { - if(++currentLevel >= nbLevel) { + if(maxLevel < ++currentLevel) { currentLevel = 0 } initLevel(); } function previousLevel() { if(--currentLevel < 0) { - currentLevel = nbLevel - 1 + currentLevel = maxLevel } initLevel(); } +/* last level will generate by this function,it will always contain randomly picked questions from previous levels"*/ +function initLastLevel() { + coreItems.score.numberOfSubLevels = maxLevel * 5; + for (var i = 0; i < coreItems.score.numberOfSubLevels; i++) { + //randomly choose a level + var randomLevel = Math.floor(Math.random() * maxLevel) + // randomly choose question from level + var randomIndex = Math.floor(Math.random() * dataset[randomLevel].operands.length) + subLevelData.push([dataset[randomLevel].operands[randomIndex].first, dataset[randomLevel].operands[randomIndex].second]) + } +} + function calculateOperands() { - switch(operand.text) - { - case OperandsEnum.TIMES_SIGN: - firstOperandVal = coreItems.bar.level - secondOperandVal = operations[coreItems.score.currentSubLevel - 1] - break; - case OperandsEnum.PLUS_SIGN: - firstOperandVal = coreItems.bar.level - secondOperandVal = operations[coreItems.score.currentSubLevel - 1] - break; - case OperandsEnum.MINUS_SIGN: - firstOperandVal = coreItems.bar.level + 9 - secondOperandVal = operations[coreItems.score.currentSubLevel - 1] - break; - case OperandsEnum.DIVIDE_SIGN: - firstOperandVal = coreItems.bar.level * operations[coreItems.score.currentSubLevel - 1] - secondOperandVal = coreItems.bar.level - break; - } - if(currentLevel < operations.length) { - otherItems.firstOp.text = firstOperandVal - otherItems.secondOp.text = secondOperandVal - } else { - otherItems.firstOp.text = secondOperandVal - // Don't forget to remove the first operations.length levels - firstOperandVal -= operations.length - otherItems.secondOp.text = firstOperandVal - } + firstOperandVal = subLevelData[0][0] + secondOperandVal = subLevelData[0][1] + + otherItems.firstOp.text = firstOperandVal + otherItems.secondOp.text = secondOperandVal } // Return the expected answer @@ -131,7 +129,7 @@ case OperandsEnum.MINUS_SIGN: return (firstOperandVal - secondOperandVal) - + case OperandsEnum.DIVIDE_SIGN: return (firstOperandVal / secondOperandVal) } @@ -149,12 +147,16 @@ otherItems.iAmReady.visible = false otherItems.firstOp.visible = true otherItems.secondOp.visible = true + coreItems.okButton.visible = true otherItems.numpad.answerFlag = false otherItems.result = getAnswer() coreItems.balloon.startMoving(100000 / speedSetting) } function questionsLeft() { + coreItems.okButton.enabled = false + coreItems.balloon.startMoving(100000 / speedSetting) + circularShiftElements() if(validateAnswer(parseInt(otherItems.numpad.answer))) { otherItems.numpad.answerFlag = true @@ -168,4 +170,6 @@ coreItems.bonus.good("smiley"); } } + else + coreItems.bonus.bad("smiley"); } diff --git a/src/activities/algebra_by/resource/1/Data.qml b/src/activities/algebra_by/resource/1/Data.qml --- a/src/activities/algebra_by/resource/1/Data.qml +++ b/src/activities/algebra_by/resource/1/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2018 Johnny Jazeix + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Johnny Jazeix + * Shubham Mishra * * 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 @@ -21,27 +21,52 @@ import "../../../../core" Dataset { - objective: qsTr("This is a long long long long objective. We want to see it it can display long long texts. But it is not long long long enough. Or maybe it is...") + objective: qsTr("Learn multiplication table of 1") + difficulty: 5 data: [ - { - "maxNumber": 1, /* Max number on each domino side */ - "minNumber": 1, - "numberOfFish": 3 - }, - { - "maxNumber": 2, - "minNumber": 1, - "numberOfFish": 4 - }, - { - "maxNumber": 3, - "minNumber": 1, - "numberOfFish": 5 - }, - { - "maxNumber": 4, - "minNumber": 1, - "numberOfFish": 5 - } + { + "operands": [ + { + "first": 1, + "second": 1 + }, + { + "first": 1, + "second": 2 + }, + { + "first": 1, + "second": 3 + }, + { + "first": 1, + "second": 4 + }, + { + "first": 1, + "second": 5 + }, + { + "first": 1, + "second": 6 + }, + { + "first": 1, + "second": 7 + }, + { + "first": 1, + "second": 8 + }, + { + "first": 1, + "second": 9 + }, + { + "first": 1, + "second": 10 + }, + ] + } ] } diff --git a/src/activities/algebra_by/resource/10/Data.qml b/src/activities/algebra_by/resource/10/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/10/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 10") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 10, + "second": 1 + }, + { + "first": 10, + "second": 2 + }, + { + "first": 10, + "second": 3 + }, + { + "first": 10, + "second": 4 + }, + { + "first": 10, + "second": 5 + }, + { + "first": 10, + "second": 6 + }, + { + "first": 10, + "second": 7 + }, + { + "first": 10, + "second": 8 + }, + { + "first": 10, + "second": 9 + }, + { + "first": 10, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_by/resource/2/Data.qml b/src/activities/algebra_by/resource/2/Data.qml --- a/src/activities/algebra_by/resource/2/Data.qml +++ b/src/activities/algebra_by/resource/2/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2018 Johnny Jazeix + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Johnny Jazeix + * Shubham Mishra * * 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 @@ -21,27 +21,52 @@ import "../../../../core" Dataset { - objective: qsTr("obj 2") + objective: qsTr("Learn multiplication table of 2") + difficulty: 5 data: [ - { - "maxNumber": 1, /* Max number on each domino side */ - "minNumber": 1, - "numberOfFish": 3 - }, - { - "maxNumber": 2, - "minNumber": 1, - "numberOfFish": 4 - }, - { - "maxNumber": 3, - "minNumber": 1, - "numberOfFish": 5 - }, - { - "maxNumber": 4, - "minNumber": 1, - "numberOfFish": 5 - } + { + "operands": [ + { + "first": 2, + "second": 1 + }, + { + "first": 2, + "second": 2 + }, + { + "first": 2, + "second": 3 + }, + { + "first": 2, + "second": 4 + }, + { + "first": 2, + "second": 5 + }, + { + "first": 2, + "second": 6 + }, + { + "first": 2, + "second": 7 + }, + { + "first": 2, + "second": 8 + }, + { + "first": 2, + "second": 9 + }, + { + "first": 2, + "second": 10 + }, + ] + } ] } diff --git a/src/activities/algebra_by/resource/3/Data.qml b/src/activities/algebra_by/resource/3/Data.qml --- a/src/activities/algebra_by/resource/3/Data.qml +++ b/src/activities/algebra_by/resource/3/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2018 Johnny Jazeix + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Johnny Jazeix + * Shubham Mishra * * 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 @@ -21,27 +21,52 @@ import "../../../../core" Dataset { - objective: qsTr("obj 3") + objective: qsTr("Learn multiplication table of 3") + difficulty: 6 data: [ - { - "maxNumber": 1, /* Max number on each domino side */ - "minNumber": 1, - "numberOfFish": 3 - }, - { - "maxNumber": 2, - "minNumber": 1, - "numberOfFish": 4 - }, - { - "maxNumber": 3, - "minNumber": 1, - "numberOfFish": 5 - }, - { - "maxNumber": 4, - "minNumber": 1, - "numberOfFish": 5 - } + { + "operands": [ + { + "first": 3, + "second": 1 + }, + { + "first": 3, + "second": 2 + }, + { + "first": 3, + "second": 3 + }, + { + "first": 3, + "second": 4 + }, + { + "first": 3, + "second": 5 + }, + { + "first": 3, + "second": 6 + }, + { + "first": 3, + "second": 7 + }, + { + "first": 3, + "second": 8 + }, + { + "first": 3, + "second": 9 + }, + { + "first": 3, + "second": 10 + }, + ] + } ] } diff --git a/src/activities/algebra_by/resource/4/Data.qml b/src/activities/algebra_by/resource/4/Data.qml --- a/src/activities/algebra_by/resource/4/Data.qml +++ b/src/activities/algebra_by/resource/4/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2018 Johnny Jazeix + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Johnny Jazeix + * Shubham Mishra * * 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 @@ -21,27 +21,52 @@ import "../../../../core" Dataset { - objective: qsTr("obj 4") + objective: qsTr("Learn multiplication table of 4") + difficulty: 6 data: [ - { - "maxNumber": 1, /* Max number on each domino side */ - "minNumber": 1, - "numberOfFish": 3 - }, - { - "maxNumber": 2, - "minNumber": 1, - "numberOfFish": 4 - }, - { - "maxNumber": 3, - "minNumber": 1, - "numberOfFish": 5 - }, - { - "maxNumber": 4, - "minNumber": 1, - "numberOfFish": 5 - } + { + "operands": [ + { + "first": 4, + "second": 4 + }, + { + "first": 4, + "second": 2 + }, + { + "first": 4, + "second": 3 + }, + { + "first": 4, + "second": 4 + }, + { + "first": 4, + "second": 5 + }, + { + "first": 4, + "second": 6 + }, + { + "first": 4, + "second": 7 + }, + { + "first": 4, + "second": 8 + }, + { + "first": 4, + "second": 9 + }, + { + "first": 4, + "second": 10 + }, + ] + } ] } diff --git a/src/activities/algebra_by/resource/5/Data.qml b/src/activities/algebra_by/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/5/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 5") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 5, + "second": 1 + }, + { + "first": 5, + "second": 2 + }, + { + "first": 5, + "second": 3 + }, + { + "first": 5, + "second": 4 + }, + { + "first": 5, + "second": 5 + }, + { + "first": 5, + "second": 6 + }, + { + "first": 5, + "second": 7 + }, + { + "first": 5, + "second": 8 + }, + { + "first": 5, + "second": 9 + }, + { + "first": 5, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_by/resource/6/Data.qml b/src/activities/algebra_by/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/6/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 6") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 6, + "second": 1 + }, + { + "first": 6, + "second": 2 + }, + { + "first": 6, + "second": 3 + }, + { + "first": 6, + "second": 4 + }, + { + "first": 6, + "second": 5 + }, + { + "first": 6, + "second": 6 + }, + { + "first": 6, + "second": 7 + }, + { + "first": 6, + "second": 8 + }, + { + "first": 6, + "second": 9 + }, + { + "first": 6, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_by/resource/7/Data.qml b/src/activities/algebra_by/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/7/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 7") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 7, + "second": 1 + }, + { + "first": 7, + "second": 2 + }, + { + "first": 7, + "second": 3 + }, + { + "first": 7, + "second": 4 + }, + { + "first": 7, + "second": 5 + }, + { + "first": 7, + "second": 6 + }, + { + "first": 7, + "second": 7 + }, + { + "first": 7, + "second": 8 + }, + { + "first": 7, + "second": 9 + }, + { + "first": 7, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_by/resource/8/Data.qml b/src/activities/algebra_by/resource/8/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/8/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 8") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 8, + "second": 1 + }, + { + "first": 8, + "second": 2 + }, + { + "first": 8, + "second": 3 + }, + { + "first": 8, + "second": 4 + }, + { + "first": 8, + "second": 5 + }, + { + "first": 8, + "second": 6 + }, + { + "first": 8, + "second": 7 + }, + { + "first": 8, + "second": 8 + }, + { + "first": 8, + "second": 9 + }, + { + "first": 8, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_by/resource/9/Data.qml b/src/activities/algebra_by/resource/9/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_by/resource/9/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 9") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 9, + "second": 1 + }, + { + "first": 9, + "second": 2 + }, + { + "first": 9, + "second": 3 + }, + { + "first": 9, + "second": 4 + }, + { + "first": 9, + "second": 5 + }, + { + "first": 9, + "second": 6 + }, + { + "first": 9, + "second": 7 + }, + { + "first": 9, + "second": 8 + }, + { + "first": 9, + "second": 9 + }, + { + "first": 9, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/ActivityConfig.qml b/src/activities/algebra_div/ActivityConfig.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/ActivityConfig.qml @@ -0,0 +1,67 @@ +/* GCompris - ActivityConfig.qml + * +* Copyright (C) 2020 Johnny Jazeix + * + * Authors: + * 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 QtQuick 2.6 +import GCompris 1.0 + +import "../../core" + +Item { + id: activityConfiguration + property Item background + property alias speedSlider: speedSlider + property int speedSetting: 5 + + Flow { + id: flow + spacing: 5 + width: parent.width + GCText { + id: speedSliderText + text: qsTr("Speed") + fontSize: mediumSize + wrapMode: Text.WordWrap + } + Flow { + width: dialogActivityConfig.width + spacing: 5 + GCSlider { + id: speedSlider + width: 250 * ApplicationInfo.ratio + value: speedSetting + maximumValue: 5 + minimumValue: 1 + scrollEnabled: false + } + } + } + + property var dataToSave + function setDefaultValues() { + if(dataToSave && dataToSave.speedSetting) { + activityConfiguration.speedSetting = dataToSave.speedSetting + } + } + function saveValues() { + var oldSpeed = activityConfiguration.speedSetting + speedSetting = speedSlider.value + dataToSave = {"speedSetting": speedSetting} + } +} diff --git a/src/activities/algebra_div/ActivityInfo.qml b/src/activities/algebra_div/ActivityInfo.qml --- a/src/activities/algebra_div/ActivityInfo.qml +++ b/src/activities/algebra_div/ActivityInfo.qml @@ -37,4 +37,5 @@ credit: "" section: "math division arithmetic" createdInVersion: 4000 + levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_div/CMakeLists.txt b/src/activities/algebra_div/CMakeLists.txt --- a/src/activities/algebra_div/CMakeLists.txt +++ b/src/activities/algebra_div/CMakeLists.txt @@ -1 +1 @@ -GCOMPRIS_ADD_RCC(activities/algebra_div *.qml *.svg) +GCOMPRIS_ADD_RCC(activities/algebra_div *.qml *.svg *.js resource/*) diff --git a/src/activities/algebra_div/resource/1/Data.qml b/src/activities/algebra_div/resource/1/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/1/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 1") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 1, + "second": 1 + }, + { + "first": 2, + "second": 1 + }, + { + "first": 3, + "second": 1 + }, + { + "first": 4, + "second": 1 + }, + { + "first": 5, + "second": 1 + }, + { + "first": 6, + "second": 1 + }, + { + "first": 7, + "second": 1 + }, + { + "first": 8, + "second": 1 + }, + { + "first": 9, + "second": 1 + }, + { + "first": 10, + "second": 1 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/10/Data.qml b/src/activities/algebra_div/resource/10/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/10/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 10") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 10, + "second": 10 + }, + { + "first": 20, + "second": 10 + }, + { + "first": 30, + "second": 10 + }, + { + "first": 40, + "second": 10 + }, + { + "first": 50, + "second": 10 + }, + { + "first": 60, + "second": 10 + }, + { + "first": 70, + "second": 10 + }, + { + "first": 80, + "second": 10 + }, + { + "first": 90, + "second": 10 + }, + { + "first": 100, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/2/Data.qml b/src/activities/algebra_div/resource/2/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/2/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 2") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 2, + "second": 2 + }, + { + "first": 4, + "second": 2 + }, + { + "first": 6, + "second": 2 + }, + { + "first": 8, + "second": 2 + }, + { + "first": 10, + "second": 2 + }, + { + "first": 12, + "second": 2 + }, + { + "first": 14, + "second": 2 + }, + { + "first": 16, + "second": 2 + }, + { + "first": 18, + "second": 2 + }, + { + "first": 20, + "second": 2 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/3/Data.qml b/src/activities/algebra_div/resource/3/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/3/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 3") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 3, + "second": 3 + }, + { + "first": 6, + "second": 3 + }, + { + "first": 9, + "second": 3 + }, + { + "first": 12, + "second": 3 + }, + { + "first": 15, + "second": 3 + }, + { + "first": 18, + "second": 3 + }, + { + "first": 21, + "second": 3 + }, + { + "first": 24, + "second": 3 + }, + { + "first": 27, + "second": 3 + }, + { + "first": 30, + "second": 3 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/4/Data.qml b/src/activities/algebra_div/resource/4/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/4/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 4") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 4, + "second": 4 + }, + { + "first": 8, + "second": 4 + }, + { + "first": 12, + "second": 4 + }, + { + "first": 16, + "second": 4 + }, + { + "first": 20, + "second": 4 + }, + { + "first": 24, + "second": 4 + }, + { + "first": 28, + "second": 4 + }, + { + "first": 32, + "second": 4 + }, + { + "first": 36, + "second": 4 + }, + { + "first": 40, + "second": 4 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/5/Data.qml b/src/activities/algebra_div/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/5/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 5") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 5, + "second": 5 + }, + { + "first": 10, + "second": 5 + }, + { + "first": 15, + "second": 5 + }, + { + "first": 20, + "second": 5 + }, + { + "first": 25, + "second": 5 + }, + { + "first": 30, + "second": 5 + }, + { + "first": 35, + "second": 5 + }, + { + "first": 40, + "second": 5 + }, + { + "first": 45, + "second": 5 + }, + { + "first": 50, + "second": 5 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/6/Data.qml b/src/activities/algebra_div/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/6/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn multiplication table of 6") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 6, + "second": 6 + }, + { + "first": 12, + "second": 6 + }, + { + "first": 18, + "second": 6 + }, + { + "first": 24, + "second": 6 + }, + { + "first": 30, + "second": 6 + }, + { + "first": 36, + "second": 6 + }, + { + "first": 42, + "second": 6 + }, + { + "first": 48, + "second": 6 + }, + { + "first": 54, + "second": 6 + }, + { + "first": 60, + "second": 6 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/7/Data.qml b/src/activities/algebra_div/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/7/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 7") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 7, + "second": 7 + }, + { + "first": 14, + "second": 7 + }, + { + "first": 21, + "second": 7 + }, + { + "first": 28, + "second": 7 + }, + { + "first": 35, + "second": 7 + }, + { + "first": 42, + "second": 7 + }, + { + "first": 49, + "second": 7 + }, + { + "first": 56, + "second": 7 + }, + { + "first": 63, + "second": 7 + }, + { + "first": 70, + "second": 7 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/8/Data.qml b/src/activities/algebra_div/resource/8/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/8/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 8") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 8, + "second": 8 + }, + { + "first": 16, + "second": 8 + }, + { + "first": 24, + "second": 8 + }, + { + "first": 32, + "second": 8 + }, + { + "first": 40, + "second": 8 + }, + { + "first": 48, + "second": 8 + }, + { + "first": 56, + "second": 8 + }, + { + "first": 64, + "second": 8 + }, + { + "first": 72, + "second": 8 + }, + { + "first": 80, + "second": 8 + }, + ] + } + ] +} diff --git a/src/activities/algebra_div/resource/9/Data.qml b/src/activities/algebra_div/resource/9/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_div/resource/9/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn division table of 9") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 9, + "second": 9 + }, + { + "first": 18, + "second": 9 + }, + { + "first": 27, + "second": 9 + }, + { + "first": 36, + "second": 9 + }, + { + "first": 45, + "second": 9 + }, + { + "first": 54, + "second": 9 + }, + { + "first": 63, + "second": 9 + }, + { + "first": 72, + "second": 9 + }, + { + "first": 81, + "second": 9 + }, + { + "first": 90, + "second": 9 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/ActivityConfig.qml b/src/activities/algebra_minus/ActivityConfig.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/ActivityConfig.qml @@ -0,0 +1,67 @@ +/* GCompris - ActivityConfig.qml + * +* Copyright (C) 2020 Johnny Jazeix + * + * Authors: + * 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 QtQuick 2.6 +import GCompris 1.0 + +import "../../core" + +Item { + id: activityConfiguration + property Item background + property alias speedSlider: speedSlider + property int speedSetting: 5 + + Flow { + id: flow + spacing: 5 + width: parent.width + GCText { + id: speedSliderText + text: qsTr("Speed") + fontSize: mediumSize + wrapMode: Text.WordWrap + } + Flow { + width: dialogActivityConfig.width + spacing: 5 + GCSlider { + id: speedSlider + width: 250 * ApplicationInfo.ratio + value: speedSetting + maximumValue: 5 + minimumValue: 1 + scrollEnabled: false + } + } + } + + property var dataToSave + function setDefaultValues() { + if(dataToSave && dataToSave.speedSetting) { + activityConfiguration.speedSetting = dataToSave.speedSetting + } + } + function saveValues() { + var oldSpeed = activityConfiguration.speedSetting + speedSetting = speedSlider.value + dataToSave = {"speedSetting": speedSetting} + } +} diff --git a/src/activities/algebra_minus/ActivityInfo.qml b/src/activities/algebra_minus/ActivityInfo.qml --- a/src/activities/algebra_minus/ActivityInfo.qml +++ b/src/activities/algebra_minus/ActivityInfo.qml @@ -37,4 +37,5 @@ credit: "" section: "math subtraction arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_minus/resource/1/Data.qml b/src/activities/algebra_minus/resource/1/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/1/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 1") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 1, + "second": 1 + }, + { + "first": 2, + "second": 1 + }, + { + "first": 3, + "second": 1 + }, + { + "first": 4, + "second": 1 + }, + { + "first": 5, + "second": 1 + }, + { + "first": 6, + "second": 1 + }, + { + "first": 7, + "second": 1 + }, + { + "first": 8, + "second": 1 + }, + { + "first": 9, + "second": 1 + }, + { + "first": 10, + "second": 1 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/10/Data.qml b/src/activities/algebra_minus/resource/10/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/10/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 10") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 10, + "second": 10 + }, + { + "first": 11, + "second": 10 + }, + { + "first": 12, + "second": 10 + }, + { + "first": 13, + "second": 10 + }, + { + "first": 14, + "second": 10 + }, + { + "first": 15, + "second": 10 + }, + { + "first": 16, + "second": 10 + }, + { + "first": 17, + "second": 10 + }, + { + "first": 18, + "second": 10 + }, + { + "first": 19, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/2/Data.qml b/src/activities/algebra_minus/resource/2/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/2/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 2") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 2, + "second": 2 + }, + { + "first": 3, + "second": 2 + }, + { + "first": 4, + "second": 2 + }, + { + "first": 5, + "second": 2 + }, + { + "first": 6, + "second": 2 + }, + { + "first": 7, + "second": 2 + }, + { + "first": 8, + "second": 2 + }, + { + "first": 9, + "second": 2 + }, + { + "first": 10, + "second": 2 + }, + { + "first": 11, + "second": 2 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/3/Data.qml b/src/activities/algebra_minus/resource/3/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/3/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 3") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 3, + "second": 3 + }, + { + "first": 4, + "second": 3 + }, + { + "first": 5, + "second": 3 + }, + { + "first": 6, + "second": 3 + }, + { + "first": 7, + "second": 3 + }, + { + "first": 8, + "second": 3 + }, + { + "first": 9, + "second": 3 + }, + { + "first": 10, + "second": 3 + }, + { + "first": 11, + "second": 3 + }, + { + "first": 12, + "second": 3 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/4/Data.qml b/src/activities/algebra_minus/resource/4/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/4/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 4") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 4, + "second": 4 + }, + { + "first": 5, + "second": 4 + }, + { + "first": 6, + "second": 4 + }, + { + "first": 7, + "second": 4 + }, + { + "first": 8, + "second": 4 + }, + { + "first": 9, + "second": 4 + }, + { + "first": 10, + "second": 4 + }, + { + "first": 11, + "second": 4 + }, + { + "first": 12, + "second": 4 + }, + { + "first": 13, + "second": 4 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/5/Data.qml b/src/activities/algebra_minus/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/5/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 5") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 5, + "second": 5 + }, + { + "first": 6, + "second": 5 + }, + { + "first": 7, + "second": 5 + }, + { + "first": 8, + "second": 5 + }, + { + "first": 9, + "second": 5 + }, + { + "first": 10, + "second": 5 + }, + { + "first": 11, + "second": 5 + }, + { + "first": 12, + "second": 5 + }, + { + "first": 13, + "second": 5 + }, + { + "first": 14, + "second": 5 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/6/Data.qml b/src/activities/algebra_minus/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/6/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 6") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 6, + "second": 6 + }, + { + "first": 7, + "second": 6 + }, + { + "first": 8, + "second": 6 + }, + { + "first": 9, + "second": 6 + }, + { + "first": 10, + "second": 6 + }, + { + "first": 11, + "second": 6 + }, + { + "first": 12, + "second": 6 + }, + { + "first": 13, + "second": 6 + }, + { + "first": 14, + "second": 6 + }, + { + "first": 15, + "second": 6 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/7/Data.qml b/src/activities/algebra_minus/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/7/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 7") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 7, + "second": 7 + }, + { + "first": 8, + "second": 7 + }, + { + "first": 9, + "second": 7 + }, + { + "first": 10, + "second": 7 + }, + { + "first": 11, + "second": 7 + }, + { + "first": 12, + "second": 7 + }, + { + "first": 13, + "second": 7 + }, + { + "first": 14, + "second": 7 + }, + { + "first": 15, + "second": 7 + }, + { + "first": 16, + "second": 7 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/8/Data.qml b/src/activities/algebra_minus/resource/8/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/8/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 8") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 8, + "second": 8 + }, + { + "first": 9, + "second": 8 + }, + { + "first": 10, + "second": 8 + }, + { + "first": 11, + "second": 8 + }, + { + "first": 12, + "second": 8 + }, + { + "first": 13, + "second": 8 + }, + { + "first": 14, + "second": 8 + }, + { + "first": 15, + "second": 8 + }, + { + "first": 16, + "second": 8 + }, + { + "first": 17, + "second": 8 + }, + ] + } + ] +} diff --git a/src/activities/algebra_minus/resource/9/Data.qml b/src/activities/algebra_minus/resource/9/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_minus/resource/9/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn subtraction table of 9") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 9, + "second": 9 + }, + { + "first": 10, + "second": 9 + }, + { + "first": 11, + "second": 9 + }, + { + "first": 12, + "second": 9 + }, + { + "first": 13, + "second": 9 + }, + { + "first": 14, + "second": 9 + }, + { + "first": 15, + "second": 9 + }, + { + "first": 16, + "second": 9 + }, + { + "first": 17, + "second": 9 + }, + { + "first": 18, + "second": 9 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/ActivityConfig.qml b/src/activities/algebra_plus/ActivityConfig.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/ActivityConfig.qml @@ -0,0 +1,67 @@ +/* GCompris - ActivityConfig.qml + * +* Copyright (C) 2020 Johnny Jazeix + * + * Authors: + * 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 QtQuick 2.6 +import GCompris 1.0 + +import "../../core" + +Item { + id: activityConfiguration + property Item background + property alias speedSlider: speedSlider + property int speedSetting: 5 + + Flow { + id: flow + spacing: 5 + width: parent.width + GCText { + id: speedSliderText + text: qsTr("Speed") + fontSize: mediumSize + wrapMode: Text.WordWrap + } + Flow { + width: dialogActivityConfig.width + spacing: 5 + GCSlider { + id: speedSlider + width: 250 * ApplicationInfo.ratio + value: speedSetting + maximumValue: 5 + minimumValue: 1 + scrollEnabled: false + } + } + } + + property var dataToSave + function setDefaultValues() { + if(dataToSave && dataToSave.speedSetting) { + activityConfiguration.speedSetting = dataToSave.speedSetting + } + } + function saveValues() { + var oldSpeed = activityConfiguration.speedSetting + speedSetting = speedSlider.value + dataToSave = {"speedSetting": speedSetting} + } +} diff --git a/src/activities/algebra_plus/ActivityInfo.qml b/src/activities/algebra_plus/ActivityInfo.qml --- a/src/activities/algebra_plus/ActivityInfo.qml +++ b/src/activities/algebra_plus/ActivityInfo.qml @@ -37,4 +37,5 @@ credit: "" section: "math addition arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_plus/resource/1/Data.qml b/src/activities/algebra_plus/resource/1/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/1/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 1") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 1, + "second": 1 + }, + { + "first": 1, + "second": 2 + }, + { + "first": 1, + "second": 3 + }, + { + "first": 1, + "second": 4 + }, + { + "first": 1, + "second": 5 + }, + { + "first": 1, + "second": 6 + }, + { + "first": 1, + "second": 7 + }, + { + "first": 1, + "second": 8 + }, + { + "first": 1, + "second": 9 + }, + { + "first": 1, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/10/Data.qml b/src/activities/algebra_plus/resource/10/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/10/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 10") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 10, + "second": 1 + }, + { + "first": 10, + "second": 2 + }, + { + "first": 10, + "second": 3 + }, + { + "first": 10, + "second": 4 + }, + { + "first": 10, + "second": 5 + }, + { + "first": 10, + "second": 6 + }, + { + "first": 10, + "second": 7 + }, + { + "first": 10, + "second": 8 + }, + { + "first": 10, + "second": 9 + }, + { + "first": 10, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/2/Data.qml b/src/activities/algebra_plus/resource/2/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/2/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 2") + difficulty: 5 + data: [ + { + "operands": [ + { + "first": 2, + "second": 1 + }, + { + "first": 2, + "second": 2 + }, + { + "first": 2, + "second": 3 + }, + { + "first": 2, + "second": 4 + }, + { + "first": 2, + "second": 5 + }, + { + "first": 2, + "second": 6 + }, + { + "first": 2, + "second": 7 + }, + { + "first": 2, + "second": 8 + }, + { + "first": 2, + "second": 9 + }, + { + "first": 2, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/3/Data.qml b/src/activities/algebra_plus/resource/3/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/3/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 3") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 3, + "second": 1 + }, + { + "first": 3, + "second": 2 + }, + { + "first": 3, + "second": 3 + }, + { + "first": 3, + "second": 4 + }, + { + "first": 3, + "second": 5 + }, + { + "first": 3, + "second": 6 + }, + { + "first": 3, + "second": 7 + }, + { + "first": 3, + "second": 8 + }, + { + "first": 3, + "second": 9 + }, + { + "first": 3, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/4/Data.qml b/src/activities/algebra_plus/resource/4/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/4/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 4") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 4, + "second": 4 + }, + { + "first": 4, + "second": 2 + }, + { + "first": 4, + "second": 3 + }, + { + "first": 4, + "second": 4 + }, + { + "first": 4, + "second": 5 + }, + { + "first": 4, + "second": 6 + }, + { + "first": 4, + "second": 7 + }, + { + "first": 4, + "second": 8 + }, + { + "first": 4, + "second": 9 + }, + { + "first": 4, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/5/Data.qml b/src/activities/algebra_plus/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/5/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 5") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 5, + "second": 1 + }, + { + "first": 5, + "second": 2 + }, + { + "first": 5, + "second": 3 + }, + { + "first": 5, + "second": 4 + }, + { + "first": 5, + "second": 5 + }, + { + "first": 5, + "second": 6 + }, + { + "first": 5, + "second": 7 + }, + { + "first": 5, + "second": 8 + }, + { + "first": 5, + "second": 9 + }, + { + "first": 5, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/6/Data.qml b/src/activities/algebra_plus/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/6/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 6") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 6, + "second": 1 + }, + { + "first": 6, + "second": 2 + }, + { + "first": 6, + "second": 3 + }, + { + "first": 6, + "second": 4 + }, + { + "first": 6, + "second": 5 + }, + { + "first": 6, + "second": 6 + }, + { + "first": 6, + "second": 7 + }, + { + "first": 6, + "second": 8 + }, + { + "first": 6, + "second": 9 + }, + { + "first": 6, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/7/Data.qml b/src/activities/algebra_plus/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/7/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 7") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 7, + "second": 1 + }, + { + "first": 7, + "second": 2 + }, + { + "first": 7, + "second": 3 + }, + { + "first": 7, + "second": 4 + }, + { + "first": 7, + "second": 5 + }, + { + "first": 7, + "second": 6 + }, + { + "first": 7, + "second": 7 + }, + { + "first": 7, + "second": 8 + }, + { + "first": 7, + "second": 9 + }, + { + "first": 7, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/8/Data.qml b/src/activities/algebra_plus/resource/8/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/8/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 8") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 8, + "second": 1 + }, + { + "first": 8, + "second": 2 + }, + { + "first": 8, + "second": 3 + }, + { + "first": 8, + "second": 4 + }, + { + "first": 8, + "second": 5 + }, + { + "first": 8, + "second": 6 + }, + { + "first": 8, + "second": 7 + }, + { + "first": 8, + "second": 8 + }, + { + "first": 8, + "second": 9 + }, + { + "first": 8, + "second": 10 + }, + ] + } + ] +} diff --git a/src/activities/algebra_plus/resource/9/Data.qml b/src/activities/algebra_plus/resource/9/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/algebra_plus/resource/9/Data.qml @@ -0,0 +1,72 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Learn addition table of 9") + difficulty: 6 + data: [ + { + "operands": [ + { + "first": 9, + "second": 1 + }, + { + "first": 9, + "second": 2 + }, + { + "first": 9, + "second": 3 + }, + { + "first": 9, + "second": 4 + }, + { + "first": 9, + "second": 5 + }, + { + "first": 9, + "second": 6 + }, + { + "first": 9, + "second": 7 + }, + { + "first": 9, + "second": 8 + }, + { + "first": 9, + "second": 9 + }, + { + "first": 9, + "second": 10 + }, + ] + } + ] +} diff --git a/src/core/ActivityBase.qml b/src/core/ActivityBase.qml --- a/src/core/ActivityBase.qml +++ b/src/core/ActivityBase.qml @@ -262,7 +262,8 @@ } datasetLoader.data = [] - levelFolder.sort() + // sorting levelFolders in numeric manner + levelFolder.sort((a, b) => parseInt(a) - parseInt(b)); for(var level in levelFolder) { datasetLoader.dataFiles.push({"file": resourceUrl+levelFolder[level]+"/Data.qml"}) }