diff --git a/src/activities/activities.txt b/src/activities/activities.txt index be4fc64b9..721228953 100644 --- a/src/activities/activities.txt +++ b/src/activities/activities.txt @@ -1,147 +1,148 @@ # The list of activities that will be loaded at GCompris start. # Keep it sorted advanced_colors algebra_by algebra_div algebra_minus algebra_plus algorithm align4 align4-2players alphabet-sequence babymatch babyshapes baby_wordprocessor balancebox ballcatch bargame bargame_2players braille_alphabets braille_fun calendar canal_lock categorization checkers checkers_2players +categorization_words chess chess_2players chess_partyend chronos clickanddraw clickgame click_on_letter click_on_letter_up clockgame color_mix color_mix_light colors crane details digital_electricity drawletters drawnumbers enumerate erase erase_2clic erase_clic explore_farm_animals explore_monuments explore_world_animals explore_world_music family family_find_relative fifteen find_the_day followline football geo-country geography gletters gnumch-equality gnumch-factors gnumch-inequality gnumch-multiples gnumch-primes graph-coloring guesscount guessnumber hangman hanoi hanoi_real hexagon imagename instruments intro_gravity land_safe lang leftright letter-in-word lightsoff louis-braille magic-hat-minus magic-hat-plus maze mazeinvisible mazerelative melody memory memory-case-association memory-case-association-tux memory-enumerate memory-math-add memory-math-add-minus memory-math-add-minus-mult-div memory-math-add-minus-mult-div-tux memory-math-add-minus-tux memory-math-add-tux memory-math-div memory-math-div-tux memory-math-minus memory-math-minus-tux memory-math-mult memory-math-mult-div memory-math-mult-div-tux memory-math-mult-tux memory-sound memory-sound-tux memory-tux memory-wordnumber mining missing-letter money money_back money_back_cents money_cents mosaic nine_men_morris nine_men_morris_2players number_sequence numbers-odd-even paintings penalty photo_hunter planegame readingh readingv redraw redraw_symmetrical renewable_energy reversecount roman_numerals scalesboard scalesboard_weight scalesboard_weight_avoirdupois share simplepaint smallnumbers smallnumbers2 submarine sudoku superbrain tangram target tic_tac_toe tic_tac_toe_2players traffic watercycle wordsgame diff --git a/src/activities/categorization/Categorization.qml b/src/activities/categorization/Categorization.qml index beb90aaa4..bfd448df1 100644 --- a/src/activities/categorization/Categorization.qml +++ b/src/activities/categorization/Categorization.qml @@ -1,239 +1,326 @@ /* GCompris - categorization.qml * * Copyright (C) 2016 Divyam Madaan * * Authors: * Divyam Madaan * * 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 QtQuick.Controls 1.5 import GCompris 1.0 import "../../core" import "categorization.js" as Activity import "qrc:/gcompris/src/core/core.js" as Core import "." ActivityBase { id: activity onStart: focus = true onStop: {} - property string boardsUrl: ":/gcompris/src/activities/categorization/resource/board/" property bool vert: background.width < background.height property var barAtStart + property string type: "images" + property int categoriesCount + property string boardsUrl: ":/gcompris/src/activities/categorization/resource/board/" - pageComponent: Image { + pageComponent: + Image { id: background source: "qrc:/gcompris/src/activities/guesscount/resource/backgroundW01.svg" anchors.fill: parent sourceSize.width: parent.width signal start signal stop + property string locale: "system" + property bool englishFallback: false + property bool categoriesFallback: (items.categoriesCount == 6) ? true : false + Component.onCompleted: { activity.start.connect(start) activity.stop.connect(stop) } // Add here the QML items you need to access in javascript QtObject { id: items property Item main: activity.main property alias background: background property alias bar: bar property alias bonus: bonus property alias categoryReview: categoryReview property alias menuScreen: menuScreen property alias menuModel: menuScreen.menuModel property alias dialogActivityConfig: dialogActivityConfig property string mode: "easy" property bool instructionsVisible: true property bool categoryImageChecked: (mode === "easy" || mode === "medium") property bool scoreChecked: (mode === "easy" || mode === "expert") property bool iAmReadyChecked: (mode === "expert") property bool displayUpdateDialogAtStart: true property var details property bool categoriesFallback property alias file: file - property var categories: directory.getFiles(boardsUrl) + property var categories: (type == "images") ? directory.getFiles(boardsUrl) : directory.getFiles(boardsUrl + locale + "/") + property alias locale: background.locale + property alias hintDialog: hintDialog + property var categoryTitle + property var categoryLesson + property bool hintDisplay } function hideBar() { barAtStart = ApplicationSettings.isBarHidden; if(categoryReview.width > categoryReview.height) ApplicationSettings.isBarHidden = false; else ApplicationSettings.isBarHidden = true; } onStart: { - Activity.init(items, boardsUrl) + Activity.init(items, boardsUrl,type,categoriesCount) dialogActivityConfig.getInitialConfiguration() Activity.start() hideBar() } onStop: { dialogActivityConfig.saveDatainConfiguration() ApplicationSettings.isBarHidden = barAtStart; } MenuScreen { id: menuScreen File { id: file onError: console.error("File error: " + msg); } } Directory { id: directory } CategoryReview { id: categoryReview } ExclusiveGroup { id: configOptions } DialogActivityConfig { id: dialogActivityConfig content: Component { Column { id: column spacing: 5 width: dialogActivityConfig.width height: dialogActivityConfig.height property alias easyModeBox: easyModeBox property alias mediumModeBox: mediumModeBox property alias expertModeBox: expertModeBox + property alias localeBox: localeBox + + property alias availableLangs: langs.languages + LanguageList { + id: langs + } GCDialogCheckBox { id: easyModeBox width: column.width - 50 text: qsTr("Instructions and score visible") checked: (items.mode == "easy") ? true : false exclusiveGroup: configOptions onCheckedChanged: { if(easyModeBox.checked) { items.mode = "easy" menuScreen.iAmReady.visible = false } } } GCDialogCheckBox { id: mediumModeBox width: easyModeBox.width text: qsTr("Instructions visible and score invisible") checked: (items.mode == "medium") ? true : false exclusiveGroup: configOptions onCheckedChanged: { if(mediumModeBox.checked) { items.mode = "medium" menuScreen.iAmReady.visible = false } } } GCDialogCheckBox { id: expertModeBox width: easyModeBox.width text: qsTr("Instructions invisible and score visible") checked: (items.mode == "expert") ? true : false exclusiveGroup: configOptions onCheckedChanged: { if(expertModeBox.checked) { items.mode = "expert" menuScreen.iAmReady.visible = true } } } + + GCComboBox { + id: localeBox + model: langs.languages + background: dialogActivityConfig + width: dialogActivityConfig.width + label: qsTr("Select your locale") + visible: type == "words" ? true : false + } } } onLoadData: { if(dataToSave && dataToSave["mode"]) items.mode = dataToSave["mode"] if(dataToSave && dataToSave["displayUpdateDialogAtStart"]) items.displayUpdateDialogAtStart = (dataToSave["displayUpdateDialogAtStart"] == "true") ? true : false + if(dataToSave && dataToSave['locale']) { + background.locale = dataToSave["locale"]; + } } onSaveData: { dataToSave["data"] = Activity.categoriesToSavedProperties(dataToSave) dataToSave["mode"] = items.mode - dataToSave["displayUpdateDialogAtStart"] = items.displayUpdateDialogAtStart ? "true" : "false" + var oldLocale = background.locale; + var newLocale = + dialogActivityConfig.configItem.availableLangs[dialogActivityConfig.loader.item.localeBox.currentIndex].locale; + // Remove .UTF-8 + if(newLocale.indexOf('.') != -1) { + newLocale = newLocale.substring(0, newLocale.indexOf('.')) + } + dataToSave = {"locale": newLocale} + + background.locale = newLocale; + + // Restart the activity with new information + if(oldLocale !== newLocale) { + background.stop(); + background.start(); + } + } + + function setDefaultValues() { + var localeUtf8 = background.locale; + if(background.locale != "system") { + localeUtf8 += ".UTF-8"; + } + + for(var i = 0 ; i < dialogActivityConfig.configItem.availableLangs.length ; i ++) { + if(dialogActivityConfig.configItem.availableLangs[i].locale === localeUtf8) { + dialogActivityConfig.loader.item.localeBox.currentIndex = i; + break; + } + } } onClose: home() } DialogHelp { id: dialogHelp onClose: home() } - + DialogBackground { + id: hintDialog + visible: false + title: items.categoryTitle ? items.categoryTitle : '' + textBody: items.categoryLesson ? items.categoryLesson : '' + onClose: home() + } + Bar { id: bar - content: menuScreen.started ? withConfig : withoutConfig + content: menuScreen.started ? withConfig : (items.hintDisplay == true && items.mode != "expert" ? withoutConfigWithHint : withoutConfigWithoutHint) property BarEnumContent withConfig: BarEnumContent { value: help | home | config } - property BarEnumContent withoutConfig: BarEnumContent { value: home | level } + property BarEnumContent withoutConfigWithHint: BarEnumContent { value: home | level | hint } + property BarEnumContent withoutConfigWithoutHint: BarEnumContent { value: home | level } onPreviousLevelClicked: Activity.previousLevel() onNextLevelClicked: Activity.nextLevel() onHelpClicked: { displayDialog(dialogHelp) } onHomeClicked: { if(items.menuScreen.started) activity.home() else if(items.categoryReview.started) Activity.launchMenuScreen() } onConfigClicked: { dialogActivityConfig.active = true + dialogActivityConfig.setDefaultValues() displayDialog(dialogActivityConfig) } + onHintClicked: { + displayDialog(hintDialog) + } } Bonus { id: bonus Component.onCompleted: win.connect(Activity.nextLevel) } Loader { id: categoriesFallbackDialog sourceComponent: GCDialog { parent: activity.main message: qsTr("You don't have all the images for this activity. " + "Press Update to get the complete dataset. " + "Press the Cross to play with demo version or 'Never show this dialog later' if you want to never see again this dialog.") button1Text: qsTr("Update the image set") button2Text: qsTr("Never show this dialog later") onClose: items.categoriesFallback = false onButton1Hit: DownloadManager.downloadResource('data2/words/words.rcc') onButton2Hit: { items.displayUpdateDialogAtStart = false; dialogActivityConfig.saveDatainConfiguration() } } anchors.fill: parent focus: true - active: items.categoriesFallback && items.displayUpdateDialogAtStart + active: items.categoriesFallback && items.displayUpdateDialogAtStart && type == "images" + onStatusChanged: if (status == Loader.Ready) item.start() + } + + Loader { + id: englishFallbackDialog + sourceComponent: GCDialog { + parent: activity.main + message: qsTr("We are sorry, we don't have yet a translation for your language.") + " " + + qsTr("GCompris is developed by the KDE community, you can translate GCompris by joining a translation team on %2").arg("http://l10n.kde.org/") + + "

" + + qsTr("We switched to English for this activity but you can select another language in the configuration dialog.") + onClose: { background.englishFallback = false; items.locale = "en_GB"; Activity.getCategoriesList(); } + } + anchors.fill: parent + focus: true + active: background.englishFallback onStatusChanged: if (status == Loader.Ready) item.start() } } } diff --git a/src/activities/categorization/CategoryReview.qml b/src/activities/categorization/CategoryReview.qml index a38c819f1..10ac5ca3c 100644 --- a/src/activities/categorization/CategoryReview.qml +++ b/src/activities/categorization/CategoryReview.qml @@ -1,238 +1,270 @@ /* GCompris - CategoryReview.qml * * Copyright (C) 2016 Divyam Madaan * * Authors: * Divyam Madaan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import GCompris 1.0 import "../../core" import "categorization.js" as Activity Item { id: rootItem property alias score: score property alias categoryDataset: categoryDataset property alias instructionBox: instructionBox property alias categoryImage: categoryImage property bool isDropped: true property bool leftAreaContainsDrag: false property bool rightAreaContainsDrag: false property bool started: rootItem.opacity == 1 property bool horizontalLayout: categoryBackground.width > categoryBackground.height property alias leftZone: leftZone.model property alias rightZone: rightZone.model property alias middleZone: middleZone.model property alias leftScreen: leftScreen property alias middleScreen: middleScreen property alias rightScreen: rightScreen anchors.fill: parent Loader { id: categoryDataset asynchronous: false } Image { id: categoryBackground source: "qrc:/gcompris/src/activities/categorization/resource/background.svg" anchors.fill: parent sourceSize.width:parent.width Zone { id:leftZone x: 0.012 * middleScreen.width z: 2 y: 0.05 * parent.height spacing: x } Rectangle { id: leftScreen width: parent.width/3 height: parent.height x: 0 color: leftAreaContainsDrag ? "#F9F8B4" : "#F9B4B4" border.width: 5 border.color: "#EC1313" opacity: 0.5 } Zone { id: rightZone spacing: leftZone.x x: leftScreen.width + middleScreen.width + spacing z: 2 anchors.top: categoryBackground.top anchors.topMargin: items.mode != "expert" ? rootItem.categoryImage.height + 0.027 * rightScreen.height : 0.05 * categoryBackground.height } Rectangle { id: rightScreen width: parent.width/3 height: parent.height x: leftScreen.width + middleScreen.width color: rightAreaContainsDrag ? "#F9F8B4" : "#B4F9C5" border.width: 5 border.color: "#13EC52" opacity: 0.5 } Rectangle { id: middleScreen width: parent.width/3 height: parent.height x: leftScreen.width color: "#00FFFFFF" } Rectangle { id: instructionBox anchors.left: categoryBackground.left anchors.right: categoryImage.left anchors.leftMargin: 0.32 * parent.width anchors.rightMargin: 0.03 * parent.width color: "black" opacity: items.instructionsVisible ? 0.85 : 0 z: 3 radius: 10 border.width: 2 width: horizontalLayout ? parent.width/5 : parent.width/3 height: horizontalLayout ? parent.height/6 : parent.height * 0.09 gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } } Zone { id: middleZone spacing: 0.012 * middleScreen.width anchors { left: leftScreen.right right: rightScreen.left top: parent.top topMargin: 0.05 * parent.height bottom: categoryBackground.bottom - leftMargin: 0.015 * middleScreen.width + bottomMargin: 0.15 * parent.height + leftMargin: type == "words" ? 0.005 * middleScreen.width : 0.015 * middleScreen.width } } GCText { id: instructions - text: items.mode !== "expert" && items.details && items.details[bar.level-1] && items.details[bar.level - 1].instructions ? items.details[bar.level - 1].instructions : qsTr("Place the majority category images to the right and other images to the left") + text: items.mode !== "expert" && items.details && items.details[bar.level - 1] && items.details[bar.level - 1].instructions ? items.details[bar.level - 1].instructions : qsTr("Place the majority category images to the right and other images to the left") visible: items.instructionsVisible anchors.fill: instructionBox anchors.bottom: instructionBox.bottom fontSizeMode: Text.Fit wrapMode: Text.Wrap z: 3 color: "white" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter } Image { id: categoryImage fillMode: Image.PreserveAspectFit - source: items.details && items.details[bar.level-1] && items.details[bar.level-1].image ? items.details[bar.level-1].image : "" - sourceSize.width: horizontalLayout ? rightZone.width * 0.35 : rightZone.width * 0.35 - width: sourceSize.width - height: sourceSize.width - y: 0.015*parent.height - visible: items.categoryImageChecked + width: horizontalLayout ? middleScreen.width * 0.35 : rightScreen.width * 0.35 + height: horizontalLayout ? rightScreen.height * 0.18 : rightScreen.height * 0.15 + source: items.details && items.details[bar.level-1] && items.details[bar.level-1].image && type == "images" ? items.details[bar.level-1].image : "" + y: 0.015 * parent.height + visible: items.categoryImageChecked && type == "images" anchors { left: middleScreen.right - leftMargin: 0.15 * rightZone.width + leftMargin: 0.15 * rightScreen.width + } + } + + Rectangle { + id: categoryTextBox + color: "black" + opacity: type == "words" ? 1 : 0 + width: horizontalLayout ? rightScreen.width * 0.35 : rightScreen.width * 0.35 + height: horizontalLayout ? rightScreen.height * 0.18 : rightScreen.height * 0.15 + anchors { + left: middleScreen.right + leftMargin: 0.15 * rightScreen.width + } + z: 3 + y: 0.015*parent.height + radius: 10 + border.width: 2 + gradient: Gradient { + GradientStop { position: 0.0; color: "#000" } + GradientStop { position: 0.9; color: "#666" } + GradientStop { position: 1.0; color: "#AAA" } + } + + GCText { + id: categoryText + text: items.details && items.details[bar.level-1] && items.details[bar.level-1].image && type == "words" ? items.details[bar.level-1].image : "" + anchors.fill: parent + anchors.bottom: parent.bottom + fontSizeMode: Text.Fit + wrapMode: Text.WordWrap + z: 3 + color: "white" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter } } BarButton { id: validate source: "qrc:/gcompris/src/core/resource/bar_ok.svg" - width: horizontalLayout ? rightZone.width * 0.20 : rightZone.width * 0.35 - height: width - sourceSize.width: width - sourceSize.height: height + width: horizontalLayout ? rightScreen.width * 0.20 : rightScreen.width * 0.35 + height: horizontalLayout ? rightScreen.width * 0.20 : rightScreen.width * 0.35 y: parent.height*0.8 z: 2 anchors { rightMargin: 14 * ApplicationInfo.ratio right: parent.right } MouseArea { anchors.fill: parent onClicked: { Activity.allPlaced(); } } } DropArea { id: rightArea anchors.fill: rightZone } DropArea { id: leftArea anchors.fill: leftZone } DialogHelp { id: dialogHelp onClose: home() } Score { id: score fontSize: 0.013 * parent.width visible: items.scoreChecked height: horizontalLayout ? 0.1 * parent.height : 0.06 * parent.height width: horizontalLayout ? 0.015 * parent.width : parent.width anchors { top: parent.top right: categoryBackground.right left: categoryImage.right bottom: undefined } } } Keys.onEscapePressed: { Activity.launchMenuScreen(); } Keys.onReleased: { if (event.key === Qt.Key_Back) { event.accepted = true Activity.launchMenuScreen() } } function stop() { if(items.mode == "expert") items.menuScreen.iAmReady.visible = true focus = false rootItem.visible = false } function start() { focus = true rootItem.visible = true } } diff --git a/src/activities/categorization/DragList.qml b/src/activities/categorization/DragList.qml new file mode 100644 index 000000000..2dbbb51ad --- /dev/null +++ b/src/activities/categorization/DragList.qml @@ -0,0 +1,84 @@ + +/* GCompris - DragList.qml + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.1 +import GCompris 1.0 + +import "../../core" +import "categorization.js" as Activity + + +MultiPointTouchArea { + anchors.fill: parent + touchPoints: [ TouchPoint { id: point1 } ] + property real positionX + property real positionY + property real lastX + property real lastY + property bool isRight: isRight + property string currPosition: "middle" + onPressed: { + interactive = false + items.instructionsVisible = false + positionX = point1.x + positionY = point1.y + var imagePos = parent.mapToItem(null,0,0) + if(Activity.isDragInLeftArea(leftScreen.width, imagePos.x + parent.width)) + currPosition = "left" + else if(Activity.isDragInRightArea(middleScreen.width + leftScreen.width,imagePos.x)) + currPosition = "right" + else + currPosition = "middle" + } + + onUpdated: { + var moveX = point1.x - positionX + var moveY = point1.y - positionY + parent.x = parent.x + moveX + parent.y = parent.y + moveY + var imagePos = parent.mapToItem(null,0,0) + leftAreaContainsDrag = Activity.isDragInLeftArea(leftScreen.width, imagePos.x + parent.width) + rightAreaContainsDrag = Activity.isDragInRightArea(middleScreen.width + leftScreen.width,imagePos.x) + lastX = 0, lastY = 0 + } + + onReleased: { + interactive = (type == "words" ? true: false) + var droppedPosition = "middle"; + if(lastX == point1.x && lastY == point1.y) + return; + else if(leftAreaContainsDrag) + droppedPosition = "left" + else if(rightAreaContainsDrag) + droppedPosition = "right" + // If we drop on same zone, we move it at its initial place + if(currPosition == droppedPosition) { + parent.x = 0 + parent.y = 0 + } + else + Activity.dropControl(currPosition, droppedPosition, name, index) + + Activity.setValues() + lastX = point1.x + lastY = point1.y + } +} diff --git a/src/activities/categorization/Zone.qml b/src/activities/categorization/Zone.qml index 2f8d73dea..090a6edd1 100644 --- a/src/activities/categorization/Zone.qml +++ b/src/activities/categorization/Zone.qml @@ -1,119 +1,113 @@ /* GCompris - Zone.qml * * Copyright (C) 2016 Divyam Madaan * * Authors: * Divyam Madaan * * 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 QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 import "../../core" import "categorization.js" as Activity -Flow { - id: zoneFlow - width: parent.width/3 - height: parent.height + +Flickable { + id: flick + contentWidth: zoneFlow.width + contentHeight: zoneFlow.height + + clip: false + interactive: (type == "words" ? true : false) + flickableDirection: Flickable.VerticalFlick + property alias repeater: repeater property alias model: zoneModel + property alias spacing: zoneFlow.spacing + + Flow { + id: zoneFlow + spacing: 5 + width: categoryBackground.width/3 + height: repeater.contentHeight + opacity: 1 + anchors.bottomMargin: 0.3 * zoneFlow.height ListModel { id: zoneModel } Repeater { id: repeater model: zoneModel Item { id: item - width: horizontalLayout ? middleZone.width * 0.32 : middleZone.width * 0.48 - height: horizontalLayout ? categoryBackground.height * 0.2 : categoryBackground.height * 0.15 + width: (type == "words" && (items.hintDisplay == true)) ? middleScreen.width * 0.92 : middleScreen.width * 0.32 + height: (type == "words" && (items.hintDisplay == true)) ? categoryBackground.height * 0.1 : categoryBackground.height * 0.2 + visible: true opacity: 1 + + Rectangle { + id: wordBox + color: "black" + visible: type =="words" ? true : false + width: parent.width + height: parent.height + z: 3 + focus: true + radius: 10 + border.width: 2 + gradient: Gradient { + GradientStop { position: 0.0; color: "#000" } + GradientStop { position: 0.9; color: "#666" } + GradientStop { position: 1.0; color: "#AAA" } + } + GCText { + id: wordBoxText + text: name + anchors.fill: parent + anchors.bottom: parent.bottom + fontSizeMode: Text.Fit + wrapMode: Text.WordWrap + z: 3 + color: "white" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + DragList { + id: wordDrag + anchors.fill: parent + } + } Image { id: image fillMode: Image.PreserveAspectFit sourceSize.width: horizontalLayout ? middleZone.width * 0.32 : middleZone.width * 0.48 width: sourceSize.width height: sourceSize.width - source: name - MultiPointTouchArea { - id: dragArea + source: (type == "images") ? name : '' + visible: type =="words" ? false : true + DragList { + id: imageDrag anchors.fill: parent - touchPoints: [ TouchPoint { id: point1 } ] - property real positionX - property real positionY - property real lastX - property real lastY - property bool isRight: isRight - property string currPosition: "middle" - property string imageSource: image.source.toString() - - onPressed: { - items.instructionsVisible = false - positionX = point1.x - positionY = point1.y - var imagePos = image.mapToItem(null,0,0) - if(Activity.isDragInLeftArea(leftScreen.width, imagePos.x + parent.width)) { - currPosition = "left" - } - else if(Activity.isDragInRightArea(middleScreen.width + leftScreen.width,imagePos.x)) { - currPosition = "right" - } - else - currPosition = "middle" - } - - onUpdated: { - var moveX = point1.x - positionX - var moveY = point1.y - positionY - parent.x = parent.x + moveX - parent.y = parent.y + moveY - var imagePos = image.mapToItem(null,0,0) - leftAreaContainsDrag = Activity.isDragInLeftArea(leftScreen.width, imagePos.x + parent.width) - rightAreaContainsDrag = Activity.isDragInRightArea(middleScreen.width + leftScreen.width,imagePos.x) - lastX = 0, lastY = 0 - } - - onReleased: { - var droppedPosition = "middle"; - if(lastX == point1.x && lastY == point1.y) - return; - else if(leftAreaContainsDrag) - droppedPosition = "left" - else if(rightAreaContainsDrag) - droppedPosition = "right" - - // If we drop on same zone, we move it at its initial place - if(currPosition == droppedPosition) { - image.x = 0 - image.y = 0 - } - else { - Activity.dropControl(currPosition, droppedPosition, imageSource, index) - image.source = "" - } - - Activity.setValues() - lastX = point1.x - lastY = point1.y - } } } } } + } } - diff --git a/src/activities/categorization/categorization.js b/src/activities/categorization/categorization.js index 342b77af2..7669e1a2a 100644 --- a/src/activities/categorization/categorization.js +++ b/src/activities/categorization/categorization.js @@ -1,305 +1,322 @@ /* GCompris - categorization.js * * Copyright (C) 2016 Divyam Madaan * * Authors: * Divyam Madaan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ .pragma library .import QtQuick 2.6 as Quick .import GCompris 1.0 as GCompris .import "qrc:/gcompris/src/core/core.js" as Core var categoryModelIndex = 0; var currentSubLevel = 0; var items var lessons var categories var images var items var currentLevel = 1 var numberOfLevel var index var imagesData = [] var categoriesData = [] var expertCategories = [] var boardsUrl var answerTable = {} var totalImages var fileName = ":/gcompris/data/words/animals/camel.jpg" +var type +var categoriesCount +var categoryDataset +var categoryLists -function init(items_,boardsUrl_) { +function init(items_,boardsUrl_,type_,categoriesCount_) { boardsUrl = boardsUrl_ items = items_ + type = type_ + categoriesCount = categoriesCount_ items.menuModel.clear() currentSubLevel = 0 + categoriesCount = (items.file.exists(fileName) && type == "images") ? 18 : (type == "words" ? (items.categories.length) : 6) } function start() { categoriesData = [] items.categoryReview.stop() + categoryDataset = items.categoryReview.categoryDataset + categoryLists = items.categories + items.background.englishFallback = categoryLists == "" ? true : false + getCategoriesList(); +} - var isEmbeddedMode = items.file.exists(fileName) ? true : false - - items.categoriesFallback = !isEmbeddedMode - +function getCategoriesList() { var categoriesFilename; - var categoryDataset = items.categoryReview.categoryDataset - var categoryLists = items.categories + categoryDataset = items.categoryReview.categoryDataset + categoryLists = items.categories + var isEmbeddedMode = items.file.exists(fileName) ? true : false + items.categoriesFallback = isEmbeddedMode for(var i = 0; i < categoryLists.length; i++) { - categoriesFilename = "qrc" + boardsUrl + categoryLists[i] + categoriesFilename = (type == "words") ? "qrc" + boardsUrl + items.locale + "/" + categoryLists[i] : "qrc" + + boardsUrl + categoryLists[i] categoryDataset.source = categoriesFilename if(isEmbeddedMode || categoryDataset.item.isEmbedded) { categoriesData.push(categoryDataset.item) } } lessons = getAllLessons(categoriesData) categories = getCategoryModel(categoriesData) addPropertiesToCategories(categories) items.menuModel.append(categories) savedPropertiesToCategories(items.dialogActivityConfig.dataToSave) sortByFavorites() items.menuScreen.start() } // Inserts specific properties to the categories function addPropertiesToCategories(categories) { for (var i = 0; i < categories.length; i++) { categories[i]['name'] = categories[i].name categories[i]['image'] = categories[i].image categories[i]['favorite'] = false categories[i]['categoryIndex'] = i } } // Return all the properties we have to save function categoriesToSavedProperties() { var props = {} for(var i = 0; i < items.menuModel.count; i++) { var category = items.menuModel.get(i) props[category.name] = { 'favorite': category['favorite'] } } return props } // Update the categories based on a previous saving function savedPropertiesToCategories(dataToSave) { var props = dataToSave["data"] for(var i = 0; i < items.menuModel.count; i++) { var category = items.menuModel.get(i) var categoryname = category.name if(props && props[category.name]) { category['favorite'] = props[category.name].favorite } else { category['favorite'] = false } } } function sortByFavorites() { for(var i = 0; i < items.menuModel.count; i++) { if(items.menuModel.get(i)['favorite']) { items.menuModel.move(i, 0, 1); } } } function launchMenuScreen() { items.categoryReview.stop() items.menuScreen.start() } function startCategory() { items.categoryReview.start() items.menuScreen.stop() currentLevel = 0 items.bar.level = 0 initLevel() } function storeCategoriesLevels(index_) { index = index_ currentLevel = 0 numberOfLevel = 0 initLevel() } function initLevel() { items.bar.level = currentLevel + 1 items.categoryReview.score.currentSubLevel = 0 items.instructionsVisible = true getCategoryLevels(index); numberOfLevel = items.details.length; items.categoryReview.leftZone.clear(); items.categoryReview.rightZone.clear(); items.categoryReview.start(); items.menuScreen.stop() } function nextLevel() { if(numberOfLevel <= ++currentLevel) { currentLevel = 0 } items.categoryReview.score.currentSubLevel = 0 initLevel(index); getCategoryLevels(); } function previousLevel() { if(--currentLevel < 0) { currentLevel = numberOfLevel - 1 } initLevel(index); getCategoryLevels(); } // Checks if all the items are dragged and dropped in the correct or incorrect area. function allPlaced() { items.categoryReview.score.currentSubLevel = 0; for(var i = 0 ; i < items.categoryReview.leftZone.count; ++i) { for(var answer in answerTable) { var droppedZoneItem = items.categoryReview.leftZone.get(i) if(answer === droppedZoneItem.name && ((droppedZoneItem.droppedZone === "right" && answerTable[answer]) || (droppedZoneItem.droppedZone === "left" && !answerTable[answer]))) items.categoryReview.score.currentSubLevel ++ } } for(var i = 0 ; i < items.categoryReview.rightZone.count; ++i) { for(var answer in answerTable) { var droppedZoneItem = items.categoryReview.rightZone.get(i) if(answer === droppedZoneItem.name && ((droppedZoneItem.droppedZone === "right" && answerTable[answer]) || (droppedZoneItem.droppedZone === "left" && !answerTable[answer]))) items.categoryReview.score.currentSubLevel ++ } } if(items.categoryReview.score.currentSubLevel == totalImages) items.bonus.good("flower") else items.bonus.bad("flower") } // Save properties to lessons function getCategoryLevels() { var randomGood = 0; var randomBad = 0; + + items.categoryTitle = items.menuModel.get(index).name + items.categoryLesson = items.menuModel.get(index).categoryLesson ? items.menuModel.get(index).categoryLesson : '' + items.hintDisplay = (items.categoryLesson == '') ? false : true items.categoryReview.middleZone.clear() /* If easy or medium mode is selected, store the details of levels of category of that respective index in items.details. */ if(items.mode !== "expert") { items.details = lessons[index].map(function(ele) { return { "instructions": ele.instructions, "image": ele.image, "numberOfGood": ele.maxNumberOfGood, "numberofBad": ele.maxNumberOfBad, "categoryImages": ele.levelImages ,"good": ele.good, "bad": ele.bad ,"prefix": ele.prefix } }); } // If expert mode is selected, select a random level (selectedLevel) from a random category (selectedCategory) else if(items.mode === "expert") { var selectedCategory = Math.floor(Math.random() * expertCategories.length) var selectedLevel = [] selectedLevel[0] = expertCategories[selectedCategory][Math.floor(Math.random() * expertCategories[selectedCategory].length)] items.details = selectedLevel.map(function(ele) { return { "instructions": ele.instructions, "image": ele.image, "numberOfGood": ele.maxNumberOfGood, "numberofBad": ele.maxNumberOfBad, "categoryImages": ele.levelImages ,"good": ele.good, "bad": ele.bad, "prefix": ele.prefix } }); } var imagesPrefix = items.details[items.bar.level - 1].prefix // Good set of images var goodImages = items.details[items.bar.level - 1].good var numberOfGood = Math.min(goodImages.length,items.details[items.bar.level-1].numberOfGood); var goodZoneImages = goodImages.map(function(obj) { obj = imagesPrefix + obj return { "name": obj, "isRight": true } }); goodZoneImages = goodZoneImages.splice(0, numberOfGood); // Bad set of images var badImages = items.details[items.bar.level - 1].bad var badZoneImages = badImages.map(function(obj) { obj = imagesPrefix + obj return { "name": obj, "isRight": false } }); var numberOfBad = Math.min(badImages.length,items.details[items.bar.level-1].numberofBad); badZoneImages = badZoneImages.splice(0, numberOfBad); // Concat both set of images(good and bad) in allImages and store in middleZone model var allImages = goodZoneImages.concat(badZoneImages); Core.shuffle(allImages); for(var i = 0; i < allImages.length; i++) { answerTable[allImages[i].name] = allImages[i].isRight items.categoryReview.middleZone.append({"isRight": allImages[i].isRight,"name": allImages[i].name}) } totalImages = allImages.length items.categoryReview.score.numberOfSubLevels = totalImages } // get categories details from the complete dataset function getCategoryModel(dataset) { var categories = [] for (var c = 0; c < dataset.length; c++) { categories.push({ 'name': dataset[c].levels[0].name, 'image': dataset[c].levels[0].image, + 'categoryLesson': dataset[c].levels[0].categoryLesson, 'index': c }) } return categories } // get all the content (levels) from the category in dataset function getAllLessons(dataset) { var lessons = [] for(var c = 0; c < dataset.length; c++) { lessons.push(dataset[c].levels[0].content) if(dataset[c].allowExpertMode) { expertCategories.push(dataset[c].levels[0].content) } } return lessons } function setValues() { items.categoryReview.leftAreaContainsDrag = false items.categoryReview.rightAreaContainsDrag = false } function isDragInLeftArea(leftAreaRightBorderPos, elementRightPos) { if(elementRightPos <= leftAreaRightBorderPos) return true; else return false; } function isDragInRightArea(rightAreaLeftBorderPos, elementLeftPos) { if((rightAreaLeftBorderPos <= elementLeftPos)) return true; else return false; } function dropControl(sourcePosition, destinationPosition, image, index) { var destinationZone = destinationPosition == "left" ? items.categoryReview.leftZone : destinationPosition == "right" ? items.categoryReview.rightZone : items.categoryReview.middleZone var sourceZone = sourcePosition == "left" ? items.categoryReview.leftZone : sourcePosition == "right" ? items.categoryReview.rightZone : items.categoryReview.middleZone destinationZone.append({"name": image, "droppedZone": destinationPosition}) sourceZone.remove(index) } diff --git a/src/activities/categorization_words/ActivityInfo.qml b/src/activities/categorization_words/ActivityInfo.qml new file mode 100644 index 000000000..b37082ec7 --- /dev/null +++ b/src/activities/categorization_words/ActivityInfo.qml @@ -0,0 +1,35 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2016 Divyam Madaan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import GCompris 1.0 + +ActivityInfo { + name: "categorization_words/Categorization_words.qml" + difficulty: 1 + icon: "categorization_words/categorization_words.svg" + author: "Divyam Madaan <divyam3897@gmail.com>" + demo: true + title: qsTr("Categorization_words activity") + description: qsTr("Categorize the elements into correct and incorrect groups") + //intro: "Categorize the elements into the correct group" + goal: qsTr("Build conceptual thinking and enrich knowledge") + prerequisite: qsTr("Can drag elements using mouse") + manual: qsTr("Review the instructions and then drag and drop the elements as specified") + credit: "" + section: "fun" + createdInVersion: 8000 +} diff --git a/src/activities/categorization_words/CMakeLists.txt b/src/activities/categorization_words/CMakeLists.txt new file mode 100644 index 000000000..4872ea9de --- /dev/null +++ b/src/activities/categorization_words/CMakeLists.txt @@ -0,0 +1 @@ +GCOMPRIS_ADD_RCC(activities/categorization_words *.qml *.svg *.js resource/board/* resource/board/categ-en/*) diff --git a/src/activities/categorization_words/Categorization_words.qml b/src/activities/categorization_words/Categorization_words.qml new file mode 100644 index 000000000..af2d7db13 --- /dev/null +++ b/src/activities/categorization_words/Categorization_words.qml @@ -0,0 +1,34 @@ +/* GCompris - categorization_words.qml + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.1 + +import "../../core" +import "../categorization" +import "." + +Categorization { + id: categorizationWords + + onStart: focus = true + onStop: {} + boardsUrl: ":/gcompris/src/activities/categorization_words/resource/board/categ-" + type: "words" +} diff --git a/src/activities/categorization_words/categorization_words.svg b/src/activities/categorization_words/categorization_words.svg new file mode 100644 index 000000000..637d3a6b5 --- /dev/null +++ b/src/activities/categorization_words/categorization_words.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_adverbs.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_adverbs.qml new file mode 100644 index 000000000..f545da861 --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_adverbs.qml @@ -0,0 +1,194 @@ + +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Adverbs"), + "categoryLesson": qsTr("An adverb is a word that modifies a verb, adjective, another adverb, determiner, noun phrase, clause, or sentence. +We can class them in different categories.
+1. Adverbs of frequency: It is a word which tells us how often something happens.
+The blue word is an adverb of frequency in these cases:
I drink wateralot.
+Occasionally I drink coffee. +
I never go out.

+2. Adverbs of time: It is a word which tells when an action happened. +
The blue word is an adverb of time in these cases:
I have to leave now.
+I will do the work later.
+They are on a vacation for a week.

+3. Adverbs of place: It is a word which tells us where an action happens.
+The blue word is an adverb of place in these cases:
My house is nearby.
+Put that book here.
+Did you go there?

+4. Adverbs of manner: It is a word which tells us the way an action happens.
+The blue word is adverbs of manner in these cases:
She writes neatly.
+Eat healthily.
+He dressed hurriedly.

+5. Adverbs of degree: It is a word which tells the intensity of an action.
+The blue word is an adverb of degree in these cases:
He is tooslow.
+He didn't work hard enough.
+I am too short.

" + ), + "image": imagesPrefix + "alphabets.jpg", + "content": [ + { + "instructions": qsTr("Place the ADVERBS OF FREQUENCY to the right and others to the left"), + "image": "Adverbs of frequency", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["He is often late for work.","We should brushdaily.","John is never for late.","When do you usually go for walk?","We went for a walk yesterday.","We go for swimming twice a week."], + "bad": ["He is generous","She is a great player.","It is too hot.","They are playing.","It is sunny today.","I was just leaving."] + }, + { + "instructions": qsTr("Place the ADVERBS OF FREQUENCY to the right and others to the left"), + "image": "Adverbs of frequency", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I have never.","I don't usually give advice.","I always study after class.","I seldom put salt on my food.","I often read at night."], + "bad": ["Do you know him?","We will go tomorrow.","He wakes up early.","Did you play ?"] + }, + { + "instructions": qsTr("Place the ADVERBS OF FREQUENCY to the right and others to the left"), + "image": "Adverbs of frequency", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I normally go to gym.","I always do my work,","Have you ever been to France?"], + "bad": ["We are moving westwards.","Is it cold enough?.","They often play volleyball."] + }, + { + "instructions": qsTr("Place the ADVERBS OF TIME to the right and others to the left"), + "image": "Adverbs of time", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I go for a walk daily.","I am going tomorrow.","We go out for movie weekly.","He had his examyesterday.","Lunch has already been served.","They still live there."], + "bad": ["I am tired.","They went to buy a cake.","You are intelligent.","I am playing since morning.","The dog is hungry.","I just went to sleep."] + }, + { + "instructions": qsTr("Place the ADVERBS OF TIME to the right and others to the left"), + "image": "Adverbs of time", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["He still has not finished his work.","Are you coming tomorrow.","John went to the market yesterday.","I have never went to France."], + "bad": ["We are studying.","The girl ran.","She bought apples.","They did the work."] + }, + { + "instructions": qsTr("Place the ADVERBS OF TIME to the right and others to the left"), + "image": "Adverbs of time", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["Do it now.","He got up early.","This magazine is published monthly."], + "bad": ["I do my work regularly.","He drinks milkeveryday.","We studied maths."] + }, + { + "instructions": qsTr("Place the ADVERBS OF PLACE to the right and others to the left"), + "image": "Adverbs of place", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Put the food there.","My house is nearby.","I am going out.","Are you going outside?","This ship sails eastwards.","The dog ran towards me."], + "bad": ["Usually I get up early.","I am going to dentist.","He played r well.","I carefully placed the egg.","I often read at night.","I hardly ever get angry."] + }, + { + "instructions": qsTr("Place the ADVERBS OF PLACE to the right and others to the left"), + "image": "Adverbs of place", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["The sun rises from East.","He walked towards me.","I kicked the ball around.","I looked everywhere for my watch.","It is rather hot in here."], + "bad": ["We played yesterday.","He sang loudly.","Please sit here.","Do you know him."] + }, + { + "instructions": qsTr("Place the ADVERBS OF PLACE to the right and others to the left"), + "image": "Adverbs of place", + "maxNumberOfGood": 2, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["They are behind us.","We were waiting outside."], + "bad": ["The Earth is a planet.","I won the race.","Where are you going."] + }, + { + "instructions": qsTr("Place the ADVERBS OF MANNER to the right and others to the left"), + "image": "Adverbs of manner", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["He ran quickly.","He gently woke me up.","Walk quickly.","Listen carefully to learn.","Don't play music loudly.","A tortoise walks slowly."], + "bad": ["What is your name?","The cat is under the table.","I ate anapple.","I am going tomorrow.","I did the work myself.","He is brushing his teeth."] + }, + { + "instructions": qsTr("Place the ADVERBS OF MANNER to the right and others to the left"), + "image": "Adverbs of manner", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I worked hard.","The food was delicious.","The dog barksloudly.","I speak English fluently.","I often sleep late."], + "bad": ["He likes hamburger.","Ben writes beautifully.","They won the match.","It is a nice movie."] + }, + { + "instructions": qsTr("Place the ADVERBS OF MANNER to the right and others to the left"), + "image": "Adverbs of manner", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["The train arrived late.","He can drive fast.","They carefully read the notice."], + "bad": ["They went home.","This is my dog.","I am playing."] + }, + { + "instructions": qsTr("Place the ADVERBS OF DEGREE to the right and others to the left"), + "image": "Adverbs of degree", + "maxNumberOfGood": 5, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["We almost finished the work.","The food is absolutely delicious.","The dress was big enough for me.","The coffee was too hot.","He walked very quickly."], + "bad": ["He lost his dog.","Jone danced all night.","The rabbit hopped.","He speaks good English.","Mom ironed my clothes.","They are cooking food."] + }, + { + "instructions": qsTr("Place the ADVERBS OF DEGREE to the right and others to the left"), + "image": "Adverbs of degree", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["She rarely enjoys the game.","I am just leaving.","The water was extremely cold.","They hardly noticed me.","The test was too difficult."], + "bad": ["I read this book.","He topped the class.","I played tennis.","He likesyellow color."] + }, + { + "instructions": qsTr("Place the ADVERBS OF DEGREE to the right and others to the left"), + "image": "Adverbs of degree", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["We enjoyed the film immensely.","Is this car fast enough?","The film is too long."], + "bad": ["What is your name.","The dishes are washed by him.","The students are taught well."] + } + ] + } + ] +} diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_fruits.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_fruits.qml new file mode 100644 index 000000000..4bb695e88 --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_fruits.qml @@ -0,0 +1,99 @@ +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Fruits"), + "image": imagesPrefix + "alphabets.jpg", + "content": [ + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Banana","Orange","Grapes","Pear","Pineapple","Watermelon"], + "bad": ["Turnip","Onion","Taj Mahal","Carrot","car","house"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Apple","Mango","Apricot","Lemon","Strawberry","Papaya"], + "bad": ["tomato","potato","pancakes","school","dive","cheese"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 5, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Fig","Cherry","Avocado","Kiwi","Coconut"], + "bad": ["Lettuce","Maize","Beans","water","fries","milk"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Demonstrative Pronouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["Peach","Blackberry","Grapefruit","Litchi"], + "bad": ["cat","walk","peas","cabbage","watch"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["Muskmelon","Olive","Raspberry"], + "bad": ["kitten","apple","lock"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["Watermelon","Pomegranate","Cranberry"], + "bad": ["dress","chicken","garlic"] + }, + { + "instructions": qsTr("Place the FRUITS to the right and others to the left"), + "image": "Fruits", + "maxNumberOfGood": 2, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Tangerine","Guava"], + "bad": ["London","baseball","cd","spinach"] + } + ] + } + ] +} + diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_nouns.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_nouns.qml new file mode 100644 index 000000000..f0436b87a --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_nouns.qml @@ -0,0 +1,223 @@ +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Nouns"), + "image": imagesPrefix + "alphabets.jpg", + "categoryLesson": qsTr("A noun is a word which denotes person, place or thing. +We can class them in different categories.
+1. Proper Nouns: A proper noun is used for an individual person, place or orgization.
+blue word is a personal pronoun in these cases:
Cloe plays football.
+Dave is honest. +
Nile is the name of a river.

+2. Common Nouns: A common noun refers to general people, place or things. +
The blue word is a common noun in these cases:
Their teacherwas absent.
+Children are playing outside.
+Milkis good for health.

+3. Countable nouns: Countable nouns are people, places or things that can be counted.
+The blue word is a countable noun in these cases:
I ate a sandwich.
+Is this ballyours?
+I bought someapples.

+4. Uncountable nouns: Uncountable nouns are the things and substances that cannot be counted.
+The blue word is a uncountable noun in these cases:
I have somemoney.
+Do you like rice?
+I like listeningmusic.

+5. Collective nouns: A collective noun refers to collection of things taken as whole.
+The blue word is a collective noun in these cases:
The dogs gathered theflock of sheep.
+We bought our motherbouquetof roses.
+TheCrowdcheered the team.

+6. Abstract nouns: Abstract nouns refer to an idea, quality or state.
+The blue word is a abstract noun in these cases:
I love my parents.
+We must never losehope.
+Children have a lot ofcuriousity.

"), + "content": [ + { + "instructions": qsTr("Place the PROPER NOUNS to the right and others to the left"), + "image": "Proper Nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["James is a good boy.","Agatha Christie wrote many books.","Cleopetra is a cute kitten.","I am craving Oreos.","Wilson threw the ball.","We are going to France."], + "bad": ["She is a good girl.","They went to buy furniture.","Cat is under the table.","Bill went for shopping.","She looks beautiful in red dress.","They went for party."] + }, + { + "instructions": qsTr("Place the PROPER NOUNS to the right and others to the left"), + "image": "Proper Nouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Pacific ocean is the larget ocean.","Mango is my favorite fruit.","Earth revolves around the sun","Mount Everest is the highest mountain.","India is a nice country."], + "bad": ["John and I will play tennis.","We are going outside.","It's a nice weather.","Exercises keeps us fit."] + }, + { + "instructions": qsTr("Place the PROPER NOUNS to the right and others to the left"), + "image": "Proper Nouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["James is a good boy.","Agatha Christie wrote many books.","Cleopetra is a cute kitten.","I am craving Oreos.","Wilson threw the ball.","Nile is the longest river in the world."], + "bad": ["Our team won the match.","I don't have an umbrella.","My dog is not well."] + }, + { + "instructions": qsTr("Place the COMMON NOUNS to the right and others to the left"), + "image": "Common Nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["You broke my favorite mug","They all are waiting for us at the restraunt.","I want to travel to a big city.","I bought a new pair of jeans.","Call the police.","The waiter brought our food."], + "bad": ["I am going to see Dr. Ling.","Karen loves to eat.","Harry went to the park.","Jim loves to eat.","Frine is a good restraunt.","He runs fast."] + }, + { + "instructions": qsTr("Place the COMMON NOUNS to the right and others to the left"), + "image": "Common Nouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Sarah finally got her degree","Tim and his brother are on holidays.","Hary went to the park","I like vegetarian food.","I went to the dentist."], + "bad": ["Nick got into flight","Football is my favorite sport.","I like watching T.V.","This table is expensive.","The weather is nice today."] + }, + { + "instructions": qsTr("Place the COMMON NOUNS to the right and others to the left"), + "image": "Common Nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["We're going to have fish for dinner.","This book is full of classic novels.","Dog is my favorite animal."], + "bad": ["I really love art by Van Gogh.","Simy bought me a dress.","I heard Bern going to Germany."] + }, + { + "instructions": qsTr("Place the COUNTABLE NOUNS to the right and others to the left"), + "image": "Countable Nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["The children fell asleep quickly","The parade included fire trucks","Michael can play several instruments.","I love cookiees.","We like the large bottles of mineral water","I ate all the oranges."], + "bad": ["Would you like some chocolate?","The table was made of glass.","John loves sports.","I have alot of money.","There is no water in the jug.","John played well."] + }, + { + "instructions": qsTr("Place the COUNTABLE NOUNS to the right and others to the left"), + "image": "Countable Nouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["My dog is playing.","I haven't got many pens.","Mack has two cars","She has two sisters.","Those shoes look old."], + "bad": ["There's no truth in the rumours.","Would you like some coffee?","My favorite color is green.","Sun sets in the west."] + }, + { + "instructions": qsTr("Place the COUNTABLE NOUNS to the right and others to the left"), + "image": "Countable Nouns", + "maxNumberOfGood": 2, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["She brought a big suitcase.","We went on a trip to the Brazil."], + "bad": ["Most pottery is made of clay.","Its raining heavily.","The water is deep.","This place was stuck by an earthquake."] + }, + { + "instructions": qsTr("Place the UNCOUNTABLE NOUNS to the right and others to the left"), + "image": "Unocuntable nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I love music.","This news is important.","I have got some money.","Have you got any rice?","He ate the cheese.","I don't have much hair."], + "bad": ["I bought a toy.","The teacher taught us a lesson.","Jim was wearing a nice shirt.","Rin won the poetry competetion.","I have two pens.","We have two dogs."] + }, + { + "instructions": qsTr("Place the UNCOUNTABLE NOUNS to the right and others to the left"), + "image": "Unocuntable nouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["It's difficult to work in noise.","Have you got some paper?","Do you have time for a cup of coffee?","His advice helped me."], + "bad": ["I have been playing since morning.","Theywatching a basketball match.","I ate two mangoes.","George completed his work."] + }, + { + "instructions": qsTr("Place the UNCOUNTABLE NOUNS to the right and others to the left"), + "image": "Unocuntable nouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 2, + "prefix": "", + "good": ["Sugar is bad for you.","I don't drink much coffee.","I have a lot of work.","Silence is essential in libraries."], + "bad": ["We won the match.","I ate all the cookies."] + }, + { + "instructions": qsTr("Place the COLLECTIVE NOUNS to the right and others to the left"), + "image": "Collective nouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Our class took a field trip","We waited anxiously for the jury.","Their basketball team includes three players.","Napoleon’s army was finally defeated at Waterloo.","The town council has approved all plans.","He comes from a huge family."], + "bad": ["Use words properly to be understood.","Close the door.","I am going to the barber.","Let's go dancing.","We are going on vacation.","The laundry isn’t going to do itself."] + }, + { + "instructions": qsTr("Place the COLLECTIVE NOUNS to the right and others to the left"), + "image": "Collective nouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["The senate will be voting today.","All of the students are attending the school assembly.","Everyone in the audience applauded loudly ","The rock group has been on tour for months."], + "bad": ["The dog barked at the cat.","Throw the ball.","Follow the rules.","John started to run.","Plato was an influential Greek philosopher."] + }, + { + "instructions": qsTr("Place the COLLECTIVE NOUNS to the right and others to the left"), + "image": "Collective nouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["The boat’s crew worked all night","The team celebrated heartily.","The boys decided to join the navy after graduation."], + "bad": ["Come here","The restaurant is open.","The judge gave his verdict."] + }, + { + "instructions": qsTr("Place the ABSTRACT NOUNS to the right and others to the left"), + "image": "Abstract nouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 7, + "prefix": "", + "good": ["I want to see justice served.","We struck water at the depth of twenty feet.","I want your goodwill.","The length of this road is just two miles.","Apprehension is not good for health."], + "bad": ["This is John speaking.","Terry is taller than me","He drives carefully.","It's terribly hot.","Where is Greg?","The dog ran.","He plays tennis well."] + }, + { + "instructions": qsTr("Place the ABSTRACT NOUNS to the right and others to the left"), + "image": "Abstract nouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["My determination is to get higher education.","If we persevere, victory shall be ours.","There is uncertainty in the final exam date.","I will surprise my mom on her birthday.","Lots of pain make us a real human being."], + "bad": ["The ball is above the table.","Look over there.","It's time to go.","The driver stopped the bus.","She was walking rapidly."] + }, + { + "instructions": qsTr("Place the ABSTRACT NOUNS to the right and others to the left"), + "image": "Abstract nouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I worship to God daily which gives me strength.","Helping others is the real joy of life.","I hate bad and lazy people"], + "bad": ["She arrived early.","Have you done your homework?","Are you coming tomorrow?"] + } + ] + } + ] +} diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_pronouns.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_pronouns.qml new file mode 100644 index 000000000..3303eb538 --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_pronouns.qml @@ -0,0 +1,256 @@ +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Pronouns"), + "categoryLesson": qsTr("A pronoun is a word which replaces other words to avoid repetition. +We can class them in different categories.
+1. Personal pronouns: A personal pronoun is a word which replaces a person or an object.
+The blue word is personal pronoun in these cases:
I go to swim.
+He is intelligent. +
They are tired.

+2. Reflexive Pronouns: A reflexive pronoun is used when the object of a sentence is the same as the subject. +
The blue word is reflexive pronoun in these cases:
They cooked themselves.
+We did the job ourselves.
+I bought the fruits myself.

+3. Possessive pronouns: A possessive pronoun is a little word used to indicate possesion.
+The blue word is possesive pronoun in these cases:
This book is mine
+Is this ball yours?
+He lost his pen.

+4. Demonstrative pronouns: A demonstrative pronoun points somebody or something in a phrase and replaces it.
+The blue word is demonstrative pronoun in these cases:
This is my book.
+I ate those apples.
+ That place is far away.

+5. Indefinite Pronouns: A indefinite pronoun refers to non-specific beings, objects, or places.
+The blue word is indefinite pronoun in these cases:
Everyone was late.
+Someone stole my pen.
+Either will do.

+6. Relative pronouns: A relative pronoun is used to connect a relative clause to the main clause in a sentence.
+The blue word is relative pronoun in these cases:
I ate the fruits that I bought yesterday.
+I am looking for someone who can help me.
+This is the park where they will come.

+7.Interrogative pronoun: A interrogative pronoun is a word which is used to ask a question.
+The blue word is interrogative pronoun in these cases:
Whose eraser is this?
+Which your favorite team?
+Where were you?" + ), + "image": imagesPrefix + "alphabets.jpg", + "content": [ + { + "instructions": qsTr("Place the PERSONAL PRONOUNS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I study maths.","We play football","It is raining.","They speak English.","She is eating.","You were sleeping."], + "bad": ["Who was reading?","Daniel was playing.","George went outside.","Do it yourself.","The blue car.","Some milk is left."] + }, + { + "instructions": qsTr("Place the PERSONAL PRONOUNS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["It's getting late.","He loves football","I am writing.","We were laughing.","They didn't play."], + "bad": ["Whose pen is it?","John went.","The door was open.","Who went to school yesterday?"] + }, + { + "instructions": qsTr("Place the PERSONAL PRONOUNS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["It's snowing","Do you need help?","Have you seen him today?"], + "bad": ["When is the meeting?","His work was complete.","Where's the pencil"] + }, + { + "instructions": qsTr("Place the REFLEXIVE PRONOUNS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["She did the work herself","Can you talk to him yourself?","The door opened itself","I made the food myself","You should do your work yourself","I saw myself in the mirror."], + "bad": ["Who cooked the food?","They were laughing.","John played.","I read a book.","She bought fruits.","A wonderful old clock."] + }, + { + "instructions": qsTr("Place the REFLEXIVE PRONOUNS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["We painted the wall ourselves","Do your work yourself.","The door opened itself.","She saved herself.","They looked after themselves."], + "bad": ["I have some friends.","Would you like some bread.","She ate all apples.","He did his job."] + }, + { + "instructions": qsTr("Place the REFLEXIVE PRONOUNS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["We blamed ourselves.","Did you hurt yourself?","They looked after themselves."], + "bad": ["He writes properly.","He didn't drink milk.","We studied maths."] + }, + { + "instructions": qsTr("Place the POSSESSIVE PRONOUNS to the right and others to the left"), + "image": "Possessive Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["This is her birthday.","Its your ball.","This is my cat.","She bought her a dress.","He lost his watch.","The black dress is mine."], + "bad": ["He writes properly.","She cooks well","I am a singer","I lost my book","They gifted me a watch","I love swimming"] + }, + { + "instructions": qsTr("Place the POSSESSIVE PRONOUNS to the right and others to the left"), + "image": "Possessive Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["The bag is theirs.","I liked his singing.","Susan is a friend of mine.","His name was Alex.","Their eyes were paining."], + "bad": ["He writes poems.","They play volleyball.","We cooked meal.","Its raining outside."] + }, + { + "instructions": qsTr("Place the POSSESSIVE PRONOUNS to the right and others to the left"), + "image": "Possessive Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["He took his pen.","The dog wagged his tail.","My car is bigger."], + "bad": ["He loves nature.","They played well.","George is singing."] + }, + { + "instructions": qsTr("Place the DEMONSTRATIVE PRONOUNS to the right and others to the left"), + "image": "Demonstrative Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["This tastes good.","That is beautiful.","That book is good.","I'll buy these.","Is this yours?","That is incorrect."], + "bad": ["He was running.","I drank milk.","They complained.","We did well.","I did the work myself.","He brushes his teeth."] + }, + { + "instructions": qsTr("Place the DEMONSTRATIVE PRONOUNS to the right and others to the left"), + "image": "Demonstrative Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I wanted that.","Is that Jim?","I own those.","Did you see this?","I read this book."], + "bad": ["He swims.","Ben writes beautifully.","They won the match.","We sco#3bb0de well in exams."] + }, + { + "instructions": qsTr("Place the DEMONSTRATIVE PRONOUNS to the right and others to the left"), + "image": "Demonstrative Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["These are blue pens.","This is an apple.","Those were my fruits."], + "bad": ["They went home.","The #3bb0de pen was mine.","I am sleeping."] + }, + { + "instructions": qsTr("Place the INDEFINITE PRONOUNS to the right and others to the left"), + "image": "Indefinite Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Somebody ate my sandwich.","None is interested.","Everyone played football.","Either choice has its advantages.","I don't know any of the answers.","Everything happens for a reason."], + "bad": ["He lost his dog.","Jone likes listening music.","She is a dancer.","He speaks good English.","Mom has went to market.","I am cooking food."] + }, + { + "instructions": qsTr("Place the INDEFINITE PRONOUNS to the right and others to the left"), + "image": "Indefinite Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Everybody enjoyed the concert.","Nobody came.","Anyone can play this game.","Very few came for the class.","All were late for the party."], + "bad": ["Sun rises from east.","I drive car.","They lost their keys","He loves yellow color."] + }, + { + "instructions": qsTr("Place the INDEFINITE PRONOUNS to the right and others to the left"), + "image": "Indefinite Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["Everyone enjoyed the food.","Is anyone available today?","Few came to the wedding."], + "bad": ["They won the contest.","An apple a day keeps doctor away.","We went on holidays."] + }, + { + "instructions": qsTr("Place the RELATIVE PRONOUNS to the right and others to the left"), + "image": "Relative pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["The car which I drive is old","This is not the icecreamthatI like.","That's the dog who doesn't like me.","The man who I saw was a thief.","These are some books which I love.","This is the place where I ate lunch."], + "bad": ["These are not my shoes.","Did you hear her poem?","Jim works slow.","I didn't go to the party.","I love pizza.","This is my computer."] + }, + { + "instructions": qsTr("Place the RELATIVE PRONOUNS to the right and others to the left"), + "image": "Relative pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["The car which hit me was yellow.","The car that I drive is old.","This is the cake that I baked.","I will open whichever package arrives fast.","The person who called me is my best friend."], + "bad": ["His shoes are dirty.","He drives slow.","I completed my work myself.","The class passed the test."] + }, + { + "instructions": qsTr("Place the RELATIVE PRONOUNS to the right and others to the left"), + "image": "Relative pronouns", + "maxNumberOfGood": 2, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Katie, who is very kind is my friend","Whoever spilled the milk will have to clean it."], + "bad": ["It was sunny.","She went to the doctor.","That's my umbrella.","I bought a new dog."] + }, + { + "instructions": qsTr("Place the INTERROGATIVE PRONOUNS to the right and others to the left"), + "image": "Interrogative Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 7, + "prefix": "", + "good": ["Who will design the logo?","Whose pen is it?","What will you do there?","Whom did you ask the details?","Which place is it?"], + "bad": ["I play guitar.","They like watching movies.","He topped the class.","Sun sets in the west.","Exercises keep fit.","Phil is a good boy.","Diana is my best friend."] + }, + { + "instructions": qsTr("Place the INTERROGATIVE PRONOUNS to the right and others to the left"), + "image": "Interrogative Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Which is your favorite color?","Whose pen is this?","What is your name?","What are you talking about?","Whose camera is this?"], + "bad": ["I play alone.","This is my book.","They played well.","I am going."] + }, + { + "instructions": qsTr("Place the INTERROGATIVE PRONOUNS to the right and others to the left"), + "image": "Interrogative Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 7, + "prefix": "", + "good": ["Who won the race?","Whom shall we ask?","Which of these do you prefer?"], + "bad": ["He went to the stadium.","Do you play?","She is dancing."] + } + ] + } + ] +} + diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_tenses.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_tenses.qml new file mode 100644 index 000000000..b51b87b7d --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_tenses.qml @@ -0,0 +1,315 @@ +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Tenses"), + "image": imagesPrefix + "alphabets.jpg", + "categoryLesson": qsTr("A tense is a form taken by a verb to show the time of an action.
+1. Simpe present tense: It is used to describe habits, unchanging situations, general truths, and fixed arrangements.
+The blue word is a simple present tense in these cases:
I drink milk everyday.
+He likes mango. +
The exam starts at 10:00.

+2. Present continuous tense: It is used to express a continued or ongoing action. +
The blue word is a present continuous tense in these cases:
I am sleeping.
+They are playing.
+John is driving a car.

+3. Present perfect tense: It is used to express an action which happened at a short time before now.
+The blue word is a present perfect tense in these cases:
She has learnt the lesson.
+I have eaten my meal.
+They have gone to school.

+4. Simple past tense: He ate
+The blue word is a simple past tense in these cases:
They went to the park.
+I ate an apple.
+Has itrained.

+5. Past continuous tense: It is an ongoing action which occurred in past and completed at some point in past.
+The blue word is a past continuous tense in these cases:
It was raining yesterday.
+They were playing football.
+They were laughing at him.

+6. Past perfect tense: It is used to express an action which has occurred in past a long time ago and action which has occurred in past before another action in past.
+The blue word is a past perfect tense in these cases:
A thief had stolen my watch.
+He had slept.
+He had not finished his work.

+1. Simpe future tense:It is used to express time later than now, facts or certainty..
+blue word is a simple future tense in these cases:
It will rain tomorrow.
+Shall I open the window? +
I will go for the show.

+2. Future continuous tense:It is used to express an unfinished action or event that will be in progress at a time later than now. +
The blue word is a future continuous tense in these cases:
Will he be comingwith us?
+You will be missing the sunshine once you go back.
+Hewill be ironing my clothes in an hour.

+3. Future perfect tense: It is used to express an event that is expected or planned to happen before a time of reference in the future,
+The blue word is a future perfect tense in these cases:
I will have seen him.
+I will have eaten.
+I will have gone.

"), + "content": [ + { + "instructions": qsTr("Place the SIMPLE PRESENT TENSE to the right and others to the left"), + "image": "Present Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 7, + "prefix": "", + "good": ["I wake up.","We play basketball.","The cinema closes at 7pm.","We take a taxi to work.","He gets up early on Mondays."], + "bad": ["He woke up.","I am going.","George was studying.","They went to the party","I am not playing.","We did our homework.","He is learning French."] + }, + { + "instructions": qsTr("Place the SIMPLE PRESENT TENSE to the right and others to the left"), + "image": "Present Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I like pizza.","When do you wake up?","She lives in India.","I don't believe in witches.","We go for swimming everyday."], + "bad": ["She bought a new dress.","We went to the church.","Jim completed my work.","It is raining."] + }, + { + "instructions": qsTr("Place the SIMPLE PRESENT TENSE to the right and others to the left"), + "image": "Present Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I drink milk daily.","Sun rises in the east.","I go for walk every morning."], + "bad": ["We won the match.","I am listening music.","We cooked the meal"] + }, + { + "instructions": qsTr("Place the PRESENT CONTINUOUS WORDS to the right and others to the left"), + "image": "Present Continuous Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I am going.","He is playing.","She is riding.","I am loving.","They are eating.","He is sinking."], + "bad": ["I went for a walk.","We play football.","She saw him.","Roger was busy.","Tim was the winner.","We ate the meal."] + }, + { + "instructions": qsTr("Place the PRESENT CONTINUOUS WORDS to the right and others to the left"), + "image": "Present Continuous Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I am going to the market.","It is raining.","They are studying.","We are playing for 2 hours.","I am leaving work"], + "bad": ["I have lost my keys.","She went shopping","I will help you.","This is my cat."] + }, + { + "instructions": qsTr("Place the PRESENT CONTINUOUS WORDS to the right and others to the left"), + "image": "Present Continuous Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["They are sleeping.","He is always laughing.","What are you doing?"], + "bad": ["He had been playing since morning.","It was a good day.","I love to read."] + }, + { + "instructions": qsTr("Place the PRESENT PERFECT WORDS to the right and others to the left"), + "image": "Present Perfect Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["He has gone.","She has eaten.","He has done.","I have eaten.","He has shown","He has slept."], + "bad": ["I am sleeping.","He is upset.","They were talking.","Milk is good for health.","It is sunny outside.","Cat is under the table."] + }, + { + "instructions": qsTr("Place the PRESENT PERFECT WORDS to the right and others to the left"), + "image": "Present Perfect Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Have you slept?","She has eaten.","He has done,","I have eaten.","He has shown."], + "bad": ["I am busy.","He is my best friend.","The dog is hungry.","Today is sunny.","I am dreaming.","I had a mamgo."] + }, + { + "instructions": qsTr("Place the PRESENT PERFECT WORDS to the right and others to the left"), + "image": "Present Perfect Tense", + "maxNumberOfGood": 2, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I have just finished my work.","He has read that book."], + "bad": ["He had not eaten his meal.","I have been playing since morning.","I like apples.","He is running."] + }, + { + "instructions": qsTr("Place the PAST TENSE WORDS to the right and others to the left"), + "image": "Past Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["He went to the school.","I played cricket.","I did my work.","He ate a sandwich.","I loved music.","She drank the juice."], + "bad": ["The ball is under the table.","We are friends.","I like his work.","He loves pizza.","I like GCompris.","I am afraid of lizard."] + }, + { + "instructions": qsTr("Place the PAST TENSE WORDS to the right and others to the left"), + "image": "Past Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["We met him.","I did my job.","We saw a good film yesterday.","She finished her work.","He played the piano."], + "bad": ["I am reading this book.","The red kitten is mine.","I am playing soccer.","I like his work."] + }, + { + "instructions": qsTr("Place the PAST TENSE WORDS to the right and others to the left"), + "image": "Past Tense", + "maxNumberOfGood": 4, + "maxNumberOfBad": 2, + "prefix": "", + "good": ["He went to the school.","I played cricket.","I did my work.","He ate a sandwich."], + "bad": ["The glass is on the table.","Today is his birthday."] + }, + { + "instructions": qsTr("Place the PAST CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["We were going.","I was playing.","He was doing his work.","He was running.","I was drinking milk.","I was eating cookies."], + "bad": ["I am playing.","I ate my food.","I bought vegetables.","I had been sleeping since morning.","I am cooking.","He sells vegetables."] + }, + { + "instructions": qsTr("Place the PAST CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["It was raining.","They were swimming.","Were they laughing?","Was she crying
?"], + "bad": ["I am singing at the concert.","They won the match.","We are washing clothes.","I had a fish.","I don't eat spinach."] + }, + { + "instructions": qsTr("Place the PAST CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["We were walking.","They were climbing a hill.","She was not working."], + "bad": ["We climbed the mountain.","I am driving a car.","I love music."] + }, + { + "instructions": qsTr("Place the PAST PERFECT WORDS to the right and others to the left"), + "image": "Past perfect Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["We had swum.","They had played voleyball.","When they arrived, we had already started cooking. ","Had they arrived?","The train had just left when I arrived.","We had had that car for ten years."], + "bad": ["I like his work.","He loves pizza.","I like GCompris.","I am afraid of lizard.","He is busy>/font> today.","I will go there tomorrow."] + }, + { + "instructions": qsTr("Place the PAST PERFECT WORDS to the right and others to the left"), + "image": "Past Perfect Tense", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["She had never seen a bear.","He had not slept well.","My car had been repaird by John.","I had cleaned it off the door."], + "bad": ["She is a good dancer.","We are going for his birthday.","We are tired.","I like the sunrise.","We go for running everyday."] + }, + { + "instructions": qsTr("Place the PAST PERFECT WORDS to the right and others to the left"), + "image": "Past Perfect Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["The show had started before we arrived.","I wish I had not been so late.","I had eaten my dinner before time."], + "bad": ["They lost their way.","We will play handball.","He works hard."] + }, + { + "instructions": qsTr("Place the SIMPLE FUTURE WORDS to the right and others to the left"), + "image": "Simple future Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 7, + "prefix": "", + "good": ["I will buy a computer.","Will you go to visit him?","It will rain tonight.","I shall play football.","I will watch the film"], + "bad": ["I am going for a walk.","Can I help you?","It is so cold.","Stop fighting!","He is a doctor.","I am not well","The clothes are dirty."] + }, + { + "instructions": qsTr("Place the SIMPLE FUTURE WORDS to the right and others to the left"), + "image": "Simple future Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["Will you help him?","Will you cook food?","John will finish the work.","I will get it.","I won't go alone."], + "bad": ["Could you open the door?","I don't open the door.","He has a headache.","We are going in the car."] + }, + { + "instructions": qsTr("Place the SIMPLE FUTURE WORDS to the right and others to the left"), + "image": "Simple future Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I shall wash the clothes.","I will eat fish.","I will get you some tea."], + "bad": ["It is 6:30.","I am good at tennis.","When did you come?"] + },, + { + "instructions": qsTr("Place the FUTURE CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I will not be waiting for you.","He will not flying a kite.","It will be raining tomorrow.","They won't be watching T.V.","What will you be doing?","She will not be sleeping."], + "bad": ["Are you dancing?","I am at park.","Which one is your car?","These are my shoes.","She is my sister.","Where were you born?."] + }, + { + "instructions": qsTr("Place the FUTURE CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["I will be baking a cake.","Will you be going to market?","She will be having a bath.","John won't be sleeping now."], + "bad": ["You can do it.","We study every afternoon.","This is my car.","How old are you?"] + }, + { + "instructions": qsTr("Place the FUTURE CONTINUOUS WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I am going to be throwing a party.","I will be hosing off my car.","He will be working."], + "bad": ["You did great.","Don't give up.","Where does he live?"] + }, + { + "instructions": qsTr("Place the FUTURE PERFECT WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["I will have finished this book.","She will have cooked food.","It will have stopped raining","Will it have got colder?","Will we have watched the film?","When will you have finished?"], + "bad": ["He accepted the job","What does he work?","How is the food here?","Let me solve this problem.","","He sells vegetables."] + }, + { + "instructions": qsTr("Place the FUTUR PERFECT WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["When will you have read the book?","We will have cleaned the house.","John will have eaten the cake.","The train will have left.","The guests will have arrived."], + "bad": ["What are you listening to?","I can't ride a bike","The sky is blue.","Tomorrow is Monday."] + }, + { + "instructions": qsTr("Place the FUTURE PERFECT WORDS to the right and others to the left"), + "image": "Past Continuous Tense", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["She is going to have had my book.","I will have been in London.","They will have completed the project."], + "bad": ["These cushions are new.","I have my exam tomorrow.","The baby is smiling."] + } + ] + } + ] +} diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_vegetables.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_vegetables.qml new file mode 100644 index 000000000..9564d35ee --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_vegetables.qml @@ -0,0 +1,91 @@ + +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Vegetables"), + "image": imagesPrefix + "alphabets.jpg", + "content": [ + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Vegetables", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Tomato","Onion","Potato","Carrot","Eggplant","Cabbage"], + "bad": ["apple","mango","orange","guava","cheese","wood"] + }, + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Vegetables", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Cucumber","Pea","Cauliflower","Radish","Spinach","Garlic"], + "bad": ["muskmellon","peach","fig","cranberry","mobile","study"] + }, + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Vegetables", + "maxNumberOfGood": 5, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Turnip","Maize","Celery","Broccoli","Beans"], + "bad": ["color","jacket","food","kiwi","table","risk"] + }, + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Demonstrative Pronouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["Lettuce","Zucchini","Pepper","Asparagus"], + "bad": ["hands","spoon","duck","cookies","pomogrenate"] + }, + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Vegetables", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["sweet potato","mushroom","Ladyfinger"], + "bad": ["tangerine","ice-cream","papaya"] + }, + { + "instructions": qsTr("Place the VEGETABLES to the right and others to the left"), + "image": "Vegetables", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["Artichoke","Bottle guard","Coriander"], + "bad": ["apricot","boat","boy"] + } + ] + } + ] +} + diff --git a/src/activities/categorization_words/resource/board/categ-en_GB/category_verbs.qml b/src/activities/categorization_words/resource/board/categ-en_GB/category_verbs.qml new file mode 100644 index 000000000..d7ca10b08 --- /dev/null +++ b/src/activities/categorization_words/resource/board/categ-en_GB/category_verbs.qml @@ -0,0 +1,101 @@ + +/* GCompris + * + * Copyright (C) 2016 Divyam Madaan + * + * Authors: + * Divyam Madaan + * + * 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.0 + +QtObject { + property bool isEmbedded: true + property bool allowExpertMode: true + property string imagesPrefix: "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/" + property variant levels: [ + { + "name": qsTr("Verbs"), + "categoryLesson": qsTr("A verb is a word which conveys action, an occurrence, or a state of being.
+1. Transitive verbs: A A transitive verb is a verb followed by a noun or noun phrase.
+The blue word is transitive verb in these cases:
I read a newspaper.
+She listens music. +
I washed the car.

+2. Instransitive verbs: An intransitive verb is a verb that does not have a direct object. +
The blue word is intransitive verb in these cases:
They cooked.
+The bus stopped.
+That smells.

" + ), + "image": imagesPrefix + "alphabets.jpg", + "content": [ + { + "instructions": qsTr("Place the TRANSITIVE VERBS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["Iadmire you.","He loves music.","Everyone wished him.","Theygave me this book.","Heeats cookies.","Johnsaw an eagle."], + "bad": ["Who was reading?","Daniel was playing.","George went outside.","Do it yourself.","The blue car.","Some milk is left."] + }, + { + "instructions": qsTr("Place the TRANSITIVE VERBS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 5, + "maxNumberOfBad": 4, + "prefix": "", + "good": ["I baked the cake.","Hedrove the car.","Theymoved the table.","John wrote a poem.","She painted the canvas."], + "bad": ["Whose pen is it?","John went.","The door was open.","Who went to school yesterday?"] + }, + { + "instructions": qsTr("Place the TRANSITIVE VERBS to the right and others to the left"), + "image": "Personal Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["I want a chocolate.","They sang a song.","He drove the car."], + "bad": ["When is the meeting?","His work was complete.","Where's the pencil"] + }, + { + "instructions": qsTr("Place the INTRANSITIVE VERBS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 6, + "maxNumberOfBad": 6, + "prefix": "", + "good": ["She cried","I laughed.","The book fell.","The sun set.","He sang.","He ran."], + "bad": ["Who cooked the food?","They were laughing.","John played.","I read a book.","She bought fruits.","A wonderful old clock."] + }, + { + "instructions": qsTr("Place the INTRANSITIVE VERBS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 4, + "maxNumberOfBad": 5, + "prefix": "", + "good": ["They drove.","I make.","They draw.","The stars twinkled."], + "bad": ["I have some friends.","Would you like some bread.","She ate all apples.","He did his job."] + }, + { + "instructions": qsTr("Place the INTRANSITIVE VERBS to the right and others to the left"), + "image": "Reflexive Pronouns", + "maxNumberOfGood": 3, + "maxNumberOfBad": 3, + "prefix": "", + "good": ["The bus stopped..","He died."], + "bad": ["He writes properly.","He didn't drink milk.","We studied maths."] + } + ] + } + ] +} + diff --git a/src/core/DialogBackground.qml b/src/core/DialogBackground.qml index be0661375..8800b4dad 100644 --- a/src/core/DialogBackground.qml +++ b/src/core/DialogBackground.qml @@ -1,130 +1,131 @@ /* GCompris - dialogBackground.qml * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import QtQuick.Controls 1.5 import GCompris 1.0 /** * Base QML component for all full screen dialog screens. * @ingroup components * * Defines the general screen layout used by the following full screen * dialog elements: * * DialogAbout, DialogHelp. * * For a general purpose dialog cf. GCDialog. * * @inherit QtQuick.Rectangle */ Rectangle { id: dialogBackground color: "#696da3" border.color: "black" border.width: 1 z: 1000 property bool isDialog: true property string title property alias titleIcon: titleIcon.source + property alias textBody: textContent.text property string content signal close signal start signal pause signal play signal stop Row { spacing: 2 Item { width: 10; height: 1 } Column { spacing: 10 anchors.top: parent.top Item { width: 1; height: 10 } Rectangle { color: "#e6e6e6" radius: 6.0 width: dialogBackground.width - 30 height: title.height * 1.2 border.color: "black" border.width: 2 Image { id: titleIcon anchors { left: parent.left top: parent.top margins: 4 * ApplicationInfo.ratio } } GCText { id: title text: dialogBackground.title width: dialogBackground.width - 30 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter color: "black" fontSize: 20 font.weight: Font.DemiBold wrapMode: Text.WordWrap } } Rectangle { color: "#e6e6e6" radius: 6.0 width: dialogBackground.width - 30 height: dialogBackground.height - 100 border.color: "black" border.width: 2 anchors.margins: 100 Flickable { id: flick anchors.margins: 8 anchors.fill: parent contentWidth: textContent.contentWidth contentHeight: textContent.contentHeight flickableDirection: Flickable.VerticalFlick clip: true GCText { id: textContent text: style + "" + content + "" width: flick.width height: flick.height fontSize: regularSize wrapMode: TextEdit.Wrap textFormat: TextEdit.RichText property string style: "" } } } Item { width: 1; height: 10 } } } // The cancel button GCButtonCancel { onClose: parent.close() } }