diff --git a/src/activities/graph-coloring/CMakeLists.txt b/src/activities/graph-coloring/CMakeLists.txt index 677c9b056..e8be8e95d 100644 --- a/src/activities/graph-coloring/CMakeLists.txt +++ b/src/activities/graph-coloring/CMakeLists.txt @@ -1 +1 @@ -GCOMPRIS_ADD_RCC(activities/graph-coloring *.qml *.svg *.js resource/graphs/* resource/shapes/*) +GCOMPRIS_ADD_RCC(activities/graph-coloring *.qml *.svg *.js resource/shapes/*) diff --git a/src/activities/graph-coloring/GraphColoring.qml b/src/activities/graph-coloring/GraphColoring.qml index f899ea7b4..50487347e 100644 --- a/src/activities/graph-coloring/GraphColoring.qml +++ b/src/activities/graph-coloring/GraphColoring.qml @@ -1,401 +1,395 @@ /* GCompris - graph-coloring.qml * * Copyright (C) 2015 Akshat Tandon * * Authors: * * Akshat Tandon (Qt Quick version) * * 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 "graph-coloring.js" as Activity import GCompris 1.0 ActivityBase { id: activity onStart: focus = true onStop: {} pageComponent: Image { id: background anchors.fill: parent source: "qrc:/gcompris/src/activities/tic_tac_toe/resource/background.svg" sourceSize.width: parent.width fillMode: Image.PreserveAspectCrop focus: true signal start signal stop Component.onCompleted: { dialogActivityConfig.getInitialConfiguration() activity.start.connect(start) activity.stop.connect(stop) } MouseArea { anchors.fill: parent onClicked: showChooser(false); } // 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 colorsRepeater: colorsRepeater property alias nodesRepeater: nodesRepeater property alias edgesRepeater: edgesRepeater property alias chooserGrid: chooserGrid - property alias dataset: dataset } onStart: { Activity.start(items) } onStop: { Activity.stop() } - Loader { - id: dataset - asynchronous: false - } - Column { id: colorsColumn anchors.left: parent.left anchors.leftMargin: 5 * ApplicationInfo.ratio anchors.top: parent.top anchors.topMargin: 5 * ApplicationInfo.ratio spacing: 3 * ApplicationInfo.ratio add: Transition { NumberAnimation { properties: "y"; duration: 1000; easing.type: Easing.OutBounce } } Repeater { id: colorsRepeater model: ListModel {} delegate: Node { width: 40 * ApplicationInfo.ratio height: 40 * ApplicationInfo.ratio border.width: 2 border.color: "white" searchItemIndex: itemIndex } } } Item { id: graphRect anchors.left: parent.left anchors.leftMargin: 100 * ApplicationInfo.ratio anchors.bottom: parent.bottom anchors.bottomMargin: 50 * ApplicationInfo.ratio anchors.top: parent.top anchors.topMargin: 50 * ApplicationInfo.ratio height: background.height - 100 * ApplicationInfo.ratio width: background.width - 150 * ApplicationInfo.ratio property int diameter: graphRect.width/11 property int minDiameter: 40 * ApplicationInfo.ratio property int maxDiameter: 80 * ApplicationInfo.ratio property int optDiameter: diameter < minDiameter ? minDiameter : ( diameter > maxDiameter ? maxDiameter : diameter) Repeater { id: edgesRepeater model: ListModel {} delegate: Rectangle { id: line opacity: 1 antialiasing: true color: highlight == true ? "red" : "black" transformOrigin: Item.TopLeft x: xp * graphRect.width y: yp * graphRect.height property var x2: xpp * graphRect.width property var y2: ypp * graphRect.height width: Math.sqrt(Math.pow(x - x2, 2) + Math.pow(y- y2, 2)) height: highlight == true ? 7 * ApplicationInfo.ratio : 3 * ApplicationInfo.ratio rotation: (Math.atan((y2 - y)/(x2-x)) * 180 / Math.PI) + (((y2-y) < 0 && (x2-x) < 0) * 180) + (((y2-y) >= 0 && (x2-x) < 0) * 180) Behavior on color { ColorAnimation { duration: 2000 easing.type: Easing.OutExpo } } Behavior on height { NumberAnimation { duration: 2000 easing.type: Easing.OutExpo } } } } Repeater{ id: nodesRepeater model: ListModel {} delegate: Node{ id: currentNode x: posX * graphRect.width - width/2 y: posY * graphRect.height - height/2 width: graphRect.optDiameter height: width radius: width/2 border.color: highlight == true ? "red" : "black" border.width: highlight == true ? 7 : 4 symbolRotation: highlight searchItemIndex: colIndex Behavior on border.color { ColorAnimation { duration: 2000 easing.type: Easing.OutExpo } } Behavior on border.width { NumberAnimation { duration: 2000 easing.type: Easing.OutExpo } } MouseArea { id: mouseArea anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton enabled: true z: 3 hoverEnabled: ApplicationInfo.isMobile ? false : true onClicked:{ var obj = items.nodesRepeater.model.get(index); showChooser(true, index, parent); } } states: State { name: "scaled"; when: mouseArea.containsMouse PropertyChanges { target: currentNode scale: 1.1 } } transitions: Transition { NumberAnimation { properties: "scale"; easing.type: Easing.OutCubic } } } } } function showChooser(visible, guessIndex, item) { if (!visible) { chooserTimer.stop(); chooser.scale = 0; return; } var modelObj = items.nodesRepeater.model.get(guessIndex); var absolute = graphRect.mapToItem(background, item.x, item.y); chooserGrid.colIndex = modelObj.colIndex; chooserGrid.guessIndex = guessIndex; var targetX = absolute.x + item.width; var targetY = absolute.y - item.height/2; if (targetX < 0) { targetX = 0; } if (targetX + chooser.width > background.width) { targetX = background.width - chooser.width - 10; } if (targetY < 0) { targetY = 0; } if (targetY + chooser.height > background.height) { targetY = background.height - chooser.height - 10; } chooser.x = targetX; chooser.y = targetY; chooser.scale = 1; chooser.visible = true; chooserTimer.restart(); //console.log(" item.x = " + item.x + " item.y" + item.y+" absolute.x" + absolute.x +" absolute.y" + absolute.y) } Rectangle { id: chooser width: chooserGrid.width + 5 height: chooserGrid.height + 5 color: "darkgray" border.width: 0 border.color: "white" opacity: 1 scale: 0 visible: false z: 10 GridView { id: chooserGrid cellWidth: graphRect.optDiameter - 2 cellHeight: cellWidth width: Math.ceil(count / 2) * cellWidth height: 2 * cellHeight anchors.centerIn: parent z: 11 clip: false interactive: false verticalLayoutDirection: GridView.TopToBottom layoutDirection: Qt.LeftToRight flow: GridView.FlowLeftToRight property int gridCount : count property int colIndex: 0 property int guessIndex: 0 Timer { id: chooserTimer interval: 5000 onTriggered: showChooser(false); } model: new Array() delegate: Node { id: chooserItem width: graphRect.optDiameter - 5 height: width border.width: index == chooserGrid.colIndex ? 3 : 1 border.color: index == chooserGrid.colIndex ? "white" : "darkgray" searchItemIndex: modelData highlightSymbol: index == chooserGrid.colIndex radius: 5 MouseArea { id: chooserMouseArea anchors.fill: parent acceptedButtons: Qt.LeftButton z: 11 hoverEnabled: ApplicationInfo.isMobile ? false : true onClicked: { chooserGrid.colIndex = chooserItem.searchItemIndex; var obj = items.nodesRepeater.model; obj.setProperty(chooserGrid.guessIndex, "colIndex", chooserGrid.colIndex); showChooser(false); Activity.checkAdjacent() Activity.checkGuess() } } } } } DialogHelp { id: dialogHelp onClose: home() } DialogActivityConfig { id: dialogActivityConfig currentActivity: activity content: Component { Item { property alias modeBox: modeBox property var availableModes: [ { "text": qsTr("Colors"), "value": "color" }, { "text": qsTr("Shapes"), "value": "symbol" } ] Flow { id: flow spacing: 5 width: dialogActivityConfig.width GCComboBox { id: modeBox model: availableModes background: dialogActivityConfig label: qsTr("Select your mode") } } } } onClose: home() onLoadData: { if(dataToSave && dataToSave["mode"]) { Activity.mode = dataToSave["mode"]; } } onSaveData: { var newMode = dialogActivityConfig.configItem.availableModes[dialogActivityConfig.configItem.modeBox.currentIndex].value; if (newMode !== Activity.mode) { chooserGrid.model = new Array(); Activity.mode = newMode; dataToSave = {"mode": Activity.mode}; Activity.initLevel(); } } function setDefaultValues() { for(var i = 0 ; i < dialogActivityConfig.configItem.availableModes.length ; i ++) { if(dialogActivityConfig.configItem.availableModes[i].value === Activity.mode) { dialogActivityConfig.configItem.modeBox.currentIndex = i; break; } } } } Bar { id: bar content: BarEnumContent { value: config | help | home | level } onHelpClicked: { displayDialog(dialogHelp) } onPreviousLevelClicked: Activity.previousLevel() onNextLevelClicked: Activity.nextLevel() onHomeClicked: activity.home() onConfigClicked: { dialogActivityConfig.active = true // Set default values dialogActivityConfig.setDefaultValues(); displayDialog(dialogActivityConfig) } } Bonus { id: bonus Component.onCompleted: win.connect(Activity.nextLevel) } } } diff --git a/src/activities/graph-coloring/graph-coloring.js b/src/activities/graph-coloring/graph-coloring.js index a375fce24..295a116f1 100644 --- a/src/activities/graph-coloring/graph-coloring.js +++ b/src/activities/graph-coloring/graph-coloring.js @@ -1,196 +1,355 @@ /* GCompris - graph-coloring.js * * Copyright (C) Akshat Tandon * * Authors: * * Akshat Tandon (Qt Quick version) * * 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 = 14 var items var url = "qrc:/gcompris/src/activities/graph-coloring/resource/" var coloringLeft var colors = [ "#FF0000FF", // dark blue "#FF00FF00", // light green "#FFFF0000", // red "#FF00FFFF", // light blue "#FFFF00FF", // magenta "#FFFFFF00", // yellow "#FF8e7016", // brown "#FF04611a", // dark green "#FFa0174b" // dark magenta ]; var symbols = [ url + "shapes/" + "star.svg", url + "shapes/" + "triangle.svg", url + "shapes/" + "heart.svg", url + "shapes/" + "cloud.svg", url + "shapes/" + "diamond.svg", url + "shapes/" + "star_simple.svg", url + "shapes/" + "cross.svg", url + "shapes/" + "ring.svg", url + "shapes/" + "circle.svg", ]; +var graphs = [ + { + minColor:3, + edgeList:[ + [0, 1], [0, 4], [1, 4], [1, 2], [1, 3], [2, 3] + ], + nodePositions : [ + [0, 0], [0.5, 0.4], [1, 0], [1, 0.7], [0, 0.7] + ] + }, + { + + minColor: 3, + edgeList:[ + [0, 1], [0, 3], [1, 2], [1, 3], [2, 3] + ], + nodePositions : [ + [0, 0.4], [0.5, 0], [1, 0.4], [0.5, 0.8] + ] + }, + { + + minColor: 4, + edgeList:[ + [0, 1], [0, 2], [0, 3], + [1, 2], [1, 3], + [2, 3] + ], + nodePositions : [ + [0.628, 0.501], + [0.083, 0.501], + [0.900, 0.030], + [0.900, 0.973] + ] + + }, + { + + minColor: 3, + edgeList:[ + [0,1], [1,2], [2,3], [3,4], [4,0], [5,7], + [7,9], [9,6], [6,8], [8,5], [0,5], [1,6], + [2,7], [3,8], [4,9] + ], + nodePositions : [ + [0.5,0], [0.90,0.35], [0.80,0.80], + [0.20, 0.80], [0.10, 0.35], [0.5,0.20], + [0.75,0.45], [0.65, 0.65], [0.35, 0.65], [0.25, 0.45] + ] + + }, + { + + minColor: 5, + edgeList: [ + [5, 1], + [5, 0], + [0, 3], + [0, 1], + [0, 2], + [2, 4], + [2, 1], + [3, 4], + [3, 2], + [4, 1], + [5, 4], + [5, 3] + ], + nodePositions : [ + [0.75, 0.00], + [0.75, 1.00], + [1.00, 0.50], + [0.25, 0.00], + [0.25, 1.00], + [0.00, 0.50] + ] + + }, + { + + minColor: 3, + edgeList: [ + [5, 4], + [2, 0], + [0, 1], + [1, 5], + [4, 3], + [3, 2], + [0, 11], + [1, 6], + [7, 5], + [3, 9], + [8, 4], + [2, 10], + [11, 9], + [7, 9], + [11, 7], + [6, 8], + [10, 8], + [6, 10] + ], + nodePositions : [ + [0.26, 0.00], + [0.74, 0.00], + [0.00, 0.50], + [0.26, 1.00], + [0.74, 1.00], + [1.00, 0.50], + [0.62, 0.26], + [0.74, 0.50], + [0.62, 0.74], + [0.38, 0.74], + [0.26, 0.50], + [0.38, 0.26] + ] + }, + { + + minColor: 4, + edgeList: [ + [0, 8], + [0, 4], + [3, 6], + [10, 3], + [2, 11], + [7, 2], + [9, 1], + [5, 1], + [0, 1], + [1, 2], + [4, 6], + [8, 9], + [10, 11], + [0, 3], + [3, 2], + [8, 11], + [10, 9], + [4, 7], + [5, 7], + [6, 5], + [6, 9], + [10, 5], + [4, 11], + [8, 7] + ], + nodePositions : [ + [0.00, 0.00], + [1.00, 0.00], + [1.00, 1.00], + [0.00, 1.00], + [0.32, 0.42], + [0.74, 0.42], + [0.32, 0.63], + [0.74, 0.63], + [0.42, 0.32], + [0.63, 0.32], + [0.42, 0.74], + [0.63, 0.74] + ] + } + ] + var levels = [ - {extraColor:2, graph:"graph_1.qml"}, - {extraColor:0, graph:"graph_1.qml"}, - {extraColor:1, graph:"graph_2.qml"}, - {extraColor:0, graph:"graph_2.qml"}, - {extraColor:2, graph:"graph_3.qml"}, - {extraColor:0, graph:"graph_3.qml"}, - {extraColor:2, graph:"graph_4.qml"}, - {extraColor:0, graph:"graph_4.qml"}, - {extraColor:2, graph:"graph_5.qml"}, - {extraColor:0, graph:"graph_5.qml"}, - {extraColor:2, graph:"graph_6.qml"}, - {extraColor:0, graph:"graph_6.qml"}, - {extraColor:3, graph:"graph_7.qml"}, - {extraColor:0, graph:"graph_7.qml"} + {extraColor:1, graph:graphs[0]}, + {extraColor:0, graph:graphs[0]}, + {extraColor:1, graph:graphs[1]}, + {extraColor:0, graph:graphs[1]}, + {extraColor:1, graph:graphs[2]}, + {extraColor:0, graph:graphs[2]}, + {extraColor:1, graph:graphs[3]}, + {extraColor:0, graph:graphs[3]}, + {extraColor:1, graph:graphs[4]}, + {extraColor:0, graph:graphs[4]}, + {extraColor:1, graph:graphs[5]}, + {extraColor:0, graph:graphs[5]}, + {extraColor:1, graph:graphs[6]}, + {extraColor:0, graph:graphs[6]} ]; var mode = "symbol"; function start(items_) { items = items_ currentLevel = 0 initLevel() } function stop() { } function initLevel() { coloringLeft = true items.bar.level = currentLevel + 1 - var filename = url + "graphs/" + levels[currentLevel].graph - items.dataset.source = filename var currentIndeces = new Array(); - var levelData = items.dataset.item + var levelData = levels[currentLevel].graph items.colorsRepeater.model.clear(); items.nodesRepeater.model.clear(); items.edgesRepeater.model.clear(); var numColors = levelData.minColor + levels[currentLevel].extraColor; for (var i = 0; i < numColors; ++i) { currentIndeces[i] = i; items.colorsRepeater.model.append({"itemIndex": i}); } items.chooserGrid.model = currentIndeces for (var i = 0; i < levelData.nodePositions.length; ++i){ items.nodesRepeater.model.append({ "posX":levelData.nodePositions[i][0], "posY":levelData.nodePositions[i][1], "colIndex": -1, "highlight": false }); } for (var i = 0; i < levelData.edgeList.length; ++i){ var node1 = levelData.edgeList[i][0] var node2 = levelData.edgeList[i][1] items.edgesRepeater.model.append({ "xp": levelData.nodePositions[node1][0], "yp": levelData.nodePositions[node1][1], "xpp": levelData.nodePositions[node2][0], "ypp": levelData.nodePositions[node2][1], "highlight": false }); } } function checkGuess() { var flag = false; - var levelData = items.dataset.item - + var levelData = levels[currentLevel].graph //Check wether all the nodes have been colored or not for (var i = 0; i < levelData.nodePositions.length; i++){ var node1 = items.nodesRepeater.model.get(i) if (node1.colIndex == -1){ flag = true; break; } } //Check wether the adjacent nodes do not have the same color for (var i = 0; i < levelData.edgeList.length; i++){ var node1 = items.nodesRepeater.model.get(levelData.edgeList[i][0]) var node2 = items.nodesRepeater.model.get(levelData.edgeList[i][1]) //console.log("node1 " + levelData.edgeList[i][0] + " node2 "+ levelData.edgeList[i][1]+" node1 color "+ node1.colIndex+ " node2 color " + node2.colIndex); if (node1.colIndex == node2.colIndex) { //console.log("node1 " + levelData.edgeList[i][0] + " node2 "+ levelData.edgeList[i][1]+" node1 color "+ node1.colIndex+ " node2 color " + node2.colIndex); flag = true; break; } } //console.log("flag is " + flag); if (flag == false) { items.bonus.good("lion"); } } function checkAdjacent() { - var levelData = items.dataset.item + var levelData = levels[currentLevel].graph var flagNodes = new Array(levelData.nodePositions.length) for (var i = 0; i < levelData.nodePositions.length; i++){ flagNodes[i] = false } for (var i = 0; i < levelData.edgeList.length; i++){ var node1 = items.nodesRepeater.model.get(levelData.edgeList[i][0]) var node1Num = levelData.edgeList[i][0] var node2 = items.nodesRepeater.model.get(levelData.edgeList[i][1]) var node2Num = levelData.edgeList[i][1] if (node1.colIndex == node2.colIndex && node2.colIndex != -1) { items.nodesRepeater.model.setProperty(node1Num, "highlight", true) items.nodesRepeater.model.setProperty(node2Num, "highlight", true) items.edgesRepeater.model.setProperty(i, "highlight", true) flagNodes[node1Num] = true flagNodes[node2Num] = true } else { if(!flagNodes[node1Num]) { items.nodesRepeater.model.setProperty(node1Num, "highlight", false) } if(!flagNodes[node2Num]) { items.nodesRepeater.model.setProperty(node2Num, "highlight", false) } items.edgesRepeater.model.setProperty(i, "highlight", false) } } } function nextLevel() { if(numberOfLevel <= ++currentLevel ) { currentLevel = 0 } initLevel(); } function previousLevel() { if(--currentLevel < 0) { currentLevel = numberOfLevel - 1 } initLevel(); } diff --git a/src/activities/graph-coloring/resource/graphs/graph_1.qml b/src/activities/graph-coloring/resource/graphs/graph_1.qml deleted file mode 100644 index b71b5fa2f..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_1.qml +++ /dev/null @@ -1,32 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 3 - property variant edgeList:[ - [0, 1], [0, 4], [1, 4], [1, 2], [1, 3], [2, 3] - ] - property variant nodePositions : [ - [0, 0], [0.5, 0.4], [1, 0], [1, 0.7], [0, 0.7] - ] - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_2.qml b/src/activities/graph-coloring/resource/graphs/graph_2.qml deleted file mode 100644 index 432e73379..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_2.qml +++ /dev/null @@ -1,32 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 3 - property variant edgeList:[ - [0, 1], [0, 3], [1, 2], [1, 3], [2, 3] - ] - property variant nodePositions : [ - [0, 0.4], [0.5, 0], [1, 0.4], [0.5, 0.8] - ] - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_3.qml b/src/activities/graph-coloring/resource/graphs/graph_3.qml deleted file mode 100644 index 7760e1a81..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_3.qml +++ /dev/null @@ -1,36 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 3 - property variant edgeList:[ - [0,1], [1,2], [2,3], [3,4], [4,0], [5,7], - [7,9], [9,6], [6,8], [8,5], [0,5], [1,6], - [2,7], [3,8], [4,9] - ] - property variant nodePositions : [ - [0.5,0], [0.90,0.35], [0.80,0.80], - [0.20, 0.80], [0.10, 0.35], [0.5,0.20], - [0.75,0.45], [0.65, 0.65], [0.35, 0.65], [0.25, 0.45] - ] - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_4.qml b/src/activities/graph-coloring/resource/graphs/graph_4.qml deleted file mode 100644 index bf6c6bb4b..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_4.qml +++ /dev/null @@ -1,37 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 4 - property variant edgeList:[ - [0, 1], [0, 2], [0, 3], - [1, 2], [1, 3], - [2, 3] - ] - property variant nodePositions : [ - [0.628, 0.501], - [0.083, 0.501], - [0.900, 0.030], - [0.900, 0.973] - ] - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_5.qml b/src/activities/graph-coloring/resource/graphs/graph_5.qml deleted file mode 100644 index efa7f101e..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_5.qml +++ /dev/null @@ -1,61 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 3 - property variant edgeList: [ - [5, 4], - [2, 0], - [0, 1], - [1, 5], - [4, 3], - [3, 2], - [0, 11], - [1, 6], - [7, 5], - [3, 9], - [8, 4], - [2, 10], - [11, 9], - [7, 9], - [11, 7], - [6, 8], - [10, 8], - [6, 10] - ] - property variant nodePositions : [ - [0.26, 0.00], - [0.74, 0.00], - [0.00, 0.50], - [0.26, 1.00], - [0.74, 1.00], - [1.00, 0.50], - [0.62, 0.26], - [0.74, 0.50], - [0.62, 0.74], - [0.38, 0.74], - [0.26, 0.50], - [0.38, 0.26] - ] - - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_6.qml b/src/activities/graph-coloring/resource/graphs/graph_6.qml deleted file mode 100644 index b1f734b07..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_6.qml +++ /dev/null @@ -1,67 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 4 - property variant edgeList: [ - [0, 8], - [0, 4], - [3, 6], - [10, 3], - [2, 11], - [7, 2], - [9, 1], - [5, 1], - [0, 1], - [1, 2], - [4, 6], - [8, 9], - [10, 11], - [0, 3], - [3, 2], - [8, 11], - [10, 9], - [4, 7], - [5, 7], - [6, 5], - [6, 9], - [10, 5], - [4, 11], - [8, 7] - ] - property variant nodePositions : [ - [0.00, 0.00], - [1.00, 0.00], - [1.00, 1.00], - [0.00, 1.00], - [0.32, 0.42], - [0.74, 0.42], - [0.32, 0.63], - [0.74, 0.63], - [0.42, 0.32], - [0.63, 0.32], - [0.42, 0.74], - [0.63, 0.74] - ] - - -} diff --git a/src/activities/graph-coloring/resource/graphs/graph_7.qml b/src/activities/graph-coloring/resource/graphs/graph_7.qml deleted file mode 100644 index b4b81ca9d..000000000 --- a/src/activities/graph-coloring/resource/graphs/graph_7.qml +++ /dev/null @@ -1,49 +0,0 @@ -/* GCompris - * - * Copyright (C) 2015 Akshat Tandon - * Authors: - * Akshat Tandon (Qt Quick version) - * - * 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 int minColor: 3 - property variant edgeList: [ - [5, 1], - [5, 0], - [0, 3], - [0, 1], - [0, 2], - [2, 4], - [2, 1], - [3, 4], - [3, 2], - [4, 1], - [5, 4], - [5, 3] - ] - property variant nodePositions : [ - [0.75, 0.00], - [0.75, 1.00], - [1.00, 0.50], - [0.25, 0.00], - [0.25, 1.00], - [0.00, 0.50] - ] - - -}