diff --git a/src/activities/activities.txt b/src/activities/activities.txt --- a/src/activities/activities.txt +++ b/src/activities/activities.txt @@ -41,6 +41,7 @@ details digital_electricity drawletters +drawletters-cursive drawnumbers enumerate erase @@ -122,8 +123,8 @@ numbers-odd-even paintings penalty -piano_composition photo_hunter +piano_composition planegame play_piano play_rhythm diff --git a/src/activities/drawletter-cursive/ActivityInfo.qml b/src/activities/drawletter-cursive/ActivityInfo.qml new file mode 100644 --- /dev/null +++ b/src/activities/drawletter-cursive/ActivityInfo.qml @@ -0,0 +1,40 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2018 Your Name + * + * 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: "drawletter-cursive/DrawletterCursive.qml" + difficulty: 1 + icon: "drawletter-cursive/drawletter-cursive.svg" + author: "Your Name <yy@zz.org>" + demo: true + //: Activity title + title: "DrawletterCursive activity" + //: Help title + description: "" + //intro: "put here in comment the text for the intro voice" + //: Help goal + goal: "" + //: Help prerequisite + prerequisite: "" + //: Help manual + manual: "" + credit: "" + section: "fun" + createdInVersion: +} diff --git a/src/activities/drawletter-cursive/CMakeLists.txt b/src/activities/drawletter-cursive/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/activities/drawletter-cursive/CMakeLists.txt @@ -0,0 +1 @@ +GCOMPRIS_ADD_RCC(activities/drawletter-cursive *.qml *.svg *.js resource/*) diff --git a/src/activities/drawletter-cursive/DrawletterCursive.qml b/src/activities/drawletter-cursive/DrawletterCursive.qml new file mode 100644 --- /dev/null +++ b/src/activities/drawletter-cursive/DrawletterCursive.qml @@ -0,0 +1,85 @@ +/* GCompris - drawletter-cursive.qml + * + * Copyright (C) 2018 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 . + */ +import QtQuick 2.6 + +import "../../core" +import "drawletter-cursive.js" as Activity + +ActivityBase { + id: activity + + onStart: focus = true + onStop: {} + + pageComponent: Rectangle { + id: background + anchors.fill: parent + color: "#ABCDEF" + 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() } + + GCText { + anchors.centerIn: parent + text: "drawletter-cursive activity" + fontSize: largeSize + } + + DialogHelp { + id: dialogHelp + onClose: home() + } + + 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/drawletter-cursive/drawletter-cursive.js b/src/activities/drawletter-cursive/drawletter-cursive.js new file mode 100644 --- /dev/null +++ b/src/activities/drawletter-cursive/drawletter-cursive.js @@ -0,0 +1,54 @@ +/* GCompris - drawletter-cursive.js + * + * Copyright (C) 2018 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.6 as Quick + +var currentLevel = 0 +var numberOfLevel = 4 +var items + +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/drawletter-cursive/drawletter-cursive.svg b/src/activities/drawletter-cursive/drawletter-cursive.svg new file mode 100644 --- /dev/null +++ b/src/activities/drawletter-cursive/drawletter-cursive.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/activities/drawletters-cursive/ActivityInfo.qml b/src/activities/drawletters-cursive/ActivityInfo.qml new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/ActivityInfo.qml @@ -0,0 +1,40 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2020 Deepak Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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: "drawletters-cursive/DrawlettersCursive.qml" + difficulty: 1 + icon: "drawletters-cursive/drawletters-cursive.svg" + author: "Deepak Kumar <deepakdk2431@gmail.com>" + demo: true + //: Activity title + title: qsTr("Draw letters Cursive") + //: Help title + description: qsTr("Connect the dots to draw cursive letters.") + //intro: "put here in comment the text for the intro voice" + //: Help goal + goal: qsTr("Learning how to draw the letters in a funny way.") + //: Help prerequisite + prerequisite: "" + //: Help manual + manual: qsTr("Draw the letter by connecting the dots in the correct order") + credit: "" + section: "reading letters" + createdInVersion: 7000 +} diff --git a/src/activities/drawletters-cursive/ActivityInfo.qml.autosave b/src/activities/drawletters-cursive/ActivityInfo.qml.autosave new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/ActivityInfo.qml.autosave @@ -0,0 +1,40 @@ +/* GCompris - ActivityInfo.qml + * + * Copyright (C) 2020 Deepak Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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: "drawletters-cursive/DrawlettersCursive.qml" + difficulty: 1 + icon: "drawletters-cursive/drawletters-cursive.svg" + author: "Deepak Kumar <deepakdk2431@gmail.com>" + demo: true + //: Activity title + title: qsTr("Draw letters Cursive") + //: Help title + description: qsTr("Connect the dots to draw cursive letters.") + //intro: "put here in comment the text for the intro voice" + //: Help goal + goal: qsTr("Learning how to draw the letters in a funny way.") + //: Help prerequisite + prerequisite: "" + //: Help manual + manual: qsTr("Draw the letter by connecting the dots in the correct order.") + credit: "" + section: "reading letters" + createdInVersion: 7000 +} diff --git a/src/activities/drawletters-cursive/CMakeLists.txt b/src/activities/drawletters-cursive/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/CMakeLists.txt @@ -0,0 +1 @@ +GCOMPRIS_ADD_RCC(activities/drawletters-cursive *.qml *.svg *.js resource/*) diff --git a/src/activities/drawletters-cursive/DrawlettersCursive.qml b/src/activities/drawletters-cursive/DrawlettersCursive.qml new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/DrawlettersCursive.qml @@ -0,0 +1,85 @@ +/* GCompris - drawletters-cursive.qml + * + * Copyright (C) 2018 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 . + */ +import QtQuick 2.6 + +import "../../core" +import "drawletters-cursive.js" as Activity + +ActivityBase { + id: activity + + onStart: focus = true + onStop: {} + + pageComponent: Rectangle { + id: background + anchors.fill: parent + color: "#ABCDEF" + 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() } + + GCText { + anchors.centerIn: parent + text: "drawletters-cursive activity" + fontSize: largeSize + } + + DialogHelp { + id: dialogHelp + onClose: home() + } + + 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/drawletters-cursive/drawletters-cursive.js b/src/activities/drawletters-cursive/drawletters-cursive.js new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/drawletters-cursive.js @@ -0,0 +1,54 @@ +/* GCompris - drawletters-cursive.js + * + * Copyright (C) 2018 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.6 as Quick + +var currentLevel = 0 +var numberOfLevel = 4 +var items + +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/drawletters-cursive/drawletters-cursive.svg b/src/activities/drawletters-cursive/drawletters-cursive.svg new file mode 100644 --- /dev/null +++ b/src/activities/drawletters-cursive/drawletters-cursive.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + +