File indexing completed on 2024-04-28 15:07:56

0001 /* GCompris - dataset.js
0002  *
0003  * SPDX-FileCopyrightText: 2017 Aman Kumar Gupta <gupta2140@gmail.com>
0004  *
0005  *   SPDX-License-Identifier: GPL-3.0-or-later
0006  */
0007 
0008 .import GCompris 1.0 as GCompris //for ApplicationInfo
0009 .import "qrc:/gcompris/src/core/core.js" as Core
0010 
0011 
0012 var url = "qrc:/gcompris/src/activities/categorization/resource/images/alphabets/"
0013 
0014 var images = [
0015                 [url + 'lowerA.svg', url + 'upperA.svg'],
0016                 [url + 'lowerB.svg', url + 'upperB.svg'],
0017                 [url + 'lowerC.svg', url + 'upperC.svg'],
0018                 [url + 'lowerD.svg', url + 'upperD.svg'],
0019                 [url + 'lowerE.svg', url + 'upperE.svg'],
0020                 [url + 'lowerF.svg', url + 'upperF.svg'],
0021                 [url + 'lowerG.svg', url + 'upperG.svg'],
0022                 [url + 'lowerH.svg', url + 'upperH.svg'],
0023                 [url + 'lowerI.svg', url + 'upperI.svg'],
0024                 [url + 'lowerJ.svg', url + 'upperJ.svg'],
0025                 [url + 'lowerK.svg', url + 'upperK.svg'],
0026                 [url + 'lowerL.svg', url + 'upperL.svg'],
0027                 [url + 'lowerM.svg', url + 'upperM.svg'],
0028                 [url + 'lowerN.svg', url + 'upperN.svg'],
0029                 [url + 'lowerO.svg', url + 'upperO.svg'],
0030                 [url + 'lowerP.svg', url + 'upperP.svg'],
0031                 [url + 'lowerQ.svg', url + 'upperQ.svg'],
0032                 [url + 'lowerR.svg', url + 'upperR.svg'],
0033                 [url + 'lowerS.svg', url + 'upperS.svg'],
0034                 [url + 'lowerT.svg', url + 'upperT.svg'],
0035                 [url + 'lowerU.svg', url + 'upperU.svg'],
0036                 [url + 'lowerV.svg', url + 'upperV.svg'],
0037                 [url + 'lowerW.svg', url + 'upperW.svg'],
0038                 [url + 'lowerX.svg', url + 'upperX.svg'],
0039                 [url + 'lowerY.svg', url + 'upperY.svg'],
0040                 [url + 'lowerZ.svg', url + 'upperZ.svg']
0041             ]
0042 
0043 var sounds = [
0044             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('A')),
0045              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('A'))],
0046 
0047             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('B')),
0048              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('B'))],
0049 
0050             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('C')),
0051              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('C'))],
0052 
0053             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('D')),
0054              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('D'))],
0055 
0056             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('E')),
0057              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('E'))],
0058 
0059             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('F')),
0060              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('F'))],
0061 
0062             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('G')),
0063              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('G'))],
0064 
0065             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('H')),
0066              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('H'))],
0067 
0068             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('I')),
0069              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('I'))],
0070 
0071             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('J')),
0072              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('J'))],
0073 
0074             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('K')),
0075              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('K'))],
0076 
0077             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('L')),
0078              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('L'))],
0079 
0080             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('M')),
0081              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('M'))],
0082 
0083             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('N')),
0084              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('N'))],
0085 
0086             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('O')),
0087              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('O'))],
0088 
0089             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('P')),
0090              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('P'))],
0091 
0092             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Q')),
0093              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Q'))],
0094 
0095             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('R')),
0096              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('R'))],
0097 
0098             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('S')),
0099              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('S'))],
0100 
0101             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('T')),
0102              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('T'))],
0103 
0104             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('U')),
0105              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('U'))],
0106 
0107             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('V')),
0108              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('V'))],
0109 
0110             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('W')),
0111              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('W'))],
0112 
0113             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('X')),
0114              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('X'))],
0115 
0116             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Y')),
0117              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Y'))],
0118 
0119             [GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Z')),
0120              GCompris.ApplicationInfo.getAudioFilePath("voices-$CA/$LOCALE/alphabet/" + Core.getSoundFilenamForChar('Z'))]
0121         ]
0122 
0123 var memory_cards = [
0124             { // Level 1
0125                 columns: 3,
0126                 rows: 2,
0127                 images: images.slice(0, 6),
0128                 sounds: sounds.slice(0, 6)
0129             },
0130             { // Level 2
0131                 columns: 4,
0132                 rows: 2,
0133                 images: images.slice(6, 14),
0134                 sounds: sounds.slice(6, 14)
0135             },
0136             { // Level 3
0137                 columns: 5,
0138                 rows: 2,
0139                 images: images.slice(14, 24),
0140                 sounds: sounds.slice(14, 24)
0141             },
0142             { // Level 4
0143                 columns: 4,
0144                 rows: 3,
0145                 images: images.slice(14, 26),
0146                 sounds: sounds.slice(14, 26)
0147             }
0148         ]
0149 
0150 function get() {
0151     return memory_cards
0152 }