Warning, /education/gcompris/src/activities/family/FamilyDataset.qml is written in an unsupported language. File is not indexed.

0001 /* GCompris - FamilyDataset.qml
0002  *
0003  * SPDX-FileCopyrightText: 2017 Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
0004  *
0005  * Authors:
0006  *
0007  *   Rajdeep Kaur <rajdeep.kaur@kde.org>
0008  *   Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>
0009  *
0010  *   SPDX-License-Identifier: GPL-3.0-or-later
0011  */
0012 import QtQuick 2.12
0013 
0014 QtObject {
0015     property real nodeWidth: background.nodeWidthRatio
0016     property real nodeHeight: background.nodeHeightRatio
0017 
0018     property int numberOfGenerations: 3
0019     /*
0020      * Vertically, the screen is divided into three parts:
0021      * gen1: stands for Generation 1
0022      * gen2: stands for Generation 2
0023      * gen3: stands for Generation 3
0024      */
0025     readonly property real gen1: numberOfGenerations == 3 ? 0.10 : 0.20
0026     readonly property real gen2: numberOfGenerations == 3 ? 0.40 : 0.60
0027     readonly property real gen3: 0.70
0028 
0029     /*
0030      * Horizontally, the screen is divided into left, center
0031      * and right
0032      */
0033     readonly property real left: 0.2
0034     readonly property real center: 0.4
0035     readonly property real right: 0.6
0036 
0037     /*
0038      * ext: exterior
0039      * int: interior
0040      */
0041     readonly property real leftExt: 0.1
0042     readonly property real leftInt: 0.3
0043     readonly property real rightInt: 0.5
0044     readonly property real rightExt: 0.7
0045 
0046     /*
0047      * pairs are used to determine the correct
0048      * pair for a given relation in the family_find_relative
0049      * activity
0050      * A correct pair is formed by selecting a node of type
0051      * "pair1" and "pair2" only
0052      */
0053     readonly property int pair1: -1
0054     readonly property int pair2: 1
0055     readonly property int noPair: 0
0056 
0057     /*
0058     * Returns the x coordinate of the
0059     * right edge of a node
0060     */
0061     function rightXEdge(xPosition) {
0062         return xPosition + nodeWidth
0063     }
0064 
0065     /*
0066     * Returns the y coordinate of the
0067     * midpoint of a node
0068     */
0069     function nodeMidPointY(yPosition) {
0070         return yPosition + nodeHeight / 2
0071     }
0072 
0073     /*
0074     * Returns the x coordinate of the
0075     * midpoint of two nodes
0076     */
0077     function nodeMidPointX(xLeftPosition, xRightPosition) {
0078         return ((xLeftPosition + nodeWidth) + xRightPosition) / 2
0079     }
0080 
0081 //     Note:
0082 // To add any new levels in the activities doesn't really require coding skills, it can be done by adding the calculated coordinates
0083 // to the following database (with trial-and-error...)
0084 // {  edgeList: [
0085 //                [],
0086 //                []
0087 //             ],
0088 //    nodePositions: [
0089 //            [],
0090 //            [],
0091 //            []
0092 //    ],
0093 //    captions: [ [],
0094 //               []
0095 //             ],
0096 //    nodeleave: [],
0097 //    currentstate: [],
0098 //    edgeState:[],
0099 //    answer: [],
0100 //    options: []
0101 // 
0102 // },
0103 
0104     property var levelElements: [
0105         // level 1
0106         {
0107             numberOfGenerations: 2,
0108             edgeList: [
0109                 [left + nodeWidth, gen1 + nodeHeight / 2, right, gen1 + nodeHeight / 2],
0110                 [((left + nodeWidth) + right) / 2, gen1 + nodeHeight / 2, ((left + nodeWidth) + right) / 2, gen2]
0111             ],
0112             nodePositions: [
0113                 [left, gen1],
0114                 [right, gen1],
0115                 [center, gen2]
0116             ],
0117             captions: [
0118                 [center - (nodeWidth *  3 / 4), gen2 + nodeHeight / 2],
0119                 [left - nodeWidth / 2, gen1]
0120             ],
0121             nodeValue: ["man1.svg", "woman2.svg", "boy1.svg"],
0122             nodeWeights: [pair1, noPair, pair2],
0123             currentState: ["activeTo", "deactivate", "active"],
0124             edgeState:["married","others"],
0125             answer: [qsTr("Father")],
0126             options: [qsTr("Father"), qsTr("Grandfather"), qsTr("Uncle")]
0127         },
0128         // level 2
0129         {
0130             numberOfGenerations: 2,
0131             edgeList: [
0132                 [left + nodeWidth, gen1 + nodeHeight / 2, right, gen1 + nodeHeight / 2],
0133                 [((left + nodeWidth) + right) / 2, gen1 + nodeHeight / 2, ((left + nodeWidth) + right) / 2, gen2]
0134             ],
0135             nodePositions: [
0136                 [left, gen1],
0137                 [right, gen1],
0138                 [center, gen2]
0139             ],
0140             captions: [
0141                 [center - (nodeWidth *  3 / 4), gen2 + nodeHeight / 2],
0142                 [right + nodeWidth, gen1]
0143             ],
0144             nodeValue: ["man1.svg", "woman2.svg", "boy1.svg"],
0145             nodeWeights: [noPair, pair1, pair2],
0146             currentState: ["deactivate", "activeTo", "active"],
0147             edgeState:["married","others"],
0148             answer: [qsTr("Mother")],
0149             options: [qsTr("Mother"), qsTr("Grandmother"), qsTr("Aunt")]
0150         },
0151         // level 3
0152         {
0153             numberOfGenerations: 2,
0154             edgeList: [
0155                 [rightXEdge(left), nodeMidPointY(gen1), right, nodeMidPointY(gen1)],
0156                 [nodeMidPointX(left, right), nodeMidPointY(gen1), nodeMidPointX(left, right), gen2 - nodeHeight / 4],
0157                 [left + nodeWidth / 2, gen2 - nodeHeight / 4, right + nodeWidth / 2, gen2 - nodeHeight / 4],
0158                 [left + nodeWidth / 2, gen2 - nodeHeight / 4, left + nodeWidth / 2, gen2],
0159                 [right + nodeWidth / 2, gen2 - nodeHeight / 4, right + nodeWidth / 2, gen2]
0160             ],
0161             nodePositions: [
0162                 [left, gen1],
0163                 [right, gen1],
0164                 [left, gen2],
0165                 [right, gen2]
0166             ],
0167             captions:[
0168                 [left - (nodeWidth *  3 / 4), gen2 + nodeHeight / 2],
0169                 [right + nodeWidth, gen2]
0170             ],
0171             nodeValue: ["man1.svg", "woman2.svg", "boy1.svg", "boy2.svg"],
0172             nodeWeights: [noPair, noPair, pair1, pair2],
0173             currentState: ["deactivate", "deactivate", "active", "activeTo"],
0174             edgeState:["married","others","others","others"],
0175             answer: [qsTr("Brother")],
0176             options: [qsTr("Cousin"), qsTr("Brother"), qsTr("Sister")]
0177         },
0178         // level 4
0179         {
0180             numberOfGenerations: 2,
0181             edgeList: [
0182                 [rightXEdge(left), nodeMidPointY(gen1), right, nodeMidPointY(gen1)],
0183                 [nodeMidPointX(left, right), nodeMidPointY(gen1), nodeMidPointX(left, right), gen2 - nodeHeight / 4],
0184                 [left + nodeWidth / 2, gen2 - nodeHeight / 4, right + nodeWidth / 2, gen2 - nodeHeight / 4],
0185                 [left + nodeWidth / 2, gen2 - nodeHeight / 4, left + nodeWidth / 2, gen2],
0186                 [center + nodeWidth / 2, gen2 - nodeHeight / 4, center + nodeWidth / 2, gen2],
0187                 [right + nodeWidth / 2, gen2 - nodeHeight / 4, right + nodeWidth / 2, gen2]
0188             ],
0189             nodePositions: [
0190                 [left, gen1],
0191                 [right, gen1],
0192                 [left, gen2],
0193                 [center, gen2],
0194                 [right, gen2]
0195             ],
0196             captions: [
0197                 [left - (nodeWidth *  3 / 4), gen2 + nodeHeight / 2],
0198                 [center + nodeWidth / 2, (gen2 + nodeHeight)]
0199             ],
0200             nodeValue: ["man1.svg", "woman2.svg", "boy1.svg", "girl1.svg", "boy2.svg"],
0201             nodeWeights: [noPair, noPair, pair1, pair2, pair1],
0202             currentState: ["deactivate", "deactivate", "active", "activeTo", "deactivate"],
0203             edgeState:["married", "others", "others", "others", "others", "others"],
0204             answer: [qsTr("Sister")],
0205             options: [qsTr("Cousin"), qsTr("Brother"), qsTr("Sister")]
0206         },
0207         // level 5
0208         {
0209             numberOfGenerations: 3,
0210             edgeList: [
0211                 [leftExt + nodeWidth, gen1 + nodeHeight / 2, rightInt, gen1 + nodeHeight / 2],
0212                 [((leftExt + nodeWidth) + rightInt) / 2, gen1 + nodeHeight / 2, ((leftExt + nodeWidth) + rightInt) / 2, gen2],
0213                 [leftInt + nodeWidth, gen2 + nodeHeight / 2, right, gen2 + nodeHeight / 2],
0214                 [((leftInt + nodeWidth) + right) / 2, gen2 + nodeHeight / 2, ((leftInt + nodeWidth) + right) / 2, gen3 - nodeWidth / 4],
0215                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3 - nodeWidth / 4],
0216                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, left + nodeWidth / 2, gen3],
0217                 [center + nodeWidth / 2, gen3 - nodeWidth / 4, center + nodeWidth / 2, gen3],
0218                 [right + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3]
0219             ],
0220             nodePositions: [
0221                 [leftExt, gen1],
0222                 [rightInt, gen1],
0223                 [leftInt, gen2],
0224                 [right, gen2],
0225                 [left, gen3],
0226                 [center, gen3],
0227                 [right, gen3]
0228             ],
0229             captions: [
0230                 [leftExt, gen3 + nodeHeight / 4],
0231                 [leftExt, gen1 + nodeHeight]
0232             ],
0233             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man2.svg", "woman1.svg", "girl1.svg", "boy1.svg", "boy2.svg"],
0234             nodeWeights: [pair1, noPair, noPair, noPair, pair2, pair2, pair2],
0235             currentState: ["activeTo", "deactivate", "deactivate", "deactivate", "active", "deactivate", "deactivate"],
0236             edgeState:["married","others","married","others","others","others","others","others" ],
0237             answer: [qsTr("Grandfather")],
0238             options: [qsTr("Granddaughter"), qsTr("Grandson"), qsTr("Grandfather"), qsTr("Grandmother")]
0239         },
0240         // level 6
0241         {
0242             numberOfGenerations: 3,
0243             edgeList: [
0244                 [leftExt + nodeWidth, gen1 + nodeHeight / 2, rightInt, gen1 + nodeHeight / 2],
0245                 [((leftExt + nodeWidth) + rightInt) / 2, gen1 + nodeHeight / 2, ((leftExt + nodeWidth) + rightInt) / 2, gen2],
0246                 [leftInt + nodeWidth, gen2 + nodeHeight / 2, right, gen2 + nodeHeight / 2],
0247                 [((leftInt + nodeWidth) + right) / 2, gen2 + nodeHeight / 2, ((leftInt + nodeWidth) + right) / 2, gen3 - nodeWidth / 4],
0248                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3 - nodeWidth / 4],
0249                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, left + nodeWidth / 2, gen3],
0250                 [center + nodeWidth / 2, gen3 - nodeWidth / 4, center + nodeWidth / 2, gen3],
0251                 [right + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3]
0252             ],
0253             nodePositions: [
0254                 [leftExt, gen1],
0255                 [rightInt, gen1],
0256                 [leftInt, gen2],
0257                 [right, gen2],
0258                 [left, gen3],
0259                 [center, gen3],
0260                 [right, gen3]
0261             ],
0262             captions: [
0263                 [right + nodeWidth, gen3 + (nodeHeight * 3 / 4)],
0264                 [rightInt, gen1 + nodeHeight]
0265             ],
0266             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man2.svg", "woman1.svg", "boy1.svg", "girl1.svg", "boy2.svg"],
0267             nodeWeights: [noPair, pair1, noPair, noPair, pair2, pair2, pair2],
0268             currentState: ["deactivate", "activeTo", "deactivate", "deactivate", "deactivate", "deactivate", "active", "active"],
0269             edgeState:["married","others","married","others","others","others","others","others" ],
0270             answer: [qsTr("Grandmother")],
0271             options: [qsTr("Granddaughter"), qsTr("Grandson"), qsTr("Grandfather"), qsTr("Grandmother")],
0272         },
0273         // level 7
0274         {
0275             numberOfGenerations: 3,
0276             edgeList: [
0277                 [leftExt + nodeWidth, gen1 + nodeHeight / 2, rightInt, gen1 + nodeHeight / 2],
0278                 [((leftExt + nodeWidth) + rightInt) / 2, gen1 + nodeHeight / 2, ((leftExt + nodeWidth) + rightInt) / 2, gen2],
0279                 [leftInt + nodeWidth, gen2 + nodeHeight / 2, right, gen2 + nodeHeight / 2],
0280                 [((leftInt + nodeWidth) + right) / 2, gen2 + nodeHeight / 2, ((leftInt + nodeWidth) + right) / 2, gen3 - nodeWidth / 4],
0281                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3 - nodeWidth / 4],
0282                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, left + nodeWidth / 2, gen3],
0283                 [center + nodeWidth / 2, gen3 - nodeWidth / 4, center + nodeWidth / 2, gen3],
0284                 [right + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3]
0285             ],
0286             nodePositions: [
0287                 [leftExt, gen1],
0288                 [rightInt, gen1],
0289                 [leftInt, gen2],
0290                 [right, gen2],
0291                 [left, gen3],
0292                 [center, gen3],
0293                 [right, gen3]
0294             ],
0295             captions: [
0296                 [leftExt + nodeWidth, gen1],
0297                 [right + nodeWidth, gen3]
0298             ],
0299             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man2.svg", "woman1.svg", "boy1.svg", "boy2.svg","girl1.svg" ],
0300             nodeWeights: [pair1, pair1, noPair, noPair, noPair, noPair, pair2],
0301             currentState: ["active", "deactivate", "deactivate", "deactivate", "deactivate", "deactivate", "activeTo"],
0302             edgeState:["married","others","married","others","others","others","others","others" ],
0303             answer: [qsTr("Granddaughter")],
0304             options: [qsTr("Granddaughter"), qsTr("Grandson"), qsTr("Grandfather"), qsTr("Grandmother")]
0305         },
0306         // level 8
0307         {
0308             numberOfGenerations: 3,
0309             edgeList: [
0310                 [leftExt + nodeWidth, gen1 + nodeHeight / 2, rightInt, gen1 + nodeHeight / 2],
0311                 [((leftExt + nodeWidth) + rightInt) / 2, gen1 + nodeHeight / 2, ((leftExt + nodeWidth) + rightInt) / 2, gen2],
0312                 [leftInt + nodeWidth, gen2 + nodeHeight / 2, right, gen2 + nodeHeight / 2],
0313                 [((leftInt + nodeWidth) + right) / 2, gen2 + nodeHeight / 2, ((leftInt + nodeWidth) + right) / 2, gen3 - nodeWidth / 4],
0314                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3 - nodeWidth / 4],
0315                 [left + nodeWidth / 2, gen3 - nodeWidth / 4, left + nodeWidth / 2, gen3],
0316                 [center + nodeWidth / 2, gen3 - nodeWidth / 4, center + nodeWidth / 2, gen3],
0317                 [right + nodeWidth / 2, gen3 - nodeWidth / 4, right + nodeWidth / 2, gen3]
0318             ],
0319             nodePositions: [
0320                 [leftExt, gen1],
0321                 [rightInt, gen1],
0322                 [leftInt, gen2],
0323                 [right, gen2],
0324                 [left, gen3],
0325                 [center, gen3],
0326                 [right, gen3]
0327             ],
0328             captions: [
0329                 [rightInt + nodeWidth, gen1],
0330                 [right + nodeWidth, gen3]
0331             ],
0332             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man2.svg", "woman1.svg", "boy1.svg", "girl1.svg", "boy2.svg"],
0333             nodeWeights: [pair1, pair1, noPair, noPair, pair2, noPair, pair2],
0334             currentState: ["deactivate", "active", "deactivate", "deactivate", "deactivate", "deactivate", "activeTo", "active"],
0335             edgeState:["married","others","married","others","others","others","others","others" ],
0336             answer: [qsTr("Grandson")],
0337             options: [qsTr("Granddaughter"), qsTr("Grandson"), qsTr("Grandfather"), qsTr("Grandmother")]
0338         },
0339         // level 9
0340         {
0341             numberOfGenerations: 3,
0342             edgeList: [
0343                 [center + nodeWidth / 2, gen1 + nodeHeight, center + nodeWidth / 2, gen2 + nodeHeight / 2],
0344                 [rightXEdge(left), nodeMidPointY(gen2), right, nodeMidPointY(gen2)],
0345                 [left + nodeWidth / 2, gen2 + nodeHeight, left + nodeWidth / 2, gen3],
0346                 [right + nodeWidth / 2, gen2 + nodeHeight, right + nodeWidth / 2, gen3]
0347             ],
0348             nodePositions: [
0349                 [center, gen1],
0350                 [left, gen2],
0351                 [right, gen2],
0352                 [left, gen3],
0353                 [right, gen3]
0354             ],
0355             captions: [
0356                 [(right + nodeWidth * 1.1), gen3 + nodeHeight / 4],
0357                 [left - nodeWidth / 2, gen3 + nodeHeight / 4]
0358             ],
0359             nodeValue: ["oldMan1.svg", "man3.svg", "man2.svg", "boy1.svg","boy2.svg"],
0360             nodeWeights: [noPair, noPair, noPair, pair2, pair1],
0361             currentState: ["deactivate", "deactivate", "deactivate", "activeTo","active"],
0362             edgeState:["others","others","others","others"],
0363             answer: [qsTr("Cousin")],
0364             options: [qsTr("Brother"), qsTr("Sister"), qsTr("Cousin")]
0365         },
0366         // level 10
0367         {
0368             numberOfGenerations: 3,
0369             edgeList: [
0370                 [center + nodeWidth / 2, gen1 + nodeHeight, center + nodeWidth / 2, gen2 + nodeHeight / 2],
0371                 [rightXEdge(left), nodeMidPointY(gen2), right, nodeMidPointY(gen2)],
0372                 [left + nodeWidth / 2, gen2 + nodeHeight, left + nodeWidth / 2, gen3]
0373             ],
0374             nodePositions: [
0375                 [center, gen1],
0376                 [left, gen2],
0377                 [right, gen2],
0378                 [left, gen3]
0379             ],
0380             captions: [
0381                 [left - nodeWidth * 3 / 4, gen3 + nodeHeight / 4],
0382                 [right + nodeWidth * 1.1, gen2 + nodeHeight / 4]
0383             ],
0384             nodeValue: ["oldMan1.svg", "man3.svg", "man2.svg", "boy1.svg"],
0385             nodeWeights: [noPair, noPair, pair1, pair2],
0386             currentState: ["deactivate", "deactivate", "activeTo", "active"],
0387             edgeState:["others","others","others"],
0388             answer: [qsTr("Uncle")],
0389             options: [qsTr("Uncle"), qsTr("Aunt"), qsTr("Nephew"), qsTr("Niece")]
0390         },
0391         // level 11
0392         {
0393             numberOfGenerations: 3,
0394             edgeList: [
0395                 [center + nodeWidth / 2, gen1 + nodeHeight, center + nodeWidth / 2, gen2 + nodeHeight / 2],
0396                 [rightXEdge(left), nodeMidPointY(gen2), right, nodeMidPointY(gen2)],
0397                 [left + nodeWidth / 2, gen2 + nodeHeight, left + nodeWidth / 2, gen3]
0398             ],
0399             nodePositions: [
0400                 [center, gen1],
0401                 [left, gen2],
0402                 [right, gen2],
0403                 [left, gen3]
0404             ],
0405             captions: [
0406                 [right + nodeWidth * 1.1, gen2 + nodeHeight / 4],
0407                 [left - nodeWidth * 3 / 4, gen3 + nodeHeight / 4]
0408             ],
0409             nodeValue: ["oldMan1.svg", "man3.svg", "man2.svg", "boy1.svg"],
0410             nodeWeights: [noPair, noPair, pair2, pair1],
0411             currentState: ["deactivate", "deactivate", "active", "activeTo"],
0412             edgeState:["others","others","others"],
0413             answer: [qsTr("Nephew")],
0414             options: [qsTr("Uncle"), qsTr("Aunt"), qsTr("Nephew"), qsTr("Niece")]
0415         },
0416         // level 12
0417         {
0418             numberOfGenerations: 3,
0419             edgeList: [
0420                 [rightXEdge(left), gen1 + nodeHeight / 2, right, gen1 + nodeHeight / 2],
0421                 [nodeMidPointX(left, right), nodeMidPointY(gen1), nodeMidPointX(left, right), nodeMidPointY(gen2)],
0422                 [rightXEdge(left), nodeMidPointY(gen2), right, nodeMidPointY(gen2)],
0423                 [left + nodeWidth / 2, gen2 + nodeHeight, left + nodeWidth / 2, gen3]
0424             ],
0425             nodePositions: [
0426                 [left, gen1],
0427                 [right, gen1],
0428                 [left, gen2],
0429                 [right, gen2],
0430                 [left, gen3]
0431             ],
0432             captions: [
0433                 [left - nodeWidth * 3 / 4, gen3 + nodeHeight / 4],
0434                 [right + nodeWidth * 1.1, gen2 + nodeHeight / 4]
0435             ],
0436             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "woman1.svg", "babyBoy.svg"],
0437             nodeWeights: [noPair, noPair, noPair, pair1, pair2],
0438             currentState: ["deactivate", "deactivate", "deactivate", "activeTo", "active"],
0439             edgeState:["married","others","siblings","others","others","others"],
0440             answer: [qsTr("Aunt")],
0441             options: [qsTr("Uncle"), qsTr("Aunt"), qsTr("Nephew"), qsTr("Niece")]
0442         },
0443         // level 13
0444         {
0445             numberOfGenerations: 3,
0446             edgeList: [
0447                 [rightXEdge(left), gen1 + nodeHeight / 2, right, gen1 + nodeHeight / 2],
0448                 [nodeMidPointX(left, right), nodeMidPointY(gen1), nodeMidPointX(left, right), nodeMidPointY(gen2)],
0449                 [rightXEdge(left), nodeMidPointY(gen2), right, nodeMidPointY(gen2)],
0450                 [left + nodeWidth / 2, gen2 + nodeHeight, left + nodeWidth / 2, gen3]
0451             ],
0452             nodePositions: [
0453                 [left, gen1],
0454                 [right, gen1],
0455                 [left, gen2],
0456                 [right, gen2],
0457                 [left, gen3]
0458             ],
0459             captions: [
0460                 [right + nodeWidth * 1.1, gen2 + nodeHeight / 4],
0461                 [left - nodeWidth / 2, gen3 + nodeHeight / 4]
0462             ],
0463             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "woman1.svg", "babyGirl.svg"],
0464             nodeWeights: [noPair, noPair, noPair, pair2, pair1],
0465             currentState: ["deactivate", "deactivate", "deactivate", "active", "activeTo"],
0466             edgeState:["married","others","siblings","others","others","others"],
0467             answer: [qsTr("Niece")],
0468             options: [qsTr("Uncle"), qsTr("Aunt"), qsTr("Nephew"), qsTr("Niece")]
0469         },
0470         // level 14
0471         {
0472             numberOfGenerations: 2,
0473             edgeList: [
0474                 [rightXEdge(center), nodeMidPointY(gen1), rightExt, nodeMidPointY(gen1)],
0475                 [nodeMidPointX(center, rightExt), nodeMidPointY(gen1), nodeMidPointX(center, rightExt), nodeMidPointY(gen2)],
0476                 [rightXEdge(center), nodeMidPointY(gen2), rightExt, nodeMidPointY(gen2)],
0477                 [rightXEdge(leftExt), nodeMidPointY(gen2), center, nodeMidPointY(gen2)]
0478             ],
0479             nodePositions: [
0480                 [center, gen1],
0481                 [rightExt, gen1],
0482                 [center, gen2],
0483                 [rightExt, gen2],
0484                 [leftExt, gen2]
0485             ],
0486             captions: [
0487                 [leftExt - nodeWidth / 2, gen2 + nodeHeight * 3 / 4],
0488                 [center - nodeWidth * 3 / 4, gen1 + nodeHeight / 4]
0489             ],
0490             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "man1.svg", "woman2.svg"],
0491             nodeWeights: [pair1, noPair, noPair, noPair, pair2],
0492             currentState: ["activeTo", "deactivate", "deactivate", "deactivate", "active"],
0493             edgeState:["married","others","others","married"],
0494             answer: [qsTr("Father-in-law")],
0495             options: [qsTr("Father-in-law"), qsTr("Mother-in-law"), qsTr("Sister-in-law"), qsTr("Brother-in-law"), qsTr("Daughter-in-law")]
0496         },
0497         // level 15
0498         {
0499             numberOfGenerations: 2,
0500             edgeList: [
0501                 [rightXEdge(center), nodeMidPointY(gen1), rightExt, nodeMidPointY(gen1)],
0502                 [nodeMidPointX(center, rightExt), nodeMidPointY(gen1), nodeMidPointX(center, rightExt), nodeMidPointY(gen2)],
0503                 [rightXEdge(center), nodeMidPointY(gen2), rightExt, nodeMidPointY(gen2)],
0504                 [rightXEdge(leftExt), nodeMidPointY(gen2), center, nodeMidPointY(gen2)]
0505             ],
0506             nodePositions: [
0507                 [center, gen1],
0508                 [rightExt, gen1],
0509                 [center, gen2],
0510                 [rightExt, gen2],
0511                 [leftExt, gen2]
0512             ],
0513             captions: [
0514                 [leftExt - nodeWidth / 2, gen2 + nodeHeight * 3 / 4],
0515                 [rightExt + nodeWidth * 1.1, gen1 + nodeHeight / 4]
0516             ],
0517             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "man1.svg", "woman2.svg"],
0518             nodeWeights: [noPair, pair1, noPair, noPair, pair2],
0519             currentState: ["deactivate", "activeTo", "deactivate", "deactivate", "active"],
0520             edgeState:["married","others","others","married","others"],
0521             answer: [qsTr("Mother-in-law")],
0522             options: [qsTr("Father-in-law"), qsTr("Mother-in-law"), qsTr("Sister-in-law"), qsTr("Brother-in-law"), qsTr("Daughter-in-law")]
0523         },
0524         // level 16
0525         {
0526             numberOfGenerations: 2,
0527             edgeList: [
0528                 [rightXEdge(center), nodeMidPointY(gen1), rightExt, nodeMidPointY(gen1)],
0529                 [nodeMidPointX(center, rightExt), nodeMidPointY(gen1), nodeMidPointX(center, rightExt), nodeMidPointY(gen2)],
0530                 [rightXEdge(center), nodeMidPointY(gen2), rightExt, nodeMidPointY(gen2)],
0531                 [rightXEdge(leftExt), nodeMidPointY(gen2), center, nodeMidPointY(gen2)]
0532             ],
0533             nodePositions: [
0534                 [center, gen1],
0535                 [rightExt, gen1],
0536                 [center, gen2],
0537                 [rightExt, gen2],
0538                 [leftExt, gen2]
0539             ],
0540             captions: [
0541                 [leftExt - nodeWidth / 2, gen2 + nodeHeight * 3 / 4],
0542                 [rightExt + nodeWidth * 1.1, gen2 + nodeHeight / 4]
0543             ],
0544             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "man1.svg", "woman2.svg"],
0545             nodeWeights: [noPair, noPair, noPair, pair1, pair2],
0546             currentState: ["deactivate", "deactivate", "deactivate", "activeTo", "active"],
0547             edgeState:["married","others","others","married","others"],
0548             answer: [qsTr("Brother-in-law")],
0549             options: [qsTr("Father-in-law"), qsTr("Mother-in-law"), qsTr("Sister-in-law"), qsTr("Brother-in-law"), qsTr("Daughter-in-law")]
0550         },
0551         // level 17
0552         {
0553             numberOfGenerations: 2,
0554             edgeList: [
0555                 [rightXEdge(leftInt), nodeMidPointY(gen1), rightInt, nodeMidPointY(gen1)],
0556                 [nodeMidPointX(leftInt, rightInt), nodeMidPointY(gen1), nodeMidPointX(leftInt, rightInt), nodeMidPointY(gen2)],
0557                 [rightXEdge(leftInt), nodeMidPointY(gen2), rightInt, nodeMidPointY(gen2)],
0558                 [rightXEdge(leftExt), nodeMidPointY(gen2), leftInt, nodeMidPointY(gen2)],
0559                 [rightXEdge(rightInt), nodeMidPointY(gen2), rightExt, nodeMidPointY(gen2)]
0560             ],
0561             nodePositions: [
0562                 [leftInt, gen1],
0563                 [rightInt, gen1],
0564                 [leftInt, gen2],
0565                 [leftExt, gen2],
0566                 [rightInt, gen2],
0567                 [rightExt, gen2]
0568             ],
0569             captions: [
0570                 [leftExt - nodeWidth / 2, gen2],
0571                 [rightInt + nodeWidth * 0.8, gen2 - nodeHeight / 4]
0572             ],
0573             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "man3.svg", "woman2.svg", "woman1.svg", "man1.svg"],
0574             nodeWeights: [noPair, noPair, noPair, pair1, pair2, noPair],
0575             currentState: ["dective", "deactivate", "deactivate", "active", "activeTo", "deactivate"],
0576             edgeState:["married","others","others","married","married"],
0577             answer: [qsTr("Sister-in-law")],
0578             options: [qsTr("Father-in-law"), qsTr("Mother-in-law"), qsTr("Sister-in-law"), qsTr("Brother-in-law"), qsTr("Daughter-in-law")]
0579         },
0580         // level 18
0581         {
0582             numberOfGenerations: 2,
0583             edgeList: [
0584                 [rightXEdge(center), nodeMidPointY(gen1), rightExt, nodeMidPointY(gen1)],
0585                 [nodeMidPointX(center, rightExt), nodeMidPointY(gen1), nodeMidPointX(center, rightExt), nodeMidPointY(gen2)],
0586                 [rightXEdge(center), nodeMidPointY(gen2), rightExt, nodeMidPointY(gen2)],
0587                 [rightXEdge(leftExt), nodeMidPointY(gen2), center, nodeMidPointY(gen2)]
0588             ],
0589             nodePositions: [
0590                 [center, gen1],
0591                 [rightExt, gen1],
0592                 [center, gen2],
0593                 [leftExt, gen2],
0594                 [rightExt, gen2]
0595             ],
0596             captions: [
0597                 [center - (nodeWidth * 3/ 4), gen1 + nodeHeight / 4],
0598                 [leftExt - nodeWidth / 2, gen2 + nodeHeight / 2]
0599             ],
0600             nodeValue: ["oldMan1.svg", "oldWoman1.svg", "woman2.svg", "man3.svg", "man1.svg"],
0601             nodeWeights: [pair1, pair1, noPair, pair2, noPair],
0602             currentState: ["active", "deactivate", "deactivate", "activeTo", "deactivate", "deactivate"],
0603             edgeState:["married","others","others","married","others"],
0604             answer: [qsTr("Son-in-law")],
0605             options: [qsTr("Son-in-law"), qsTr("Mother-in-law"), qsTr("Sister-in-law"), qsTr("Brother-in-law"), qsTr("Daughter-in-law")]
0606         }
0607     ]
0608 }