Index: src/activities/memory-math-mult/ActivityInfo.qml =================================================================== --- src/activities/memory-math-mult/ActivityInfo.qml +++ src/activities/memory-math-mult/ActivityInfo.qml @@ -38,4 +38,5 @@ credit: "" section: "math memory arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6,7,8,9,10" } Index: src/activities/memory-math-mult/MemoryMathMult.qml =================================================================== --- src/activities/memory-math-mult/MemoryMathMult.qml +++ src/activities/memory-math-mult/MemoryMathMult.qml @@ -22,9 +22,7 @@ import QtQuick 2.6 import "../memory" -import "memory-multdataset.js" as Dataset MemoryCommon { - dataset: Dataset.get() backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" } Index: src/activities/memory-math-mult/memory-multdataset.js =================================================================== --- src/activities/memory-math-mult/memory-multdataset.js +++ /dev/null @@ -1,77 +0,0 @@ -/* GCompris - * - * Copyright (C) 2014 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 "qrc:/gcompris/src/activities/memory/math_util.js" as Memory - -var memory_cards = [ - { // Level 1 - columns: 5, - rows: 2, - texts: Memory.getMultTable(1) - }, - { // Level 2 - columns: 5, - rows: 2, - texts: Memory.getMultTable(2) - }, - { // Level 3 - columns: 5, - rows: 2, - texts: Memory.getMultTable(3) - }, - { // Level 4 - columns: 5, - rows: 2, - texts: Memory.getMultTable(4) - }, - { // Level 5 - columns: 5, - rows: 2, - texts: Memory.getMultTable(5) - }, - { // Level 6 - columns: 5, - rows: 2, - texts: Memory.getMultTable(6) - }, - { // Level 7 - columns: 5, - rows: 2, - texts: Memory.getMultTable(7) - }, - { // Level 8 - columns: 5, - rows: 2, - texts: Memory.getMultTable(8) - }, - { // Level 9 - columns: 5, - rows: 2, - texts: Memory.getMultTable(9) - }, - { // Level 10 - columns: 5, - rows: 2, - texts: Memory.getMultTable(10) - } - ] - - -function get() { - return memory_cards -} Index: src/activities/memory-math-mult/resource/1/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/1/Data.qml +++ src/activities/memory-math-mult/resource/1/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 1.") + difficulty: 1 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(1) + } + ] } Index: src/activities/memory-math-mult/resource/10/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/10/Data.qml +++ src/activities/memory-math-mult/resource/10/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 10.") + difficulty: 6 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(10) + } + ] } Index: src/activities/memory-math-mult/resource/2/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/2/Data.qml +++ src/activities/memory-math-mult/resource/2/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 2.") + difficulty: 2 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(2) + } + ] } Index: src/activities/memory-math-mult/resource/3/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/3/Data.qml +++ src/activities/memory-math-mult/resource/3/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 3.") + difficulty: 3 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(3) + } + ] } Index: src/activities/memory-math-mult/resource/4/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/4/Data.qml +++ src/activities/memory-math-mult/resource/4/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 4.") + difficulty: 3 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(4) + } + ] } Index: src/activities/memory-math-mult/resource/5/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/5/Data.qml +++ src/activities/memory-math-mult/resource/5/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 5.") + difficulty: 4 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(5) + } + ] } Index: src/activities/memory-math-mult/resource/6/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/6/Data.qml +++ src/activities/memory-math-mult/resource/6/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 6.") + difficulty: 4 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(6) + } + ] } Index: src/activities/memory-math-mult/resource/7/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/7/Data.qml +++ src/activities/memory-math-mult/resource/7/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 7.") + difficulty: 5 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(7) + } + ] } Index: src/activities/memory-math-mult/resource/8/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/8/Data.qml +++ src/activities/memory-math-mult/resource/8/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 8.") + difficulty: 5 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(8) + } + ] } Index: src/activities/memory-math-mult/resource/9/Data.qml =================================================================== --- src/activities/memory-math-mult/resource/9/Data.qml +++ src/activities/memory-math-mult/resource/9/Data.qml @@ -1,10 +1,9 @@ -/* gcompris - MemoryMathMult.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak Kumar * * 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 @@ -17,14 +16,21 @@ * 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-multdataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Table of 9.") + difficulty: 6 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getMultTable(9) + } + ] }