diff --git a/src/activities/activities.txt b/src/activities/activities.txt index f020a5005..b1a51cdc8 100644 --- a/src/activities/activities.txt +++ b/src/activities/activities.txt @@ -1,123 +1,124 @@ # 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 braille_alphabets braille_fun canal_lock chess chess_2players chess_partyend chronos clickanddraw clickgame click_on_letter click_on_letter_up clockgame color_mix color_mix_light colors details drawnumber enumerate erase erase_2clic erase_clic explore_farm_animals explore_monuments explore_world_animals explore_world_music +family fifteen followline football geo-country geography gletters gnumch-equality gnumch-factors gnumch-inequality gnumch-multiples gnumch-primes graph-coloring guessnumber hangman hanoi hanoi_real hexagon imagename instruments intro_gravity lang leftright lightsoff louis-braille magic-hat-minus magic-hat-plus maze mazeinvisible mazerelative melody memory 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 numbers-odd-even paintings penalty planegame readingh readingv redraw redraw_symmetrical renewable_energy reversecount scalesboard scalesboard_weight scalesboard_weight_avoirdupois simplepaint smallnumbers smallnumbers2 sudoku superbrain tangram target tic_tac_toe tic_tac_toe_2players traffic watercycle wordsgame diff --git a/src/activities/family/ActivityInfo.qml b/src/activities/family/ActivityInfo.qml new file mode 100644 index 000000000..3d870a889 --- /dev/null +++ b/src/activities/family/ActivityInfo.qml @@ -0,0 +1,33 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2015 Rajdeep Kaue + * + * 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: "family/Family.qml" + difficulty: 4 + icon: "family/family.svg" + author: "Rajdeep Kaur <rajdeep51994@gmail.com" + demo: true + title: "Family activity" + description: "This activity will give teach about who we are related to our relatives" + goal: "To get an idea about Relationships in the family" + prerequisite: "Reading Skills" + manual: "" + credit: "" + section: "fun" +} diff --git a/src/activities/family/CMakeLists.txt b/src/activities/family/CMakeLists.txt new file mode 100644 index 000000000..2b0a48fff --- /dev/null +++ b/src/activities/family/CMakeLists.txt @@ -0,0 +1 @@ +GCOMPRIS_ADD_RCC(activities/family *.qml *.svg *.js resource/*) diff --git a/src/activities/family/Family.qml b/src/activities/family/Family.qml new file mode 100644 index 000000000..37b9912f6 --- /dev/null +++ b/src/activities/family/Family.qml @@ -0,0 +1,312 @@ +/* GCompris - family.qml + * + * Copyright (C) 2015 RAJDEEP KAUR + * + * Authors: + * RAJDEEP KAUR (Qt Quick port) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.1 +import GCompris 1.0 +import QtQuick.Controls 1.0 + +import "../../core" +import "family.js" as Activity + +ActivityBase { + id: activity + property string url : "qrc:/gcompris/src/activities/family/resource/" + onStart: focus = true + onStop: {} + + pageComponent: Image { + id: background + anchors.fill: parent + fillMode: Image.PreserveAspectCrop + source: "qrc:/gcompris/src/activities/family/resource/background.svg" + sourceSize.width: parent.width + signal start + signal stop + + Component.onCompleted: { + activity.start.connect(start) + activity.stop.connect(stop) + } + + // Add here the QML items you need to access in javascript + QtObject { + id: items + property Item main: activity.main + property alias background: background + property alias bar: bar + property alias bonus: bonus + + } + + onStart: { Activity.start(items) } + onStop: { Activity.stop() } + + + + DialogHelp { + id: dialogHelp + onClose: home() + } + + Image{ + id:bambo1 + source: url + "bambo.svg" + x:background.width/14+2*circleContent2.width + y:background.height/2.5 + width:background.width/80 + height:background.height/2 + rotation:90 + + } + + Item{ + id:caption1 + GCText{ + id:caption1text + text:Activity.caption[bar.level-1][0] + visible:Activity.caption[bar.level-1][0] === "?" ? false : true + x:background.width/14+2*circleContent2.width + y:background.height/1.5 + } + Image{ + id:caption1image + source:url+"questionmark.svg" + visible:Activity.caption[bar.level-1][0] === "?" ? true : false + x:background.width/14+2*circleContent2.width + y:background.height/1.5 + + } + + } + + Image{ + id:bambo2 + source:url + "bambo.svg" + x:background.width/5.5 + y:background.height/5.5 + height:background.height/1.8 + width:background.width/80 + rotation:40 + + } + + Item{ + id:caption2 + x:background.width/7 + y:background.height/2.5 + GCText{ + text:Activity.caption[bar.level-1][1] + visible:Activity.caption[bar.level-1][1] === "?" ? false : true + + + } + Image{ + source:url+"questionmark.svg" + visible:Activity.caption[bar.level-1][1] === "?" ? true : false + } + + } + Image{ + id:bambo3 + source:url+ "bambo.svg" + height:background.height/2 + width:background.width/60 + x:background.width/14+background.width/4+(circleContent2.width) + y:background.height/5 + rotation:150 + } + + Item{ + id:caption3 + y:background.height/2.5 + x:background.width/14+background.width/4+(1.3*circleContent2.width) + GCText{ + text:Activity.caption[bar.level-1][2] + visible:Activity.caption[bar.level-1][2] === "?" ? false : true + + + + } + Image{ + source:url+"questionmark.svg" + visible:Activity.caption[bar.level-1][2] === "?" ? true : false + anchors.top:bambo3.bottom + anchors.rightMargin: 7 + + } + + } + + Item { + id:circleContent1 + x:background.width/3.6 + y:background.height/10 + width:background.width/9 + height:background.width/9 + Rectangle{ + id:circlef + width:parent.width + height:parent.height + radius:parent.width/2 + border.color:"black" + border.width:5 + Image{ + id:pic1 + source:url+ Activity.CirleContent[items.bar.level-1][0] + width:parent.width + height:parent.height + anchors{ + horizontalCenter:parent.horizontalCenter + verticalCenter: parent.verticalCenter + } + } + + } + } + + + Grid { + columns:2 + columnSpacing:background.width/4 + x:background.width/14 + y:background.height/1.8 + Item { + id:circleContent2 + width:background.width/9 + height:background.width/9 + Rectangle{ + id:circlef1 + width:parent.width + height:parent.height + border.color:"black" + radius:parent.width/2 + border.width: 5 + Image{ + id:pic2 + source:url+Activity.CirleContent[items.bar.level-1][1] + width:parent.width + height:parent.height + anchors{ + horizontalCenter:parent.horizontalCenter + verticalCenter: parent.verticalCenter + } + + } + } + } + + + Item { + id:circleContent3 + width:background.width/9 + height:background.width/9 + Rectangle{ + id:cirlef2 + width:parent.width + height:parent.height + radius:parent.width/2 + border.color:"black" + border.width: 5 + Image{ + id:pic3 + source:url+Activity.CirleContent[items.bar.level-1][2] + width:parent.width + height:parent.height + anchors{ + horizontalCenter:parent.horizontalCenter + verticalCenter: parent.verticalCenter + } + + } + + } + } + } + + Grid { + columns: 1 + rowSpacing:background.width/10 + x:background.width/1.5 + y:background.height/14 + Button { + id:button1 + style: GCButtonStyle {} + width:background.width/5 + height:background.height/6 + text:Activity.Options[items.bar.level-1][0] + onClicked:{ + if(button1.text === Activity.answer[bar.level-1]) { + bonus.good("lion") + } + + } + + } + Button { + id:button2 + style: GCButtonStyle {} + width:background.width/5 + height:background.height/6 + text:Activity.Options[items.bar.level-1][1] + onClicked:{ + if(button2.text === Activity.answer[bar.level-1]) { + bonus.good("lion") + } + + } + + } + Button { + id:button3 + style: GCButtonStyle {} + width:background.width/5 + height:background.height/6 + text:Activity.Options[items.bar.level-1][2] + onClicked:{ + if(button3.text === Activity.answer[bar.level-1]) { + bonus.good("lion") + } + + } + + } + + } + + + + Bar { + id: bar + content: BarEnumContent { value: help | home | level } + onHelpClicked: { + displayDialog(dialogHelp) + } + onPreviousLevelClicked: Activity.previousLevel() + onNextLevelClicked: Activity.nextLevel() + onHomeClicked: activity.home() + } + + Bonus { + id: bonus + Component.onCompleted: win.connect(Activity.nextLevel) + } + } + +} diff --git a/src/activities/family/family.js b/src/activities/family/family.js new file mode 100644 index 000000000..572de5af3 --- /dev/null +++ b/src/activities/family/family.js @@ -0,0 +1,100 @@ +/* GCompris - family.js + * + * Copyright (C) 2015 YOUR NAME + * + * Authors: + * (GTK+ version) + * "YOUR NAME" (Qt Quick port) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +.pragma library +.import QtQuick 2.0 as Quick + +var currentLevel = 0 +var numberOfLevel = 13 +var items + +var CirleContent = [ [ "girl1.svg","man1.svg","grandmother.svg"] , + [ "girl2.svg","man2.svg","grandpa.svg" ], + [ "man1.svg","man2.svg","girl3.svg"], + [ "lady.svg","boy1.svg","lady1.svg"], + [ "boy1.svg","lady.svg","girl2.svg"], + [ "man1.svg","man2.svg","boy1.svg"], + [ "girl3.svg","man1.svg","man2.svg"], + [ "grandmother.svg","man1.svg","boy1.svg"], + [ "girl2.svg","lady2.svg","grandpa.svg"] , + [ "girl1.svg","man1.svg","grandmother.svg"], + [ "girl2.svg","man2.svg","grandpa.svg"], + [ "girl3.svg","man1.svg","girl2.svg"], + [ "man1.svg","man2.svg","girl3.svg"], +] ; +var Options = [[ "Grand Mother","Grand Father","Father" ], + [ "Grand Mother", "Mother", "Grand Father"], + [ "Uncle","Aunty","father"], + [ "Mother","Aunty","GrandMother"], + [ "Brother","Sister","Cousin"], + [ "Daughter","Son","Newphew"], + [ "Newphew","Niece","Daughter"], + [ "Grand Son", "Son","Son In Law"], + [ "Grand Daughter","Daughter","Daughter In Law"], + [ "Mother","Mother in law","Aunty"], + [ "Father", "Father in Law", "Uncle" ], + [ "Sister","Cousin","Sister in Law"], + [ "Brother","Brother in law","Cousin"] +] +var answer = ["Grand Mother","Grand Father","Uncle","Aunty","Cousin","Newphew","Niece","Grand Son","Grand Daughter","Mother in law","Father in Law","Sister in Law","Brother in law"]; + +var caption = [ ["Mother","Father","?"], + ["Father","Father","?"], + ["Father","Brother","?"], + ["Mother","?","Sister"], + ["Mother","Aunty","?"], + ["Father","Brother","?"], + ["Brother","?","Father"], + ["Son","Son","?"], + ["Father","Mother","?"], + ["Mother","Husband","?"], + ["Father","Wife","?"], + ["?","Wife","Sister"], + ["Husband","?","Brother"] + ] + +function start(items_) { + items = items_ + currentLevel = 0 + + initLevel() +} + +function stop() { +} + +function initLevel() { + items.bar.level = currentLevel + 1 +} + +function nextLevel() { + if(numberOfLevel <= ++currentLevel ) { + currentLevel = 0 + } + initLevel(); +} + +function previousLevel() { + if(--currentLevel < 0) { + currentLevel = numberOfLevel - 1 + } + initLevel(); +} diff --git a/src/activities/family/family.svg b/src/activities/family/family.svg new file mode 100644 index 000000000..90761d7e9 --- /dev/null +++ b/src/activities/family/family.svg @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Open Clip Art Library + + + People + 2008-02-27T13:01:34 + people symbol + http://openclipart.org/detail/15048/people-by-nicubunu + + + nicubunu + + + + + abstract + abstract + clip art + clipart + image + media + people + people + png + public domain + svg + symbol + symbol + + + + + + + + + + + + + + Clipart by Nicu Buculei - head1 + + + Nicu Buculei + + + + + + + + + + + + + diff --git a/src/activities/family/resource/background.svg b/src/activities/family/resource/background.svg new file mode 100644 index 000000000..84a66696e --- /dev/null +++ b/src/activities/family/resource/background.svg @@ -0,0 +1,153 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/bambo.svg b/src/activities/family/resource/bambo.svg new file mode 100644 index 000000000..c6e0eaf84 --- /dev/null +++ b/src/activities/family/resource/bambo.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/src/activities/family/resource/boy1.svg b/src/activities/family/resource/boy1.svg new file mode 100644 index 000000000..48ceebba0 --- /dev/null +++ b/src/activities/family/resource/boy1.svg @@ -0,0 +1,178 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/boy2.svg b/src/activities/family/resource/boy2.svg new file mode 100644 index 000000000..feddfdb24 --- /dev/null +++ b/src/activities/family/resource/boy2.svg @@ -0,0 +1,261 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/girl1.svg b/src/activities/family/resource/girl1.svg new file mode 100644 index 000000000..3a8c5745b --- /dev/null +++ b/src/activities/family/resource/girl1.svg @@ -0,0 +1,181 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/girl2.svg b/src/activities/family/resource/girl2.svg new file mode 100644 index 000000000..c3a39df35 --- /dev/null +++ b/src/activities/family/resource/girl2.svg @@ -0,0 +1,167 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/girl3.svg b/src/activities/family/resource/girl3.svg new file mode 100644 index 000000000..4532dc9ae --- /dev/null +++ b/src/activities/family/resource/girl3.svg @@ -0,0 +1,175 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/grandmother.svg b/src/activities/family/resource/grandmother.svg new file mode 100644 index 000000000..c5c6d82eb --- /dev/null +++ b/src/activities/family/resource/grandmother.svg @@ -0,0 +1,136 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/grandpa.svg b/src/activities/family/resource/grandpa.svg new file mode 100644 index 000000000..405fe6b23 --- /dev/null +++ b/src/activities/family/resource/grandpa.svg @@ -0,0 +1,237 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/lady.svg b/src/activities/family/resource/lady.svg new file mode 100644 index 000000000..a6bd30423 --- /dev/null +++ b/src/activities/family/resource/lady.svg @@ -0,0 +1,239 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/lady1.svg b/src/activities/family/resource/lady1.svg new file mode 100644 index 000000000..652a772f1 --- /dev/null +++ b/src/activities/family/resource/lady1.svg @@ -0,0 +1,319 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/lady2.svg b/src/activities/family/resource/lady2.svg new file mode 100644 index 000000000..f6e6491eb --- /dev/null +++ b/src/activities/family/resource/lady2.svg @@ -0,0 +1,273 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/man1.svg b/src/activities/family/resource/man1.svg new file mode 100644 index 000000000..393ea605c --- /dev/null +++ b/src/activities/family/resource/man1.svg @@ -0,0 +1,263 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/man2.svg b/src/activities/family/resource/man2.svg new file mode 100644 index 000000000..57637dadb --- /dev/null +++ b/src/activities/family/resource/man2.svg @@ -0,0 +1,255 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/man3.svg b/src/activities/family/resource/man3.svg new file mode 100644 index 000000000..577732165 --- /dev/null +++ b/src/activities/family/resource/man3.svg @@ -0,0 +1,191 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/activities/family/resource/questionmark.svg b/src/activities/family/resource/questionmark.svg new file mode 100644 index 000000000..117067a44 --- /dev/null +++ b/src/activities/family/resource/questionmark.svg @@ -0,0 +1,288 @@ + + + + + Question Mark + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Question Mark + + + + + + + + + + + + + + + diff --git a/src/activities/family/resource/stick.svg b/src/activities/family/resource/stick.svg new file mode 100644 index 000000000..1ca1143f7 --- /dev/null +++ b/src/activities/family/resource/stick.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + +