diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f1074cb2..7d2f514f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,427 +1,419 @@ cmake_minimum_required(VERSION 2.8.12) cmake_policy(SET CMP0043 NEW) project(gcompris-qt C CXX) # get all the redist dll needed for windows when compiling with vc set(CMAKE_INSTALL_UCRT_LIBRARIES 1) include(InstallRequiredSystemLibraries) # Set c++11 support include(CheckCXXCompilerFlag) check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11) check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X) if(COMPILER_SUPPORTS_CXX11) set(my_cxx_flags "-std=c++11") elseif(COMPILER_SUPPORTS_CXX0X) set(my_cxx_flags "-std=c++0x") else() message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}") # enable qml debugging for DEBUG builds: set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG") set(GCOMPRIS_MAJOR_VERSION 0) set(GCOMPRIS_MINOR_VERSION 97) set(GCOMPRIS_PATCH_VERSION 0) if("${ANDROID_ARCH}" STREQUAL "arm64") set(GCOMPRIS_PATCH_VERSION 1) endif() # Set the BUILD_DATE string(TIMESTAMP BUILD_DATE %Y%m) # cmake modules setup find_package(ECM 1.4.0 QUIET NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake/) set(CMAKE_PREFIX_PATH "${Qt5_DIR}/lib/cmake/Qt5") # KDE po to qm tools if(ECM_FOUND) include(kdeFetchTranslation) include(ECMAddTests) include(ECMPoQmTools) if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") ecm_install_po_files_as_qm(po) endif() option(BUILD_TESTING "Build and enable unit tests" OFF) include(ECMCoverageOption) endif() # add tools (cppcheck, clang-tidy...) if build on testing mode only # (slower compilation) if(BUILD_TESTING) include(CodeQualityUtils) endif() set(QT_REQUIRED_VERSION 5.6.0) if(CMAKE_SYSTEM_NAME STREQUAL Android) find_package(ECM) set(ANDROID 1) # TODO: possibly should be setup by toolchain one day set(QT_QMAKE_EXECUTABLE "${_qt5Core_install_prefix}/bin/qmake") if(ECM_VERSION VERSION_GREATER "5.55.0") set(QT_REQUIRED_VERSION 5.12.0) endif() # workaround until this fix is in released ECM if(ECM_VERSION VERSION_LESS "5.15.0") add_definitions(-DANDROID) endif() endif() # Set executable filename if(ANDROID) set(GCOMPRIS_EXECUTABLE_NAME GCompris) elseif(SAILFISHOS) set(GCOMPRIS_EXECUTABLE_NAME harbour-gcompris-qt) elseif(WIN32) set(GCOMPRIS_EXECUTABLE_NAME GCompris) else() set(GCOMPRIS_EXECUTABLE_NAME gcompris-qt) endif() set(GCOMPRIS_VERSION ${GCOMPRIS_MAJOR_VERSION}.${GCOMPRIS_MINOR_VERSION}) # An integer value that represents the version of the application # Increase it at each release math(EXPR GCOMPRIS_VERSION_CODE "${GCOMPRIS_MAJOR_VERSION}*10000 + ${GCOMPRIS_MINOR_VERSION}*100 + ${GCOMPRIS_PATCH_VERSION}") # prevent build in source directory if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") message(SEND_ERROR "Building in the source directory is not supported.") message(FATAL_ERROR "Please remove the created \"CMakeCache.txt\" file, the \"CMakeFiles\" directory and create a build directory and call \"${CMAKE_COMMAND} \".") endif() find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED Qml Quick Gui Multimedia Core Svg Xml XmlPatterns LinguistTools Sensors) if(ANDROID) find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED AndroidExtras) endif() if(SAILFISHOS) find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED Widgets) endif() ## For now we workaround CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION to clang with a command variable, so not needed # if(ANDROID AND ECM_VERSION VERSION_LESS "5.56.0" AND Qt5Core_VERSION VERSION_GREATER "5.11.99") # message(FATAL_ERROR "ECM ${ECM_VERSION} not compatible with Qt ${Qt5Core_VERSION} version for android.") # endif() if((UNIX AND NOT APPLE AND NOT SAILFISHOS AND NOT ANDROID) OR WIN32) find_package(OpenSSL REQUIRED) endif() find_package(KF5 QUIET COMPONENTS DocTools ) if(ECM_FOUND) include(KDEInstallDirs) if(ECM_VERSION VERSION_GREATER "1.6.0") add_subdirectory(images) install(FILES org.kde.gcompris.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) install(FILES org.kde.gcompris.desktop DESTINATION ${KDE_INSTALL_APPDIR}) else() message(STATUS "ECM_VERSION is ${ECM_VERSION}, icons and desktop files won't be installed.") endif() endif() # Tell CMake to run moc when necessary: set(CMAKE_AUTOMOC ON) # As moc files are generated in the binary dir, tell CMake # to always look for includes there: set(CMAKE_INCLUDE_CURRENT_DIR ON) #get_cmake_property(_variableNames VARIABLES) #foreach (_variableName ${_variableNames}) # message("${_variableName}=${${_variableName}}") #endforeach() -set(ACTIVATION_MODE "no" CACHE STRING "Policy for activation [no|inapp|internal]") -option(WITH_DEMO_ONLY "Include only demo activities" OFF) - option(WITH_DOWNLOAD "Internal download" ON) # @FIXME These permissions should be removed if download is disable # but it makes the application crash on exit (tested on Android 6) set(ANDROID_INTERNET_PERMISSION "") set(ANDROID_ACCESS_NETWORK_STATE_PERMISSION "") set(GRAPHICAL_RENDERER "auto" CACHE STRING "Policy for choosing the renderer backend [opengl|software|auto]") # Set output directory if(CMAKE_HOST_APPLE) set(_bundle_bin gcompris-qt.app/Contents/MacOS) set(_data_dest_dir bin/${_bundle_bin}/../Resources) else() set(_data_dest_dir share/${GCOMPRIS_EXECUTABLE_NAME}) endif() if(ANDROID) # Android .so output set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/android/libs/${ANDROID_ABI}/) set(GCOMPRIS_TRANSLATIONS_DIR ${CMAKE_BINARY_DIR}/${_data_dest_dir} CACHE INTERNAL "" FORCE) set(GCOMPRIS_RCC_DIR ${CMAKE_BINARY_DIR}/android/assets/${_data_dest_dir}/rcc CACHE INTERNAL "" FORCE) - if(ACTIVATION_MODE STREQUAL "inapp") - set(ANDROID_BILLING_PERMISSION "") - set(ANDROID_PACKAGE "net.gcompris") - else() - set(ANDROID_PACKAGE "net.gcompris.full") - endif() + set(ANDROID_PACKAGE "net.gcompris.full") add_subdirectory(android) elseif(CMAKE_HOST_APPLE) # MacOSX build set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(GCOMPRIS_TRANSLATIONS_DIR ${CMAKE_BINARY_DIR}/${_data_dest_dir}/translations CACHE INTERNAL "" FORCE) set(GCOMPRIS_RCC_DIR ${CMAKE_BINARY_DIR}/${_data_dest_dir}/rcc CACHE INTERNAL "" FORCE) else() # Desktop build set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(GCOMPRIS_TRANSLATIONS_DIR ${CMAKE_BINARY_DIR}/${_data_dest_dir}/translations CACHE INTERNAL "" FORCE) set(GCOMPRIS_RCC_DIR ${CMAKE_BINARY_DIR}/${_data_dest_dir}/rcc CACHE INTERNAL "" FORCE) endif() # Always create these folders add_custom_command( OUTPUT shareFolders COMMAND cmake -E make_directory ${GCOMPRIS_TRANSLATIONS_DIR} COMMAND cmake -E make_directory ${GCOMPRIS_RCC_DIR} ) add_custom_target( createShareFolders ALL DEPENDS shareFolders ) include(cmake/rcc.cmake) # Translations handling # Simple command calling the python script add_custom_command( OUTPUT retrievePoFilesFromSvn COMMAND python3 tools/l10n-fetch-po-files.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) # Install translations add_custom_target(getSvnTranslations DEPENDS retrievePoFilesFromSvn COMMENT "Re-run cmake after this to be able to run BuildTranslations with the latest files" ) # Get all po files in po/. You can get them doing: python3 tools/l10n-fetch-po-files.py file(GLOB TRANSLATIONS_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "po/*.po") # Set the output dir for the translation files to /bin foreach(PoSource ${TRANSLATIONS_FILES}) # Changes the .po extension to .ts string(REPLACE ".po" ".ts" TsSource ${PoSource}) # Removes the po/ folder string(REPLACE "po/" "" TsSource ${TsSource}) # qm filename string(REPLACE ".ts" ".qm" QmOutput ${TsSource}) set(OutTsFile ${CMAKE_BINARY_DIR}/tmp/${TsSource}) add_custom_command( OUTPUT ${QmOutput} COMMAND cmake -E make_directory ${GCOMPRIS_TRANSLATIONS_DIR} COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/tmp # Remove the obsolete translations and set po in the ts output file COMMAND msgattrib --no-obsolete ${CMAKE_CURRENT_SOURCE_DIR}/${PoSource} -o ${OutTsFile} # Convert the po into ts COMMAND Qt5::lconvert -if po -of ts -i ${OutTsFile} -o ${OutTsFile} # Convert the ts in qm removing non finished translations COMMAND Qt5::lrelease -compress -nounfinished ${OutTsFile} -qm ${GCOMPRIS_TRANSLATIONS_DIR}/${QmOutput} ) list(APPEND QM_FILES ${QmOutput}) endforeach() # Install translations if(WIN32) add_custom_target(BuildTranslations DEPENDS ${QM_FILES} COMMENT "If you don't have the .po, you need to run make getSvnTranslations first then re-run cmake" ) else() add_custom_target(BuildTranslations ALL DEPENDS ${QM_FILES} COMMENT "If you don't have the .po, you need to run make getSvnTranslations first then re-run cmake" ) endif() add_custom_command( OUTPUT doBundleTranslations COMMAND 7z a -w${CMAKE_BINARY_DIR}/share/${GCOMPRIS_EXECUTABLE_NAME} ${CMAKE_BINARY_DIR}/translations-${GCOMPRIS_VERSION}.7z ${CMAKE_BINARY_DIR}/share/${GCOMPRIS_EXECUTABLE_NAME}/translations WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) # Bundle translations add_custom_target(BundleTranslations DEPENDS doBundleTranslations COMMENT "If you want to provide a zip of the translations on a server (run make BuildTranslations first)" ) add_custom_command( OUTPUT doDlAndInstallBundledTranslations COMMAND curl -fsS -o translations-${GCOMPRIS_VERSION}.7z http://gcompris.net/download/translations-${GCOMPRIS_VERSION}.7z COMMAND 7z x -y -o${CMAKE_BINARY_DIR}/share/${GCOMPRIS_EXECUTABLE_NAME} translations-${GCOMPRIS_VERSION}.7z WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) # Download and install bundled translations add_custom_target(DlAndInstallBundledTranslations DEPENDS doDlAndInstallBundledTranslations COMMENT "Download the bundled translation and install them in the build dir" ) if(CMAKE_HOST_APPLE) install(DIRECTORY ${GCOMPRIS_TRANSLATIONS_DIR} DESTINATION ${_bundle_bin}) elseif(ANDROID) install(DIRECTORY ${GCOMPRIS_TRANSLATIONS_DIR} DESTINATION "share") else() install(DIRECTORY ${GCOMPRIS_TRANSLATIONS_DIR} DESTINATION ${_data_dest_dir}) endif() # Build standalone package option -> if ON, we will copy the required Qt files in the build package. # If OFF, "make install" will not copy Qt files so only GCompris files will be packaged. # By default, it is true on Windows (as we deliver NSIS package), macOS (bundled), android (apk) and false on linux (to do make install) # If you want to create a STGZ package for linux (auto-extractible), override this variable by typing : cmake -DBUILD_STANDALONE=ON if(UNIX AND NOT ANDROID AND NOT APPLE) option(BUILD_STANDALONE "Build a standalone package when typing 'make package'" OFF) else() option(BUILD_STANDALONE "Build a standalone package when typing 'make package'" ON) endif() option(WITH_KIOSK_MODE "Set the kiosk mode by default" OFF) if(WIN32) set(COMPRESSED_AUDIO "mp3" CACHE STRING "Compressed Audio format [ogg|aac|mp3]") elseif(APPLE) set(COMPRESSED_AUDIO "aac" CACHE STRING "Compressed Audio format [ogg|aac|mp3]") else() set(COMPRESSED_AUDIO "ogg" CACHE STRING "Compressed Audio format [ogg|aac|mp3]") endif() file(GLOB_RECURSE OGG_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/ "*.ogg") foreach(OGG_FILE ${OGG_FILES}) # This should only replace the extension string(REGEX REPLACE "ogg$" "aac" AAC_FILE ${OGG_FILE}) add_custom_command( OUTPUT ${AAC_FILE} # Put the good line depending on your installation COMMAND avconv -v warning -i ${OGG_FILE} -acodec libvo_aacenc ${AAC_FILE} #COMMAND ffmpeg -v warning -i ${OGG_FILE} -acodec aac -strict -2 ${AAC_FILE} ) list(APPEND AAC_FILES ${AAC_FILE}) # This should only replace the extension string(REGEX REPLACE "ogg$" "mp3" MP3_FILE ${OGG_FILE}) add_custom_command( OUTPUT ${MP3_FILE} # Put the good line depending on your installation #COMMAND avconv -v warning -i ${OGG_FILE} -acodec mp3 ${MP3_FILE} COMMAND ffmpeg -v warning -i ${OGG_FILE} -acodec mp3 -strict -2 ${MP3_FILE} ) list(APPEND MP3_FILES ${MP3_FILE}) endforeach() add_custom_target( createAacFromOgg DEPENDS ${AAC_FILES} ) add_custom_target( createMp3FromOgg DEPENDS ${MP3_FILES} ) if(ANDROID) set(GCOMPRIS_ASSETS_DIR ${GCOMPRIS_RCC_DIR}/../../../ CACHE INTERNAL "" FORCE) else() set(GCOMPRIS_ASSETS_DIR ${GCOMPRIS_RCC_DIR} CACHE INTERNAL "" FORCE) endif() # predownload assets (voices and images) and install them in the rcc folder set(DOWNLOAD_ASSETS "" CACHE STRING "Download and packages images and voices. use a list like: words,en,fr,pt_BR,music to retrieve multiple files") add_custom_command( OUTPUT predownloadAssets COMMAND python3 tools/download-assets.py ${DOWNLOAD_ASSETS} ${COMPRESSED_AUDIO} ${GCOMPRIS_ASSETS_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_command( OUTPUT assetsFolders COMMAND cmake -E make_directory "${GCOMPRIS_ASSETS_DIR}/data2" COMMAND cmake -E make_directory "${GCOMPRIS_ASSETS_DIR}/data2/voices-${COMPRESSED_AUDIO}" COMMAND cmake -E make_directory "${GCOMPRIS_ASSETS_DIR}/data2/words" COMMAND cmake -E make_directory "${GCOMPRIS_ASSETS_DIR}/data2/backgroundMusic" ) # Install assets add_custom_target(getAssets DEPENDS assetsFolders predownloadAssets ) add_custom_command( OUTPUT doBundleConvertedOggs COMMAND 7z a converted_ogg_to_${COMPRESSED_AUDIO}-${GCOMPRIS_VERSION}.7z '-ir!src/*${COMPRESSED_AUDIO}' WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) # Bundle oggs ready to be uploaded on a server. This ease build on system without the appropriate audio # convertion tools. add_custom_target(BundleConvertedOggs DEPENDS doBundleConvertedOggs COMMENT "Bundle the converted oggs to upload them on a server. First set COMPRESSED_AUDIO appropriately." ) add_custom_command( OUTPUT doDlAndInstallBundledConvertedOggs COMMAND curl -fsS -o converted_ogg_to_${COMPRESSED_AUDIO}-${GCOMPRIS_VERSION}.7z http://gcompris.net/download/converted_ogg_to_${COMPRESSED_AUDIO}-${GCOMPRIS_VERSION}.7z COMMAND 7z x -y converted_ogg_to_${COMPRESSED_AUDIO}-${GCOMPRIS_VERSION}.7z WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) # Download and install bundled converted oggs add_custom_target(DlAndInstallBundledConvertedOggs DEPENDS doDlAndInstallBundledConvertedOggs COMMENT "Download the bundled converted oggs and install them in the source dir" ) set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${GCOMPRIS_VERSION}) add_custom_target(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD | xz > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) if(KF5_FOUND) add_subdirectory(docs/docbook) endif() # qml-box2d include(cmake/box2d.cmake) add_subdirectory(src) if(SAILFISHOS) # Need to be done at the end, after src add_subdirectory(platforms/sailfishOS) endif() # only enable unit tests for linux if(BUILD_TESTING) enable_testing() add_subdirectory(tests) endif() add_custom_target(binaries) add_dependencies(binaries ${GCOMPRIS_EXECUTABLE_NAME} rcc_core rcc_menu rcc_activities all_activities) diff --git a/android/AndroidManifest.xml.cmake b/android/AndroidManifest.xml.cmake index 57a6dcf21..a509524c3 100644 --- a/android/AndroidManifest.xml.cmake +++ b/android/AndroidManifest.xml.cmake @@ -1,41 +1,40 @@ @ANDROID_INTERNET_PERMISSION@ @ANDROID_ACCESS_NETWORK_STATE_PERMISSION@ - @ANDROID_BILLING_PERMISSION@ diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index df397c598..91fe04358 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -1,217 +1,208 @@ #android build # copied/inspired from stellarium project (http://www.stellarium.org/wiki/index.php/Building_for_Android) -list(APPEND JAVA_SRCS "src/com/android/vending/billing/IInAppBillingService.aidl" "src/net/gcompris/GComprisActivity.java") +list(APPEND JAVA_SRCS "src/net/gcompris/GComprisActivity.java") foreach(JavaSource ${JAVA_SRCS}) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${JavaSource} COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${JavaSource} ${CMAKE_CURRENT_BINARY_DIR}/${JavaSource} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${JavaSource} ) list(APPEND TARGET_JAVA_FILES ${CMAKE_CURRENT_BINARY_DIR}/${JavaSource}) endforeach() add_custom_target(java_src DEPENDS ${TARGET_JAVA_FILES}) find_program(ANDROID_DEPLOY_QT NAMES androiddeployqt PATHS ${_qt5Core_install_prefix}/bin/) # Look for androiddeployqt program if(NOT ANDROID_DEPLOY_QT) message(FATAL_ERROR "Could not find androiddeployqt. Make sure you set all the Qt5_* paths to the Qt for android compiled version.") endif() # Set version set(ANDROID_VERSION_NAME ${GCOMPRIS_VERSION}) # Set a name representing the build type set(APK_SUFFIX "-") -if(ACTIVATION_MODE STREQUAL "inapp") - set(APK_SUFFIX "-inapp${APK_SUFFIX}") -elseif(ACTIVATION_MODE STREQUAL "internal") - set(APK_SUFFIX "-internal${APK_SUFFIX}") -endif() # _HOST have been removed from ECM in https://cgit.kde.org/extra-cmake-modules.git/commit/?id=731ba7036effcc430f98031e7f2a9826f6234cba set(_HOST "${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}") string(TOLOWER "${_HOST}" _HOST) -if(WITH_DEMO_ONLY) - set(APK_SUFFIX "-demo${APK_SUFFIX}") -endif() - if(WITH_DOWNLOAD) set(APK_SUFFIX "-dl${APK_SUFFIX}") endif() if(WITH_KIOSK_MODE) set(APK_SUFFIX "-kiosk${APK_SUFFIX}") endif() # specific clang addition if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(STDCPP_PATH ",\"stdcpp-path\": \"${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libc++_shared.so\"") set(REMOVE_mandroid_FLAG_FOR_CLANG "sed -i -e 's/-mandroid//' Configure") endif() set(ANDROID_TOOLCHAIN arm-linux-androideabi) if("${ANDROID_ARCH}" STREQUAL "arm64") set(ANDROID_TOOLCHAIN aarch64-linux-android) endif() # set android package source for androiddeployqt json file set(PACKAGE_SOURCE_ANDROID ${CMAKE_BINARY_DIR}/tmpAndroid) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml.cmake ${PACKAGE_SOURCE_ANDROID}/AndroidManifest.xml @ONLY) # create json file parsed by the androiddeployqt set(ANDROID_SDK_ROOT $ENV{ANDROID_SDK_ROOT}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configAndroid.json.cmake ${PACKAGE_SOURCE_ANDROID}/configAndroid.json @ONLY) # Get all po files in po/ to create the values-{locale} in order to have the locales available in android file(GLOB TRANSLATIONS_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "../po/*.po") foreach(PoSource ${TRANSLATIONS_FILES}) # Remove suffix ".po" string(REPLACE ".po" "" PoSource ${PoSource}) # Remove prefix "../po/gcompris_" string(REPLACE "../po/gcompris_" "" locale ${PoSource}) # replace _ par -r for locales with country string(REPLACE "_" "-r" locale ${locale}) add_custom_command( OUTPUT ${locale} COMMAND cmake -E make_directory ${GCOMPRIS_TRANSLATIONS_DIR} COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/android/res/values-${locale} COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/android/strings.xml ${CMAKE_BINARY_DIR}/android/res/values-${locale}/strings.xml ) list(APPEND ALL_LOCALES ${locale}) endforeach() find_program(ZIP_ALIGN NAMES zipalign PATHS ${ANDROID_SDK_ROOT}/build-tools/${ANDROID_SDK_BUILD_TOOLS_REVISION}/) add_custom_command( OUTPUT createApkFromAndroidDeployQtDebug DEPENDS ${PACKAGE_SOURCE_ANDROID}/AndroidManifest.xml COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${PACKAGE_SOURCE_ANDROID} COMMAND ${ANDROID_DEPLOY_QT} --output ${CMAKE_CURRENT_BINARY_DIR}/ --input ${PACKAGE_SOURCE_ANDROID}/configAndroid.json --debug --gradle COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/build/outputs/apk/debug/android-debug.apk ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-debug-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ) add_custom_command( OUTPUT createApkFromAndroidDeployQtRelease DEPENDS ${PACKAGE_SOURCE_ANDROID}/AndroidManifest.xml COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${PACKAGE_SOURCE_ANDROID} COMMAND ${ANDROID_DEPLOY_QT} --output ${CMAKE_CURRENT_BINARY_DIR}/ --input ${PACKAGE_SOURCE_ANDROID}/configAndroid.json --release --gradle COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/build/outputs/apk/release/android-release-unsigned.apk ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ) add_custom_command( OUTPUT createApkSignedFromAndroidDeployQtRelease DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk COMMAND jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $ENV{ANDROID_KEYSTORE} -storepass $ENV{ANDROID_KEYSTORE_PASSWD} ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk gcompris ) add_custom_command( OUTPUT createApkSignedAlignedFromAndroidDeployQtRelease DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-aligned-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk COMMAND ${ZIP_ALIGN} -v 4 ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-aligned-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ) add_custom_command( OUTPUT apkInstall DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-aligned-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk COMMAND ${ANDROID_SDK_ROOT}/platform-tools/adb install -r ${CMAKE_CURRENT_BINARY_DIR}/GCompris-Android-release-signed-aligned-${ANDROID_ABI}${APK_SUFFIX}${GCOMPRIS_VERSION}.apk ) # Command to create apk from Makefile add_custom_target(apk_debug DEPENDS ${ALL_LOCALES} move_translations_to_assets package_openssl createApkFromAndroidDeployQtDebug java_src ) # Command to create apk from Makefile add_custom_target(apk_release DEPENDS ${ALL_LOCALES} move_translations_to_assets package_openssl createApkFromAndroidDeployQtRelease java_src ) # Command to create signed apk from Makefile add_custom_target(apk_signed DEPENDS ${ALL_LOCALES} move_translations_to_assets package_openssl createApkSignedFromAndroidDeployQtRelease java_src ) # Command to create signed aligned apk from Makefile add_custom_target(apk_signed_aligned DEPENDS ${ALL_LOCALES} move_translations_to_assets package_openssl createApkSignedAlignedFromAndroidDeployQtRelease java_src ) # Command to install the signed aligned apk through adb from Makefile add_custom_target(apk_install DEPENDS apkInstall ) # compile openssl needed to download from https include(ExternalProject) set(OPENSSL_DIR "${CMAKE_BINARY_DIR}/external/openssl/") set(SCRIPT_BUILD "build_openssl.sh.in") if("${ANDROID_ARCH}" STREQUAL "arm64") set(SCRIPT_BUILD "build_openssl_64.sh.in") endif() message(STATUS "Building ${SCRIPT_BUILD}") configure_file("${SCRIPT_BUILD}" "build_openssl.sh" @ONLY) if("${ANDROID_ARCH}" STREQUAL "arm") ExternalProject_Add( ext_openssl DOWNLOAD_DIR ${CMAKE_BINARY_DIR} SOURCE_DIR ${OPENSSL_DIR} URL https://www.openssl.org/source/openssl-1.0.2q.tar.gz URL_HASH SHA256=5744cfcbcec2b1b48629f7354203bc1e5e9b5466998bbccc5b5fcde3b18eb684 CONFIGURE_COMMAND echo "Configuration not needed" BUILD_COMMAND sh "${CMAKE_CURRENT_BINARY_DIR}/build_openssl.sh" INSTALL_COMMAND "" ) add_custom_command( OUTPUT package_openssl COMMAND ${CMAKE_COMMAND} -E copy "${OPENSSL_DIR}/libcrypto.so.1.0.0" "${CMAKE_BINARY_DIR}/android/libs/${ANDROID_ABI}/libcrypto.so" COMMAND ${CMAKE_COMMAND} -E copy "${OPENSSL_DIR}/libssl.so.1.0.0" "${CMAKE_BINARY_DIR}/android/libs/${ANDROID_ABI}/libssl.so" ) else() # For Qt 5.12.5 and above 5.13.0, it needs libcrypto_1_1.so and libssl_1_1.so set(suffix_libssl "") if(Qt5Core_VERSION VERSION_GREATER_EQUAL "5.12.5" AND NOT Qt5Core_VERSION MATCHES "5.13.0") set(suffix_libssl "_1_1") endif() ExternalProject_Add( ext_openssl DOWNLOAD_DIR ${CMAKE_BINARY_DIR} SOURCE_DIR ${OPENSSL_DIR} URL https://www.openssl.org/source/openssl-1.1.1c.tar.gz URL_HASH SHA256=f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90 CONFIGURE_COMMAND echo "Configuration not needed" BUILD_COMMAND sh "${CMAKE_CURRENT_BINARY_DIR}/build_openssl.sh" INSTALL_COMMAND "" ) add_custom_command( OUTPUT package_openssl COMMAND ${CMAKE_COMMAND} -E copy "${OPENSSL_DIR}/libcrypto.so.1.1" "${CMAKE_BINARY_DIR}/android/libs/${ANDROID_ABI}/libcrypto${suffix_libssl}.so" COMMAND ${CMAKE_COMMAND} -E copy "${OPENSSL_DIR}/libssl.so.1.1" "${CMAKE_BINARY_DIR}/android/libs/${ANDROID_ABI}/libssl${suffix_libssl}.so" ) endif() # add_custom_command( OUTPUT move_translations_to_assets COMMAND ${CMAKE_COMMAND} -E copy_directory ${GCOMPRIS_TRANSLATIONS_DIR} ${CMAKE_BINARY_DIR}/android/assets/share/GCompris ) if(TARGET create-apk) set(PACKAGE_DIR ${PACKAGE_SOURCE_ANDROID}) set_target_properties(create-apk-GCompris PROPERTIES ANDROID_APK_DIR "${PACKAGE_DIR}") add_custom_target(gcompris-move-metadata ALL COMMAND cmake -E echo "Moving GCompris shared Android resources" COMMAND cmake -E make_directory ${PACKAGE_SOURCE_ANDROID} COMMAND cmake -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}" "${PACKAGE_SOURCE_ANDROID}" ) add_dependencies(create-apk gcompris-move-metadata) endif() diff --git a/android/src/com/android/vending/billing/IInAppBillingService.aidl b/android/src/com/android/vending/billing/IInAppBillingService.aidl deleted file mode 100644 index 2a492f784..000000000 --- a/android/src/com/android/vending/billing/IInAppBillingService.aidl +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.vending.billing; - -import android.os.Bundle; - -/** - * InAppBillingService is the service that provides in-app billing version 3 and beyond. - * This service provides the following features: - * 1. Provides a new API to get details of in-app items published for the app including - * price, type, title and description. - * 2. The purchase flow is synchronous and purchase information is available immediately - * after it completes. - * 3. Purchase information of in-app purchases is maintained within the Google Play system - * till the purchase is consumed. - * 4. An API to consume a purchase of an inapp item. All purchases of one-time - * in-app items are consumable and thereafter can be purchased again. - * 5. An API to get current purchases of the user immediately. This will not contain any - * consumed purchases. - * - * All calls will give a response code with the following possible values - * RESULT_OK = 0 - success - * RESULT_USER_CANCELED = 1 - user pressed back or canceled a dialog - * RESULT_BILLING_UNAVAILABLE = 3 - this billing API version is not supported for the type requested - * RESULT_ITEM_UNAVAILABLE = 4 - requested SKU is not available for purchase - * RESULT_DEVELOPER_ERROR = 5 - invalid arguments provided to the API - * RESULT_ERROR = 6 - Fatal error during the API action - * RESULT_ITEM_ALREADY_OWNED = 7 - Failure to purchase since item is already owned - * RESULT_ITEM_NOT_OWNED = 8 - Failure to consume since item is not owned - */ -interface IInAppBillingService { - /** - * Checks support for the requested billing API version, package and in-app type. - * Minimum API version supported by this interface is 3. - * @param apiVersion the billing version which the app is using - * @param packageName the package name of the calling app - * @param type type of the in-app item being purchased "inapp" for one-time purchases - * and "subs" for subscription. - * @return RESULT_OK(0) on success, corresponding result code on failures - */ - int isBillingSupported(int apiVersion, String packageName, String type); - - /** - * Provides details of a list of SKUs - * Given a list of SKUs of a valid type in the skusBundle, this returns a bundle - * with a list JSON strings containing the productId, price, title and description. - * This API can be called with a maximum of 20 SKUs. - * @param apiVersion billing API version that the Third-party is using - * @param packageName the package name of the calling app - * @param skusBundle bundle containing a StringArrayList of SKUs with key "ITEM_ID_LIST" - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on - * failure as listed above. - * "DETAILS_LIST" with a StringArrayList containing purchase information - * in JSON format similar to: - * '{ "productId" : "exampleSku", "type" : "inapp", "price" : "$5.00", - * "title : "Example Title", "description" : "This is an example description" }' - */ - Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle); - - /** - * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU, - * the type, a unique purchase token and an optional developer payload. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param sku the SKU of the in-app item as published in the developer console - * @param type the type of the in-app item ("inapp" for one-time purchases - * and "subs" for subscription). - * @param developerPayload optional argument to be sent back with the purchase information - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on - * failure as listed above. - * "BUY_INTENT" - PendingIntent to start the purchase flow - * - * The Pending intent should be launched with startIntentSenderForResult. When purchase flow - * has completed, the onActivityResult() will give a resultCode of OK or CANCELED. - * If the purchase is successful, the result data will contain the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on - * failure as listed above. - * "INAPP_PURCHASE_DATA" - String in JSON format similar to - * '{"orderId":"12999763169054705758.1371079406387615", - * "packageName":"com.example.app", - * "productId":"exampleSku", - * "purchaseTime":1345678900000, - * "purchaseToken" : "122333444455555", - * "developerPayload":"example developer payload" }' - * "INAPP_DATA_SIGNATURE" - String containing the signature of the purchase data that - * was signed with the private key of the developer - * TODO: change this to app-specific keys. - */ - Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type, - String developerPayload); - - /** - * Returns the current SKUs owned by the user of the type and package name specified along with - * purchase information and a signature of the data to be validated. - * This will return all SKUs that have been purchased in V3 and managed items purchased using - * V1 and V2 that have not been consumed. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param type the type of the in-app items being requested - * ("inapp" for one-time purchases and "subs" for subscription). - * @param continuationToken to be set as null for the first call, if the number of owned - * skus are too many, a continuationToken is returned in the response bundle. - * This method can be called again with the continuation token to get the next set of - * owned skus. - * @return Bundle containing the following key-value pairs - * "RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on - * failure as listed above. - * "INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs - * "INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information - * "INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures - * of the purchase information - * "INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the - * next set of in-app purchases. Only set if the - * user has more owned skus than the current list. - */ - Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken); - - /** - * Consume the last purchase of the given SKU. This will result in this item being removed - * from all subsequent responses to getPurchases() and allow re-purchase of this item. - * @param apiVersion billing API version that the app is using - * @param packageName package name of the calling app - * @param purchaseToken token in the purchase information JSON that identifies the purchase - * to be consumed - * @return 0 if consumption succeeded. Appropriate error values for failures. - */ - int consumePurchase(int apiVersion, String packageName, String purchaseToken); -} diff --git a/android/src/net/gcompris/GComprisActivity.java b/android/src/net/gcompris/GComprisActivity.java index b379205ad..a7901ffd4 100644 --- a/android/src/net/gcompris/GComprisActivity.java +++ b/android/src/net/gcompris/GComprisActivity.java @@ -1,269 +1,136 @@ /**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtAndroidExtras module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: https://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ package net.gcompris; import org.qtproject.qt5.android.bindings.QtApplication; import org.qtproject.qt5.android.bindings.QtActivity; -import com.android.vending.billing.*; import android.media.AudioManager; import android.util.Log; import android.os.Bundle; import android.os.IBinder; import android.content.ServiceConnection; import android.content.Intent; import android.content.ComponentName; import android.content.Context; import android.app.PendingIntent; import org.json.JSONObject; import java.util.ArrayList; import android.view.WindowManager; import java.text.Collator; import java.util.Locale; public class GComprisActivity extends QtActivity { private static GComprisActivity m_instance; -// public static final String SKU_NAME = "android.test.purchased"; // for testing public static final String SKU_NAME = "full"; - private IInAppBillingService m_service; - private ServiceConnection m_serviceConnection = new ServiceConnection() { - @Override - public void onServiceDisconnected(ComponentName name) - { - m_service = null; - } - - @Override - public void onServiceConnected(ComponentName name, IBinder service) - { - if(service.isBinderAlive()) { - m_service = IInAppBillingService.Stub.asInterface(service); - } - } - }; - public GComprisActivity() { m_instance = this; } - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - Intent intent = new Intent("com.android.vending.billing.InAppBillingService.BIND"); - intent.setPackage("com.android.vending"); - bindService(intent, - m_serviceConnection, Context.BIND_AUTO_CREATE); - } - - @Override - public void onDestroy() - { - super.onDestroy(); - - unbindService(m_serviceConnection); - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) - { - super.onActivityResult(requestCode, resultCode, data); - - if (resultCode == RESULT_OK && data != null && requestCode == 1001) { - int responseCode = data.getIntExtra("RESPONSE_CODE", -1); - String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA"); - - try { - JSONObject jo = new JSONObject(purchaseData); - String sku = jo.getString("productId"); - int purchaseState = jo.getInt("purchaseState"); - String payload = jo.getString("developerPayload"); - String purchaseToken = jo.getString("purchaseToken"); - if (sku.equals(SKU_NAME) && purchaseState == 0) { - bought(true); - return; - } - } catch (Exception e) { - e.printStackTrace(); - } - - Log.e(QtApplication.QtTAG, "Buying full version failed: Result code == " + resultCode); - } - } - - private static native void bought(boolean b); - - public static void buyGCompris() - { - if (m_instance.m_service == null) { - Log.e(QtApplication.QtTAG, "Buying full version failed: No billing service"); - return; - } - - try { - Bundle buyIntentBundle = m_instance.m_service.getBuyIntent(3, - m_instance.getPackageName(), - SKU_NAME, - "inapp", - ""); - int responseCode = buyIntentBundle.getInt("RESPONSE_CODE"); - if (responseCode == 0 /* BILLING_RESPONSE_RESULT_OK */) { - PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT"); - m_instance.startIntentSenderForResult(pendingIntent.getIntentSender(), - 1001, new Intent(), Integer.valueOf(0), Integer.valueOf(0), - Integer.valueOf(0)); - return; - } else if (responseCode == 7 /* BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED */) { - bought(true); - } else { - Log.e(QtApplication.QtTAG, "Buying full version failed: Response code == " + responseCode); - } - } catch (Exception e) { - Log.e(QtApplication.QtTAG, "Exception caught when buying full version!", e); - } - } - - public static void checkPayment() - { - if (m_instance.m_service == null) { - Log.e(QtApplication.QtTAG, "Check full version is bought failed: No billing service"); - return; - } - - try { - Bundle ownedItems = m_instance.m_service.getPurchases(3, m_instance.getPackageName(), - "inapp", null); - int responseCode = ownedItems.getInt("RESPONSE_CODE"); - if (responseCode == 0) { - ArrayList ownedSkus = ownedItems.getStringArrayList("INAPP_PURCHASE_ITEM_LIST"); - ArrayList purchaseDataList = ownedItems.getStringArrayList("INAPP_PURCHASE_DATA_LIST"); - for(int i=0; i- if "%platform%"=="x86" set CMAKE_GENERATOR=Visual Studio 15 if "%platform%"=="x86" set QT5=C:\Qt\5.13.2\msvc2017 if "%platform%"=="x64" set CMAKE_GENERATOR=Visual Studio 15 2017 Win64 if "%platform%"=="x64" set QT5=C:\Qt\5.13.2\msvc2017_64 set Path=%QT5%\bin;%Path% - cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -DCMAKE_SYSTEM_VERSION=10.0 "-DCMAKE_PREFIX_PATH=%QT5%" -DACTIVATION_MODE=internal -DVCREDIST_DIR="build" -DGRAPHICAL_RENDERER=software + cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -DCMAKE_SYSTEM_VERSION=10.0 "-DCMAKE_PREFIX_PATH=%QT5%" -DVCREDIST_DIR="build" -DGRAPHICAL_RENDERER=software cmake --build build --config RelWithDebInfo --target DlAndInstallBundledConvertedOggs - cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -DCMAKE_SYSTEM_VERSION=10.0 "-DCMAKE_PREFIX_PATH=%QT5%" -DACTIVATION_MODE=internal -DVCREDIST_DIR="build" -DGRAPHICAL_RENDERER=software + cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -DCMAKE_SYSTEM_VERSION=10.0 "-DCMAKE_PREFIX_PATH=%QT5%" -DVCREDIST_DIR="build" -DGRAPHICAL_RENDERER=software cmake --build build --config RelWithDebInfo cmake --build build --config RelWithDebInfo --target DlAndInstallBundledTranslations cmake --build build --config RelWithDebInfo --target package build: off artifacts: - path: build/*.exe deploy: - provider: FTP host: gcompris.net protocol: sftp username: releaser password: secure: kt7OLxDoaFlmFwDtcGfa/X3uVhQj0y1q2YVdBroxp9U= folder: www diff --git a/platforms/ios/config.h b/platforms/ios/config.h index 9250921e2..353a0f82b 100644 --- a/platforms/ios/config.h +++ b/platforms/ios/config.h @@ -1,45 +1,43 @@ /* GCompris - config.h * * Copyright (C) 2015 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #ifndef GCOMPRIS_CONFIG_H #define GCOMPRIS_CONFIG_H /* Version number of package (string) */ #define VERSION "0.80" /* Version number of package (integer) */ #define VERSION_CODE 8000 /* Folder where rccs and translations are installed */ #ifdef Q_OS_MAC #define GCOMPRIS_DATA_FOLDER "." #else #define GCOMPRIS_DATA_FOLDER "../bin/gcompris-qt.app/Contents/MacOS" #endif /* GCompris for android, gcompris-qt for others */ #define GCOMPRIS_APPLICATION_NAME "gcompris-qt" /* Compressed audio format */ #define COMPRESSED_AUDIO "aac" /* Download Allowed */ #define DOWNLOAD_ALLOWED "ON" /* Date at which GCompris has been built */ #define BUILD_DATE "201757" -/* Type of activation system */ -#define ACTIVATION_MODE "no" #endif // GCOMPRIS_CONFIG_H diff --git a/platforms/macosx/config.h b/platforms/macosx/config.h index 7c771158f..55899059a 100644 --- a/platforms/macosx/config.h +++ b/platforms/macosx/config.h @@ -1,41 +1,39 @@ /* GCompris - config.h * * Copyright (C) 2016 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #ifndef GCOMPRIS_CONFIG_H #define GCOMPRIS_CONFIG_H /* Version number of package (string) */ #define VERSION "0.80" /* Version number of package (integer) */ #define VERSION_CODE 8000 /* Folder where rccs and translations are installed */ #define GCOMPRIS_DATA_FOLDER "../Resources" /* GCompris for android, gcompris-qt for others */ #define GCOMPRIS_APPLICATION_NAME "gcompris-qt" /* Compressed audio format */ #define COMPRESSED_AUDIO "aac" /* Download Allowed */ #define DOWNLOAD_ALLOWED "ON" /* Date at which GCompris has been built */ #define BUILD_DATE "201757" -/* Type of activation system */ -#define ACTIVATION_MODE "no" #endif // GCOMPRIS_CONFIG_H diff --git a/src/activities/CMakeLists.txt b/src/activities/CMakeLists.txt index 721f99710..7062bc4c0 100644 --- a/src/activities/CMakeLists.txt +++ b/src/activities/CMakeLists.txt @@ -1,34 +1,28 @@ add_subdirectory(menu) # Read the activities.txt file file(READ activities.txt ACTIVITIES) # Split the output on a list containing each line string(REGEX REPLACE ";" "\\\\;" ACTIVITIES "${ACTIVITIES}") string(REGEX REPLACE "\n" ";" ACTIVITIES "${ACTIVITIES}") file(REMOVE "activities_out.txt") add_custom_target(all_activities) foreach(ACTIVITY ${ACTIVITIES}) # For each line found, we remove comments string(FIND "${ACTIVITY}" "#" match) if(${match}) - file(STRINGS "${ACTIVITY}/ActivityInfo.qml" demoline REGEX "demo:[ ]+") - string(REGEX REPLACE ".*demo:.*(true|false).*" "\\1" demo "${demoline}" ) - set(DEFAULT_MODE ON) - if((${WITH_DEMO_ONLY}) AND (${demo} STREQUAL "false")) - set(DEFAULT_MODE OFF) - endif() # Set activities as options (enabled by default) - option("USE_${ACTIVITY}" "Enable ${ACTIVITY} activity" ${DEFAULT_MODE}) + option("USE_${ACTIVITY}" "Enable ${ACTIVITY} activity" ON) if(USE_${ACTIVITY}) # Add the directory for compilation add_subdirectory(${ACTIVITY}) file(APPEND "activities_out.txt" "${ACTIVITY}\n") add_dependencies(all_activities "rcc_${ACTIVITY}") endif() endif(${match}) endforeach(ACTIVITY ${ACTIVITIES}) GCOMPRIS_ADD_RCC(activities activities_out.txt) diff --git a/src/activities/advanced_colors/ActivityInfo.qml b/src/activities/advanced_colors/ActivityInfo.qml index e35313748..0e18643dd 100644 --- a/src/activities/advanced_colors/ActivityInfo.qml +++ b/src/activities/advanced_colors/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "advanced_colors/AdvancedColors.qml" difficulty: 6 icon: "advanced_colors/advanced_colors.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Advanced colors") //: Help title description: qsTr("Select the butterfly of the correct color") //intro: "click on the required color" //: Help goal goal: qsTr("Learn to recognize unusual colors.") //: Help prerequisite prerequisite: qsTr("Can read") //: Help manual manual: qsTr("You will see dancing butterflies of different colors and a question. You have to find the correct butterfly and touch it.") credit: "" section: "reading colors vocabulary" createdInVersion: 0 } diff --git a/src/activities/algebra_by/ActivityInfo.qml b/src/activities/algebra_by/ActivityInfo.qml index dbcc64544..7ec4a9ddb 100644 --- a/src/activities/algebra_by/ActivityInfo.qml +++ b/src/activities/algebra_by/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "algebra_by/AlgebraBy.qml" difficulty: 3 icon: "algebra_by/algebra_by.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Multiplication of numbers") //: Help title description: qsTr("Practice the multiplication operation") // intro: "Multiply the two numbers together and type in your answer before the balloon lands in the water" //: Help goal goal: qsTr("Learn to multiply numbers within a limited period of time") //: Help prerequisite prerequisite: qsTr("Multiplication tables from 1 to 10") //: Help manual manual: qsTr("A multiplication is displayed on the screen. Quickly find the result and use your computer's keyboard or the on-screen keypad to type the product of the numbers. You have to be fast and submit the answer before the penguins in their balloon land!") credit: "" section: "math multiplication arithmetic" createdInVersion: 0 levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_div/ActivityInfo.qml b/src/activities/algebra_div/ActivityInfo.qml index df49d80be..508ead1f8 100644 --- a/src/activities/algebra_div/ActivityInfo.qml +++ b/src/activities/algebra_div/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Sayan Biswas * * 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: "algebra_div/AlgebraDiv.qml" difficulty: 6 icon: "algebra_div/algebra_div.svg" author: "Sayan Biswas <techsayan01@gmail.com>" - demo: false //: Activity title title: qsTr("Division of numbers") //: Help title description: qsTr("Practice the division operation") // intro: "Find the result of the division and type in your answer before the balloon lands in the water" //: Help goal goal: qsTr("Find the result of the division within a limited period of time") //: Help prerequisite prerequisite: qsTr("Division of small numbers") //: Help manual manual: qsTr("A division is displayed on the screen. Quickly find the result and use your computer's keyboard or the on-screen keypad to type it. You have to be fast and submit the answer before the penguins in their balloon land!") credit: "" section: "math division arithmetic" createdInVersion: 4000 levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_minus/ActivityInfo.qml b/src/activities/algebra_minus/ActivityInfo.qml index b8ef27c84..0af7fe355 100644 --- a/src/activities/algebra_minus/ActivityInfo.qml +++ b/src/activities/algebra_minus/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "algebra_minus/AlgebraMinus.qml" difficulty: 4 icon: "algebra_minus/algebra_minus.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Subtraction of numbers") //: Help title description: qsTr("Practice the subtraction operation") // intro: "Subtract the two numbers and type in your answer before the balloon lands in the water" //: Help goal goal: qsTr("Learn to find the difference between two numbers within a limited period of time") //: Help prerequisite prerequisite: qsTr("Subtraction of small numbers") //: Help manual manual: qsTr("A subtraction is displayed on the screen. Quickly find the result and use your computer's keyboard or the on-screen keypad to type it. You have to be fast and submit the answer before the penguins in their balloon land!") credit: "" section: "math subtraction arithmetic" createdInVersion: 0 levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algebra_plus/ActivityInfo.qml b/src/activities/algebra_plus/ActivityInfo.qml index 64e4c9302..388479dbb 100644 --- a/src/activities/algebra_plus/ActivityInfo.qml +++ b/src/activities/algebra_plus/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "algebra_plus/AlgebraPlus.qml" difficulty: 3 icon: "algebra_plus/algebra_plus.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Addition of numbers") //: Help title description: qsTr("Practice the addition of numbers") // intro: "Add the two numbers together and type in your answer before the balloon lands in the water" //: Help goal goal: qsTr("Learn to find the sum of two numbers within a limited period of time") //: Help prerequisite prerequisite: qsTr("Simple addition. Can recognize written numbers") //: Help manual manual: qsTr("An addition is displayed on the screen. Quickly find the result and use your computer's keyboard or the on-screen keypad to type it. You have to be fast and submit the answer before the penguins land in their balloon!") credit: "" section: "math addition arithmetic" createdInVersion: 0 levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/algorithm/ActivityInfo.qml b/src/activities/algorithm/ActivityInfo.qml index eeb26b74a..802bd61a4 100644 --- a/src/activities/algorithm/ActivityInfo.qml +++ b/src/activities/algorithm/ActivityInfo.qml @@ -1,38 +1,37 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bharath M S * * 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: "algorithm/Algorithm.qml" difficulty: 2 icon: "algorithm/algorithm.svg" author: "Bharath M S <brat.197@gmail.com>" - demo: true //: Activity title title: qsTr("Logical associations") //: Help title description: qsTr("Complete the arrangement of fruits") // intro: "Click on the missing items on the table and follow the logical sequence displayed above it." //: Help goal goal: qsTr("Logic training activity") //: Help manual manual: qsTr("Look at the two sequences. Each fruit in the first sequence has been replaced by another fruit in the second sequence. Complete the second sequence by using the correct fruits, after studying this pattern.") credit: "" section: "discovery logic" createdInVersion: 0 } diff --git a/src/activities/align4-2players/ActivityInfo.qml b/src/activities/align4-2players/ActivityInfo.qml index 6ea6f94e8..5918571ca 100644 --- a/src/activities/align4-2players/ActivityInfo.qml +++ b/src/activities/align4-2players/ActivityInfo.qml @@ -1,38 +1,37 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bharath M S * * 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: "align4-2players/Align42players.qml" difficulty: 2 icon: "align4-2players/align4-2players.svg" author: "Bharath M S <brat.197@gmail.com>" - demo: true //: Activity title title: qsTr("Align four (with a friend)") //: Help title description: qsTr("Arrange four tokens in a row") // intro: "Click on the column where you wish your token to fall and try to align 4 tokens to win." //: Help goal goal: qsTr("Create a line of 4 tokens either horizontally (lying down), vertically (standing up) or diagonally.") //: Help manual manual: qsTr("Play with a friend. Take turns to click the line in which you want to drop a token. You can also use the arrow keys to move the token left or right, and the down or space key to drop a token. First player to create a line of 4 tokens wins") credit: "" section: "strategy" createdInVersion: 0 } diff --git a/src/activities/align4/ActivityInfo.qml b/src/activities/align4/ActivityInfo.qml index 9109ccfc0..3b70989c2 100644 --- a/src/activities/align4/ActivityInfo.qml +++ b/src/activities/align4/ActivityInfo.qml @@ -1,38 +1,37 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bharath M S * * 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: "align4/Align4.qml" difficulty: 2 icon: "align4/align4.svg" author: "Bharath M S <brat.197@gmail.com>" - demo: true //: Activity title title: qsTr("Align four (against Tux)") //: Help title description: qsTr("Arrange four tokens in a row") // intro: "Click on the column where you wish your token to fall and try to align of 4 tokens before Tux." //: Help goal goal: qsTr("Create a line of 4 tokens either horizontally (lying down), vertically (standing up) or diagonally.") //: Help manual manual: qsTr("Play with the computer. Take turns to click the line in which you want to drop a token. You can also use the arrow keys to move the token left or right, and the down or space key to drop a token. First player to create a line of 4 tokens wins") credit: "" section: "strategy" createdInVersion: 0 } diff --git a/src/activities/alphabet-sequence/ActivityInfo.qml b/src/activities/alphabet-sequence/ActivityInfo.qml index 27712f3a1..b0400cfb2 100644 --- a/src/activities/alphabet-sequence/ActivityInfo.qml +++ b/src/activities/alphabet-sequence/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "alphabet-sequence/AlphabetSequence.qml" difficulty: 2 icon: "alphabet-sequence/alphabet-sequence.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Alphabet sequence") //: Help title description: qsTr("Move the helicopter to catch the clouds following the order of the alphabet") // intro: "Move the helicopter to catch the clouds following the order of the alphabet." //: Help goal goal: qsTr("Alphabet sequence") //: Help prerequisite prerequisite: qsTr("Can decode letters") //: Help manual manual: qsTr("Catch the alphabet letters. With a keyboard use the arrow keys to move the helicopter. With a pointing device you just click or tap on the target location. To know which letter you have to catch you can either remember it or check the bottom right corner.") credit: "" section: "reading letters" createdInVersion: 0 } diff --git a/src/activities/baby_tangram/ActivityInfo.qml b/src/activities/baby_tangram/ActivityInfo.qml index c98589393..228fe0200 100644 --- a/src/activities/baby_tangram/ActivityInfo.qml +++ b/src/activities/baby_tangram/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2019 Johnny Jazeix * * 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: "baby_tangram/BabyTangram.qml" difficulty: 1 icon: "baby_tangram/baby_tangram.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Baby Puzzle") //: Help title description: qsTr("The objective is to assemble the baby puzzle") // intro: "Move each puzzle piece, to obtain the completed puzzle. You can change their orientation by clicking on the arrows." //: Help goal goal: "" //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Move a piece by dragging it. Use the rotation button if necessary. More complicated levels can be found in tangram activity.") credit: "" section: "puzzle" createdInVersion: 9800 } diff --git a/src/activities/baby_wordprocessor/ActivityInfo.qml b/src/activities/baby_wordprocessor/ActivityInfo.qml index 4f47376b1..0b7cad427 100644 --- a/src/activities/baby_wordprocessor/ActivityInfo.qml +++ b/src/activities/baby_wordprocessor/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "baby_wordprocessor/BabyWordprocessor.qml" difficulty: 1 icon: "baby_wordprocessor/baby_wordprocessor.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("A baby wordprocessor") //: Help title description: qsTr("A simplistic word processor to let the children play around with a keyboard and see letters.") //intro: "A simplistic word processor to play around with the keyboard" //: Help goal goal: qsTr("Discover the keyboard and the letters.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Just type on the real or virtual keyboard like in a wordprocessor. Clicking on the 'Title' button will make the text bigger. Similarly, the 'subtitle' button will make the text slightly less bigger. Clicking on 'paragraph' will remove the formatting. Press 'Shift' and use the arrow keys to select the text. Use Ctrl+C to copy, Ctrl+V to paste and Crtl+X to cut text. Ctrl+Z can be used to undo changes. Try to fiddle around and find more shortcuts. For example, what is the shortcut to select all the text?") credit: "" section: "computer keyboard reading letters" createdInVersion: 6000 } diff --git a/src/activities/babymatch/ActivityInfo.qml b/src/activities/babymatch/ActivityInfo.qml index dc5dfa069..598a6356d 100644 --- a/src/activities/babymatch/ActivityInfo.qml +++ b/src/activities/babymatch/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "babymatch/Babymatch.qml" difficulty: 1 icon: "babymatch/babymatch.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Matching Items") //: Help title description: qsTr("Drag and Drop the items to make them match") // intro: "Drag and drop the objects matching the pictures" //: Help goal goal: qsTr("Motor coordination. Conceptual matching.") //: Help prerequisite prerequisite: qsTr("Cultural references.") //: Help manual manual: qsTr("In the main board area, a set of objects is displayed. In the vertical box (at the left of the main board) another set of objects is shown, each object in the group on the left matching exactly one object in the main board area. This game challenges you to find the logical link between these objects. How do they fit together? Drag each object to the correct red space in the main area.") credit: "" section: "reading vocabulary" createdInVersion: 4000 } diff --git a/src/activities/babyshapes/ActivityInfo.qml b/src/activities/babyshapes/ActivityInfo.qml index 2b0777715..4cc3abe5a 100644 --- a/src/activities/babyshapes/ActivityInfo.qml +++ b/src/activities/babyshapes/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "babyshapes/Babyshapes.qml" difficulty: 1 icon: "babyshapes/babyshapes.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Complete the puzzle") //: Help title description: qsTr("Drag and Drop the shapes on their respective targets") // intro: "Drag and drop the objects matching the shapes." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Complete the puzzle by dragging each piece from the set of pieces on the left, to the matching space in the puzzle.") credit: qsTr("The dog is provided by Andre Connes and released under the GPL") section: "computer" createdInVersion: 4000 } diff --git a/src/activities/balancebox/ActivityInfo.qml b/src/activities/balancebox/ActivityInfo.qml index 10a9bafd7..7f5794cbb 100644 --- a/src/activities/balancebox/ActivityInfo.qml +++ b/src/activities/balancebox/ActivityInfo.qml @@ -1,60 +1,59 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * Authors: * Holger Kaelberer * * 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: "balancebox/Balancebox.qml" difficulty: 2 icon: "balancebox/balancebox.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Balance Box") //: Help title description: qsTr("Navigate the ball to the door by tilting the box.") // intro: "Tilt the box to navigate the ball to the door." //: Help goal goal: qsTr("Practice fine motor skills and basic counting.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Navigate the ball to the door. Be careful not to make it fall into the holes. Numbered-contact buttons in the box need to be touched in the correct order to unlock the door. You can move the ball by tilting your mobile device. On desktop platforms use the arrow keys to simulate tilting. In the configuration dialog you can choose between the default 'Built-in' level set and one that you can define yourself ('User'). A user-defined level set can be created by choosing the 'user' level set and start the level editor by clicking on the corresponding button. In the level editor you can create your own levels. Choose one of the editing tools on the left side to modify the map cells of the currently active level in the editor: Cross: Clear a map cell completely Horizontal Wall: Set/remove a horizontal wall on the lower edge of a cell Vertical Wall: Set/remove a vertical wall on the right edge of a cell Hole: Set/remove a hole on a cell Ball: Set the starting position of the ball Door: Set the door position Contact: Set/remove a contact button. With the spin-box you can adjust the value of the contact button. It is not possible to set a value more than once on a map. All tools (except the clear-tool) toggle their respective target on the clicked cell: An item can be placed by clicking on an empty cell, and by clicking again on the same cell with the same tool, you can remove it again. You can test a modified level by clicking on the 'Test' button on the right side of the editor view. You can return from testing mode by clicking on the home-button on the bar or by pressing escape on your keyboard or the back-button on your mobile device. In the editor you can change the level currently edited by using the arrow buttons on the bar. Back in the editor you can continue editing the current level and test it again if needed. When your level is finished you can save it to the user level file by clicking on the 'Save' button on the right side. To return to the configuration dialog click on the home-button on the bar or press Escape on your keyboard or the back button on your mobile device.") credit: "" section: "mobile fun" enabled: ApplicationInfo.isBox2DInstalled && (!ApplicationInfo.isMobile || ApplicationInfo.sensorIsSupported("QTiltSensor")) createdInVersion: 5000 } diff --git a/src/activities/ballcatch/ActivityInfo.qml b/src/activities/ballcatch/ActivityInfo.qml index 073fb172e..160c1fbf1 100644 --- a/src/activities/ballcatch/ActivityInfo.qml +++ b/src/activities/ballcatch/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "ballcatch/Ballcatch.qml" difficulty: 1 icon: "ballcatch/ballcatch.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Make the ball go to Tux") //: Help title description: qsTr("Press the left and right arrow keys at the same time, to make the ball go in a straight line.") // intro: "Press the left and right arrow key at the same time to send the ball straight on" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Press the left and right arrow at the same time, to make the ball go in a straight line. On a touch screen you have to hit the two hands at the same time.") credit: "" section: "computer keyboard" createdInVersion: 0 } diff --git a/src/activities/bargame/ActivityInfo.qml b/src/activities/bargame/ActivityInfo.qml index 31e81653b..87cb09767 100644 --- a/src/activities/bargame/ActivityInfo.qml +++ b/src/activities/bargame/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 UTKARSH TIWARI * * 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: "bargame/Bargame.qml" difficulty: 1 icon: "bargame/bargame.svg" author: "Utkarsh Tiwari <iamutkarshtiwari@kde.org>" - demo: true //: Activity title title: qsTr("Bargame (against Tux)") //: Help title description: qsTr("Click the number of balls you wish to place in the holes and then click the OK button. The winner is the one who hasn't put a ball in the red hole.") // intro: "Click the number of balls you wish to place in the holes and then click the OK button. The winner is the one who hasn't put a ball in the red hole." //: Help goal goal: qsTr("Don't put the ball in the last hole") //: Help prerequisite prerequisite: qsTr("Ability to count") //: Help manual manual: qsTr("Place balls in the holes. You win if the computer has to place the last ball. If you want Tux to begin, just click on him") credit: "" section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/bargame_2players/ActivityInfo.qml b/src/activities/bargame_2players/ActivityInfo.qml index e1467d601..162e1842b 100644 --- a/src/activities/bargame_2players/ActivityInfo.qml +++ b/src/activities/bargame_2players/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 UTKARSH TIWARI * * 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: "bargame_2players/Bargame2players.qml" difficulty: 2 icon: "bargame_2players/bargame_2players.svg" author: "Utkarsh Tiwari <iamutkarshtiwari@kde.org>" - demo: true //: Activity title title: qsTr("Bargame (with a friend)") //: Help title description: qsTr("Click the number of balls you wish to place in the holes and then click the OK button. The winner is the one who hasn't put a ball in the red hole.") // intro: "Click the number of balls you wish to place in the holes and then click the OK button. The winner is the one who hasn't put a ball in the red hole." //: Help goal goal: qsTr("Don't put the ball in the last hole") //: Help prerequisite prerequisite: qsTr("Ability to count") //: Help manual manual: qsTr("Place balls in the holes. You win if your friend has to place the last ball.") credit: "" section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/binary_bulb/ActivityInfo.qml b/src/activities/binary_bulb/ActivityInfo.qml index 85d3a9345..373455b9e 100644 --- a/src/activities/binary_bulb/ActivityInfo.qml +++ b/src/activities/binary_bulb/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Rajat Asthana * * 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: "binary_bulb/BinaryBulb.qml" difficulty: 3 icon: "binary_bulb/binary_bulb.svg" author: "Rajat Asthana <rajatasthana4@gmail.com>" - demo: true //: Activity title title: qsTr("Binary bulbs") //: Help title description: qsTr("This activity helps you to learn the concept of conversion of decimal number system to binary number system.") //intro: "Turn on the right bulbs to represent the binary of the given decimal number. When you have achieved it, press OK" //: Help goal goal: qsTr("To get familiar with the binary number system") //: Help prerequisite prerequisite: qsTr("Decimal number system") //: Help manual manual: qsTr("Turn on the right bulbs to represent the binary of the given decimal number. When you have achieved it, press OK.") credit: "" section: "sciences experiment" createdInVersion: 9500 } diff --git a/src/activities/braille_alphabets/ActivityInfo.qml b/src/activities/braille_alphabets/ActivityInfo.qml index 382815280..b345c4082 100644 --- a/src/activities/braille_alphabets/ActivityInfo.qml +++ b/src/activities/braille_alphabets/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Arkit Vora * * 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: "braille_alphabets/BrailleAlphabets.qml" difficulty: 5 icon: "braille_alphabets/braille_alphabets.svg" author: "Arkit Vora <arkitvora123@gmail.com>" - demo: true //: Activity title title: qsTr("Discover the Braille system") //: Help title description: qsTr("Learn and memorize the Braille system") //intro: "Click on Tux to start and then re-create the Braille cells." //: Help goal goal: qsTr("Let children discover the Braille system.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("The screen has 3 sections: an interactive braille cell, an instruction telling you the letter to reproduce, " + "and at the top the Braille letters to use as a reference. Each level teaches a set of 10 letters.") credit: "" section: "reading letters braille" createdInVersion: 0 } diff --git a/src/activities/braille_fun/ActivityInfo.qml b/src/activities/braille_fun/ActivityInfo.qml index 1fafde044..a8d39a1e5 100644 --- a/src/activities/braille_fun/ActivityInfo.qml +++ b/src/activities/braille_fun/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Arkit Vora * * 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: "braille_fun/BrailleFun.qml" difficulty: 6 icon: "braille_fun/braille_fun.svg" author: "Arkit Vora <arkitvora123@gmail.com>" - demo: true //: Activity title title: qsTr("Braille Fun") //: Help title description: qsTr("Braille the letters") //intro: "Create the Braille cell for the letter." //: Help goal goal: "" //: Help prerequisite prerequisite: qsTr("Braille Alphabet Codes") //: Help manual manual: qsTr("Enter the braille code in the tile for the letters on the banner pulled by Tux in his plane across the screen. Check the braille chart by clicking on the toggle button for help.") credit: "" section: "reading braille letters" createdInVersion: 4000 } diff --git a/src/activities/calendar/ActivityInfo.qml b/src/activities/calendar/ActivityInfo.qml index 44df7af7e..d83baaba4 100644 --- a/src/activities/calendar/ActivityInfo.qml +++ b/src/activities/calendar/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Amit Sagtani * * 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: "calendar/Calendar.qml" difficulty: 4 icon: "calendar/calendar.svg" author: "Amit Sagtani <asagtani06@gmail.com>" - demo: true //: Activity title title: qsTr("Calendar") //: Help title description: qsTr("Read the instructions and select the correct date on the calendar") //intro: "Select the asked date on the calendar" //: Help goal goal: qsTr("Learn how to use a calendar") //: Help prerequisite prerequisite: qsTr("Concept of week, month and year") //: Help manual manual: qsTr("Read the instructions and select the correct date on the calendar.") credit: "" section: "math measures" createdInVersion: 9000 } diff --git a/src/activities/canal_lock/ActivityInfo.qml b/src/activities/canal_lock/ActivityInfo.qml index db10c3ab2..f77163719 100644 --- a/src/activities/canal_lock/ActivityInfo.qml +++ b/src/activities/canal_lock/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "canal_lock/CanalLock.qml" difficulty: 2 icon: "canal_lock/canal_lock.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Operate a canal lock") //: Help title description: qsTr("Tux is in trouble, and needs to take his boat through a lock. Help Tux and find out how a canal lock works.") //intro: "You are responsible for the lock and you must help Tux pass through. Click on the valves to cause either a drop or an increase in the water level, and click on the gates to open or close a path." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("You are in charge of the canal lock. Open the gates and the locks in the right order, so Tux can travel through the gates in both directions.") credit: qsTr("Drawing by Stephane Cabaraux.") section: "sciences experiment" createdInVersion: 0 } diff --git a/src/activities/categorization/ActivityInfo.qml b/src/activities/categorization/ActivityInfo.qml index 4ca53827b..5db2e37f2 100644 --- a/src/activities/categorization/ActivityInfo.qml +++ b/src/activities/categorization/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Divyam Madaan * * 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: "categorization/Categorization.qml" difficulty: 4 icon: "categorization/categorization.svg" author: "Divyam Madaan <divyam3897@gmail.com>" - demo: true //: Activity title title: qsTr("Categorization") //: Help title description: qsTr("Categorize the elements into correct and incorrect groups") //intro: "Categorize the elements into the correct group" //: Help goal goal: qsTr("Build conceptual thinking and enrich knowledge") //: Help prerequisite prerequisite: qsTr("Can drag elements using mouse") //: Help manual manual: qsTr("Review the instructions and then drag and drop the elements as specified") credit: "" section: "reading vocabulary" createdInVersion: 8000 } diff --git a/src/activities/checkers/ActivityInfo.qml b/src/activities/checkers/ActivityInfo.qml index 2555aaa4d..f4560785a 100644 --- a/src/activities/checkers/ActivityInfo.qml +++ b/src/activities/checkers/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Johnny Jazeix * * 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: "checkers/Checkers.qml" difficulty: 4 icon: "checkers/checkers.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Play checkers against the computer") //: Help title description: qsTr("The version in GCompris is the international draughts.") //intro: "play checkers against the computer" //: Help goal goal: qsTr("Capture all the pieces of your opponent before your opponent captures all of yours.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Checkers is played by two opponents, on opposite sides of the gameboard. One player has the dark pieces; the other has the light pieces. Players alternate turns. A player may not move an opponent's piece. A move consists of moving a piece diagonally to an adjacent unoccupied square. If the adjacent square contains an opponent's piece, and the square immediately beyond it is vacant, the piece may be captured (and removed from the game) by jumping over it. Only the dark squares of the checkered board are used. A piece may move only diagonally into an unoccupied square. Capturing is mandatory. The player without pieces remaining, or who cannot move due to being blocked, loses the game. When a man reaches the crownhead or kings row (the farthest row forward), it becomes a king, and is marked by placing an additional piece on top of the first man, and acquires additional powers including the ability to move backwards. If there is a piece in a diagonal that a king can capture, he can move any distance along the diagonal, and may capture an opposing man any distance away by jumping to any of the unoccupied squares immediately beyond it. ") credit: qsTr("The checkers library is draughts.js <https://github.com/shubhendusaurabh/draughts.js>. Manual is from wikipedia <https://en.wikipedia.org/wiki/Draughts>") section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/checkers_2players/ActivityInfo.qml b/src/activities/checkers_2players/ActivityInfo.qml index 35ff9b66b..27a154a11 100644 --- a/src/activities/checkers_2players/ActivityInfo.qml +++ b/src/activities/checkers_2players/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Johnny Jazeix * * 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: "checkers_2players/Checkers2Players.qml" difficulty: 4 icon: "checkers_2players/checkers_2players.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Play checkers with your friend") //: Help title description: qsTr("The version in GCompris is the international draughts.") //intro: "play checkers with your friend" //: Help goal goal: qsTr("Capture all the pieces of your opponent before your opponent captures all of yours.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Checkers is played by two opponents, on opposite sides of the gameboard. One player has the dark pieces; the other has the light pieces. Players alternate turns. A player may not move an opponent's piece. A move consists of moving a piece diagonally to an adjacent unoccupied square. If the adjacent square contains an opponent's piece, and the square immediately beyond it is vacant, the piece may be captured (and removed from the game) by jumping over it. Only the dark squares of the checkered board are used. A piece may move only diagonally into an unoccupied square. Capturing is mandatory. The player without pieces remaining, or who cannot move due to being blocked, loses the game. When a man reaches the crownhead or kings row (the farthest row forward), it becomes a king, and is marked by placing an additional piece on top of the first man, and acquires additional powers including the ability to move backwards. If there is a piece in a diagonal that a king can capture, he can move any distance along the diagonal, and may capture an opposing man any distance away by jumping to any of the unoccupied squares immediately beyond it. ") credit: qsTr("The checkers library is draughts.js <https://github.com/shubhendusaurabh/draughts.js>. Manual is from wikipedia <https://en.wikipedia.org/wiki/Draughts>") section: "strategy" createdInVersion: 8000 } diff --git a/src/activities/chess/ActivityInfo.qml b/src/activities/chess/ActivityInfo.qml index e3fce19d1..1719e1b13 100644 --- a/src/activities/chess/ActivityInfo.qml +++ b/src/activities/chess/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "chess/Chess.qml" difficulty: 6 icon: "chess/chess.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Play chess against Tux") //: Help title description: "" //intro: "play chess against Tux" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("In this activity you discover the chess game by playing against the computer. It displays the possible target position for any selected piece which helps the children understand how pieces moves. At first level the computer is fully random to give the most chances to the children. As level increases, better the computer plays. \nYou can achieve a mate sooner if follow these simple rules: Trying to drive opponent's King in the corner. Explanation: this way opponent's piece would have only 3 directions to move instead of 8 from a best position. 'Making a trap'. Use your pawns as baits. Explanation: this way you can lure the opponent out of his 'comfort zone'. Be patient enough. Explanation: don't rush too quick, be patient. Let yourself think a little bit and try to predict your opponent's future moves, so you can catch him on it or secure your pieces from his attacks.") credit: qsTr("The chess engine is p4wn <https://github.com/douglasbagnall/p4wn>.") section: "strategy" createdInVersion: 5000 } diff --git a/src/activities/chess_2players/ActivityInfo.qml b/src/activities/chess_2players/ActivityInfo.qml index 75c7cde0f..a1c05bbb8 100644 --- a/src/activities/chess_2players/ActivityInfo.qml +++ b/src/activities/chess_2players/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "chess_2players/Chess2Players.qml" difficulty: 6 icon: "chess_2players/chess_2players.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Play chess against your friend") //: Help title description: "" //intro: "play chess against your friend" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("In this activity you discover the chess game by playing against a friend. It displays the possible target position for any selected piece which helps the children understand how pieces moves. \nYou can achieve a mate sooner if follow these simple rules: Trying to drive opponent's King in the corner. Explanation: this way opponent's piece would have only 3 directions to move instead of 8 from a best position. 'Making a trap'. Use your pawns as baits. Explanation: this way you can lure the opponent out of his 'comfort zone'. Be patient enough. Explanation: don't rush too quick, be patient. Let yourself think a little bit and try to predict your opponent's future moves, so you can catch him on it or secure your pieces from his attacks.") credit: "" section: "strategy" createdInVersion: 5000 } diff --git a/src/activities/chess_partyend/ActivityInfo.qml b/src/activities/chess_partyend/ActivityInfo.qml index bf93022e7..546f3d280 100644 --- a/src/activities/chess_partyend/ActivityInfo.qml +++ b/src/activities/chess_partyend/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "chess_partyend/ChessPartyEnd.qml" difficulty: 6 icon: "chess_partyend/chess_partyend.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("End of chess game") //: Help title description: qsTr("Play the end of the chess game against Tux") //intro: "Click on a white chess piece and green boxes will appear to indicate all the movements that piece can make. Try and get the black king into checkmate." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("In this activity you discover the chess game by playing only the end of a game. It displays the possible target position for any selected piece which helps the children understand how pieces moves. \nYou can achieve a mate sooner if follow these simple rules: Trying to drive opponent's King in the corner. Explanation: this way opponent's piece would have only 3 directions to move instead of 8 from a best position. 'Making a trap'. Use your pawns as baits. Explanation: this way you can lure the opponent out of his 'comfort zone'. Be patient enough. Explanation: don't rush too quick, be patient. Let yourself think a little bit and try to predict your opponent's future moves, so you can catch him on it or secure your pieces from his attacks.") credit: qsTr("The chess engine is p4wn <https://github.com/douglasbagnall/p4wn>.") section: "strategy" createdInVersion: 5000 } diff --git a/src/activities/chronos/ActivityInfo.qml b/src/activities/chronos/ActivityInfo.qml index 4f5773e55..e8210383d 100644 --- a/src/activities/chronos/ActivityInfo.qml +++ b/src/activities/chronos/ActivityInfo.qml @@ -1,45 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "chronos/Chronos.qml" difficulty: 1 icon: "chronos/chronos.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Chronos") //: Help title description: qsTr("Drag and Drop the items to organize the story") // intro: "Slide the pictures into the order that tells the story" //: Help goal goal: qsTr("Sort the pictures into the order that tells the story") //: Help prerequisite prerequisite: qsTr("Tell a short story") //: Help manual manual: qsTr("Pick from the pictures on the left and put them on the red dots") credit: qsTr("Moon photo is copyright NASA. The space sounds come from Tuxpaint and Vegastrike which are released under the GPL license. The transportation images are copyright Franck Doucet. Dates of Transportation are based on those found in <https://www.wikipedia.org>.") section: "sciences history" createdInVersion: 4000 levels: "1,2" } diff --git a/src/activities/click_on_letter/ActivityInfo.qml b/src/activities/click_on_letter/ActivityInfo.qml index 09505f9f3..5fde2bdc0 100644 --- a/src/activities/click_on_letter/ActivityInfo.qml +++ b/src/activities/click_on_letter/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "click_on_letter/ClickOnLetter.qml" difficulty: 2 icon: "click_on_letter/click_on_letter.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Click on a lowercase letter") //: Help title description: qsTr("Listen to a letter and click on the right one") // intro: "Click on the required letter. You can listen to it again by clicking on the mouth." //: Help goal goal: qsTr("Letter-name recognition") //: Help prerequisite prerequisite: qsTr("Visual letter-recognition.") //: Help manual manual: qsTr("A letter is spoken. Click on the matching letter in the main area. You can listen to the letter again, by clicking on the mouth icon.") credit: "" section: "reading letters" createdInVersion: 0 } diff --git a/src/activities/click_on_letter_up/ActivityInfo.qml b/src/activities/click_on_letter_up/ActivityInfo.qml index fcd6d387a..5e44b5362 100644 --- a/src/activities/click_on_letter_up/ActivityInfo.qml +++ b/src/activities/click_on_letter_up/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "click_on_letter_up/ClickOnLetterUp.qml" difficulty: 2 icon: "click_on_letter_up/click_on_letter_up.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Click on an uppercase letter") //: Help title description: qsTr("Listen to a letter and click on the right one") // intro: "Click on the required letter. You can listen to it again by clicking on the mouth." //: Help goal goal: qsTr("Letter-name recognition") //: Help prerequisite prerequisite: qsTr("Visual letter-recognition.") //: Help manual manual: qsTr("A letter is spoken. Click on the matching letter in the main area. You can listen to the letter again, by clicking on the mouth icon in the bottom box.") credit: "" section: "reading letters" createdInVersion: 0 } diff --git a/src/activities/clickanddraw/ActivityInfo.qml b/src/activities/clickanddraw/ActivityInfo.qml index 2910afce7..5cfe4f15e 100644 --- a/src/activities/clickanddraw/ActivityInfo.qml +++ b/src/activities/clickanddraw/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Emmanuel Charruau * * 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: "clickanddraw/Clickanddraw.qml" difficulty: 1 icon: "clickanddraw/clickanddraw.svg" author: "Emmanuel Charruau <echarruau@gmail.com>" - demo: true //: Activity title title: qsTr("Click and draw") //: Help title description: qsTr("Draw the picture by clicking on the selected points.") // intro: "Click on the selected points and draw" //: Help goal goal: "" //: Help prerequisite prerequisite: qsTr("Can move the mouse and click accurately on points.") //: Help manual manual: qsTr("Draw the picture by clicking on each point in sequence. Each time a point is selected the next blue one appears.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/clickgame/ActivityInfo.qml b/src/activities/clickgame/ActivityInfo.qml index e6255d998..8a34a2a83 100644 --- a/src/activities/clickgame/ActivityInfo.qml +++ b/src/activities/clickgame/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "clickgame/Clickgame.qml" difficulty: 1 icon: "clickgame/clickgame.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Click On Me") //: Help title description: qsTr("Catch all the swimming fish before they leave the fish tank") // intro: "Catch the fish before they leave the aquarium." //: Help goal goal: qsTr("Motor coordination: moving the hand precisely.") //: Help prerequisite prerequisite: qsTr("Can move mouse and click on the correct place") //: Help manual manual: qsTr("Catch all the moving fish by simple clicking or touching them with your finger.") credit: qsTr("Fish are taken from the Unix utility xfishtank. All image credits belong to Guillaume Rousse.") section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/clockgame/ActivityInfo.qml b/src/activities/clockgame/ActivityInfo.qml index 3b7198fed..ca4f76b6d 100644 --- a/src/activities/clockgame/ActivityInfo.qml +++ b/src/activities/clockgame/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "clockgame/Clockgame.qml" difficulty: 2 icon: "clockgame/clockgame.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Learning Clock") //: Help title description: qsTr("Learn how to tell the time on an analog clock") // intro: "Drag and drop the needles of the clock to display the required time" //: Help goal goal: qsTr("Distinguish between time-units (hour, minute and second). Set and display time on an analog clock.") //: Help prerequisite prerequisite: qsTr("The concept of time.") //: Help manual manual: qsTr("Set the clock to the given time, in the time-units shown (hours:minutes or hours:minutes:seconds). Drag the different arrows, to make the respective time unit go up or down.") credit: "" section: "math measures" createdInVersion: 0 levels: "1,2,3,4,5,6" } diff --git a/src/activities/color_mix/ActivityInfo.qml b/src/activities/color_mix/ActivityInfo.qml index c53b6084c..1cb9ae279 100644 --- a/src/activities/color_mix/ActivityInfo.qml +++ b/src/activities/color_mix/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "color_mix/ColorMix.qml" difficulty: 4 icon: "color_mix/color_mix.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Mixing color of paint") //: Help title description: qsTr("Discover paint color mixing.") // intro: "Match the colour by moving the sliders on the tubes of paint" //: Help goal goal: qsTr("Mix the primary colors to match to the given color") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr(" The activity deals with mixing primary colors of paint (subtractive mixing). In case of paints the inks absorb different colors of light falling on it, subtracting it from what you see. The more ink you add, the more light is absorbed, and the darker the combined color gets. We can mix just three primary colors to make many new colors. The primary colors for paint/ink are cyan (a special shade of blue), magenta (a special shade of pink), and yellow. ") credit: qsTr("Images from https://openclipart.org") section: "sciences experiment color" createdInVersion: 0 } diff --git a/src/activities/color_mix_light/ActivityInfo.qml b/src/activities/color_mix_light/ActivityInfo.qml index b313af1d9..599601715 100644 --- a/src/activities/color_mix_light/ActivityInfo.qml +++ b/src/activities/color_mix_light/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "color_mix_light/ColorMixLight.qml" difficulty: 4 icon: "color_mix_light/color_mix_light.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Mixing colors of light") //: Help title description: qsTr("Discover light color mixing.") // intro: "Match the colour by moving the sliders on the torches" //: Help goal goal: qsTr("Mix the primary colors to match to the given color.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr(" The activity deals with mixing primary colors of light (additive mixing). In case of light it is just the opposite of mixing color with paints! The more light you add the lighter the resultant color will get. Primary colors of light are red, green and blue.") credit: qsTr("Images from https://openclipart.org") section: "sciences experiment color" createdInVersion: 0 } diff --git a/src/activities/colors/ActivityInfo.qml b/src/activities/colors/ActivityInfo.qml index 09d704896..25febc5dd 100644 --- a/src/activities/colors/ActivityInfo.qml +++ b/src/activities/colors/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "colors/Colors.qml" difficulty: 1 icon: "colors/colors.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Colors") //: Help title description: qsTr("Click on the right color") // intro: "Click on the right color" //: Help goal goal: qsTr("This activity teaches you to recognize different colors. When you hear the name of the color, touch the duck wearing it.") //: Help prerequisite prerequisite: qsTr("Identifying colours") //: Help manual manual: qsTr("Listen to the color and touch the matching duck.") credit: "" section: "reading color vocabulary" createdInVersion: 0 } diff --git a/src/activities/crane/ActivityInfo.qml b/src/activities/crane/ActivityInfo.qml index a6d587f31..4a0175d21 100644 --- a/src/activities/crane/ActivityInfo.qml +++ b/src/activities/crane/ActivityInfo.qml @@ -1,45 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Stefan Toncu * * Authors: * (GTK+ version) * Stefan Toncu (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 GCompris 1.0 ActivityInfo { name: "crane/Crane.qml" difficulty: 2 icon: "crane/crane.svg" author: "Stefan Toncu <stefan.toncu29@gmail.com>" - demo: true //: Activity title title: qsTr("Build the same model") //: Help title description: qsTr("Drive the crane and copy the model") //intro: " Click on each item in turn, in the left frame, and move them to reproduce the pattern from the right frame." //: Help goal goal: qsTr("Motor-coordination") //: Help prerequisite prerequisite: qsTr("Mouse/keyboard manipulation") //: Help manual manual: qsTr("Move the items in the left frame to copy their position in the right model. Next to the crane itself, you will find four arrows that let you move the items. To select the item to move, just click on it. If you prefer, you can use the arrow keys and the space or tab key instead. On a mobile version, you can also swipe up/down/left/right to move the items in the left frame.") credit: "" section: "puzzle" createdInVersion: 7000 } diff --git a/src/activities/details/ActivityInfo.qml b/src/activities/details/ActivityInfo.qml index 3ead83eec..91db02d27 100644 --- a/src/activities/details/ActivityInfo.qml +++ b/src/activities/details/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "details/Details.qml" difficulty: 1 icon: "details/details.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Find the details") //: Help title description: qsTr("Drag and Drop the shapes on their respective targets") // intro: "Slide the images on their respective targets" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Complete the puzzle by dragging each piece from the set of pieces on the left, to the matching space in the puzzle.") credit: qsTr("The images are from Wikimedia Commons.") section: "discovery arts" createdInVersion: 4000 } diff --git a/src/activities/digital_electricity/ActivityInfo.qml b/src/activities/digital_electricity/ActivityInfo.qml index bc2723e13..5910b5690 100644 --- a/src/activities/digital_electricity/ActivityInfo.qml +++ b/src/activities/digital_electricity/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Pulkit Gupta * * 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: "digital_electricity/DigitalElectricity.qml" difficulty: 6 icon: "digital_electricity/digital_electricity.svg" author: "Pulkit Gupta <pulkitnsit@gmail.com>" - demo: true //: Activity title title: qsTr("Digital Electricity") //: Help title description: qsTr("Create and simulate a digital electric schema") //intro: "Learn how digital electronics work and create your own circuit." //: Help goal goal: qsTr("Freely create a digital electric schema with a real time simulation of it.") //: Help prerequisite prerequisite: qsTr("Requires some basic understanding of the concept of digital electronics.") //: Help manual manual: qsTr("Drag electrical components from the selector and drop them in the working area. In the working area, you can move the components by dragging them. To delete a component, select the deletion tool on top of the component selector, and select the component. You can click on the component and then on the rotate button to rotate it or info button to get information about it. You can click on the switch to open and close it. To connect two terminals, click on first terminal, then on second terminal. To deselect terminal or delete tool, click on any empty area. The simulation is updated in real time by any user action.") credit: "" section: "sciences experiment" createdInVersion: 9000 } diff --git a/src/activities/drawletters/ActivityInfo.qml b/src/activities/drawletters/ActivityInfo.qml index 263e20428..4a67760f9 100644 --- a/src/activities/drawletters/ActivityInfo.qml +++ b/src/activities/drawletters/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Nitish Chauhan * * 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/Drawletters.qml" difficulty: 1 icon: "drawletters/drawletters.svg" author: "Nitish Chauhan <nitish.nc18@gmail.com>" - demo: true //: Activity title title: qsTr("Draw Letters") //: Help title description: qsTr("Connect the dots to draw letters") // intro: "Click on the selected points and draw the letter" //: 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/drawnumbers/ActivityInfo.qml b/src/activities/drawnumbers/ActivityInfo.qml index e8fb9f829..99479e957 100644 --- a/src/activities/drawnumbers/ActivityInfo.qml +++ b/src/activities/drawnumbers/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Nitish Chauhan * * 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: "drawnumbers/Drawnumbers.qml" difficulty: 1 icon: "drawnumbers/drawnumbers.svg" author: "Nitish Chauhan <nitish.nc18@gmail.com>" - demo: true //: Activity title title: qsTr("Draw Numbers") //: Help title description: qsTr("Connect the dots to draw numbers from 0 to 9") // intro: "Draw the numbers by connecting the dots in the correct order." //: Help goal goal: qsTr("Learning how to draw the numbers in a funny way.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Draw the numbers by connecting the dots in the correct order") credit: "" section: "math numeration" createdInVersion: 7000 } diff --git a/src/activities/enumerate/ActivityInfo.qml b/src/activities/enumerate/ActivityInfo.qml index 3e966fe39..96fda91f7 100644 --- a/src/activities/enumerate/ActivityInfo.qml +++ b/src/activities/enumerate/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Thib ROMAIN * * 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: "enumerate/Enumerate.qml" difficulty: 2 icon: "enumerate/enumerate.svg" author: "Thib ROMAIN <thibrom@gmail.com>" - demo: true //: Activity title title: qsTr("Count the items") //: Help title description: qsTr("Place the items in the best way to count them") // intro: "Count the elements by organising them then type the answer on your keyboard." //: Help goal goal: qsTr("Numeration training") //: Help prerequisite prerequisite: qsTr("Basic enumeration") //: Help manual manual: qsTr("First, properly organize the items so that you can count them. Then, select the item you want to answer in the top left area. Enter the answer with the keyboard.") credit: "" section: "math numeration" createdInVersion: 0 levels: "1,2,3,4" } diff --git a/src/activities/erase/ActivityInfo.qml b/src/activities/erase/ActivityInfo.qml index ee7a6d35e..504d273c9 100644 --- a/src/activities/erase/ActivityInfo.qml +++ b/src/activities/erase/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "erase/Erase.qml" difficulty: 1 icon: "erase/erase.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Move the mouse or touch the screen") //: Help title description: qsTr("Move the mouse or touch the screen to erase the area and discover the background") // intro: " Clear the window with your sponge and discover the hidden picture." //: Help goal goal: qsTr("Motor-coordination") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Move the mouse or touch the screen until all the blocks disappear.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/erase_2clic/ActivityInfo.qml b/src/activities/erase_2clic/ActivityInfo.qml index de308d6c9..876247a30 100644 --- a/src/activities/erase_2clic/ActivityInfo.qml +++ b/src/activities/erase_2clic/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "erase_2clic/Erase2clic.qml" difficulty: 2 icon: "erase_2clic/erase_2clic.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Double tap or double click") //: Help title description: qsTr("Double tap or double click to erase the area and discover the background image") // intro: "Double tap or double click on the bricks to discover the hidden picture" //: Help goal goal: qsTr("Motor-coordination") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Double tap or double click the mouse on rectangles until all the blocks disappear.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/erase_clic/ActivityInfo.qml b/src/activities/erase_clic/ActivityInfo.qml index d9c7cbfd5..5dfef5ff9 100644 --- a/src/activities/erase_clic/ActivityInfo.qml +++ b/src/activities/erase_clic/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "erase_clic/EraseClic.qml" difficulty: 1 icon: "erase_clic/erase_clic.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Click or tap") //: Help title description: qsTr("Click or tap to erase the area and discover the background") // intro: "Click or tap on the transparent bricks and discover the hidden picture." //: Help goal goal: qsTr("Motor-coordination") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Click or tap on the blocks all of them disappear.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/explore_farm_animals/ActivityInfo.qml b/src/activities/explore_farm_animals/ActivityInfo.qml index d89534c27..7106081fb 100644 --- a/src/activities/explore_farm_animals/ActivityInfo.qml +++ b/src/activities/explore_farm_animals/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Djalil Mesli * * 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: "explore_farm_animals/ExploreFarmAnimals.qml" difficulty: 2 icon: "explore_farm_animals/explore_farm_animals.svg" author: "Djalil Mesli <djalilmesli@gmail.com>" - demo: true //: Activity title title: qsTr("Explore Farm Animals") //: Help title description: qsTr("Learn about farm animals, what sounds they make, and interesting facts.") // intro: "Learn about farmyard animals and the noises that they make." //: Help goal goal: qsTr("Learn to associate animal sounds with the animal name and what the animal looks like.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("There are three levels in this game. In level one, players enjoy exploring each animal on the screen. Click on an animal and learn about it, what its name is, what sound it makes, and what it looks like. Study well this information, because you will be tested in level 2 and 3! In level two, a random animal sound is played and you must find which animal makes this sound. Click on the corresponding animal. If you'd like to hear the animal sound repeated, click on the play button. When you have matched all animals correctly, you win! In level three, a random text prompt is displayed and you must click on the animal that matches the text. When you have matched all texts correctly, you win! ") credit: "" section: "sciences experiment" createdInVersion: 0 } diff --git a/src/activities/explore_monuments/ActivityInfo.qml b/src/activities/explore_monuments/ActivityInfo.qml index 497e122a0..ba13a32d3 100644 --- a/src/activities/explore_monuments/ActivityInfo.qml +++ b/src/activities/explore_monuments/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Ayush Agrawal * * 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: "explore_monuments/Explore_monuments.qml" difficulty: 3 icon: "explore_monuments/explore_monuments.svg" author: "Ayush Agrawal <ayushagrawal288@gmail.com>" - demo: true //: Activity title title: qsTr("Explore Monuments") //: Help title description: qsTr("Explore Monuments around the world.") //intro: "Explore Monuments around the world." //: Help goal goal: qsTr("Learn about various monuments from around the world and remember their location.") //: Help prerequisite prerequisite: qsTr("Knowledge of different monuments.") //: Help manual manual: qsTr("Click on the given keys to learn more of the monuments and then identify where the monuments is on the map by its name.") credit: qsTr("Photos taken from Wikipedia.") section: "discovery arts" createdInVersion: 6000 } diff --git a/src/activities/explore_world_animals/ActivityInfo.qml b/src/activities/explore_world_animals/ActivityInfo.qml index de18f36cf..e081dd0d4 100644 --- a/src/activities/explore_world_animals/ActivityInfo.qml +++ b/src/activities/explore_world_animals/ActivityInfo.qml @@ -1,49 +1,48 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * Authors: * Beth Hadley (GTK+ version) * Johnny Jazeix (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 GCompris 1.0 ActivityInfo { name: "explore_world_animals/ExploreWorldAnimals.qml" difficulty: 4 icon: "explore_world_animals/explore_world_animals.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Explore World Animals") //: Help title description: qsTr("Learn about world animals, interesting facts and their location on a map.") // intro: "Learn about world animals and locate them on a map." //: Help goal goal: "Learn about various wild animals from around the world and remember where they live." //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("There are two levels in this game. In level one, players enjoy exploring each animal on the screen. Click on the question mark, and learn about the animal, what it's name is, and what it looks like. Study well this information, because you will be tested in level 2! In level two, a random text prompt is displayed and you must click on the animal that matches the text. When you have matched all texts correctly, you win! ") credit: "" section: "sciences experiment" createdInVersion: 0 } diff --git a/src/activities/explore_world_music/ActivityInfo.qml b/src/activities/explore_world_music/ActivityInfo.qml index f70c94157..0f06f579e 100644 --- a/src/activities/explore_world_music/ActivityInfo.qml +++ b/src/activities/explore_world_music/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "explore_world_music/ExploreWorldMusic.qml" difficulty: 4 icon: "explore_world_music/explore_world_music.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Explore World Music") //: Help title description: qsTr("Learn about the music of the world.") // intro: "Click on the suitcases to learn about music from around the world." //: Help goal goal: qsTr("Develop a better understanding of the variety of music present in the world.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("There are three levels in this activity. In the first level, enjoy exploring music from around the world. Click on each suitcase to learn about the music from that area, and listen to a short sample. Study well, because there will be two games related to this information next! The second level is a matching game. You will hear a clip of music, and you must select the location that corresponds to that music. Click the play button if you'd like to hear the music again. You win the level when you have correctly matched all sound clips. The third level is also a matching game. You must select the location that matches the text description on the screen. You win the level when you have correctly matched all text prompts. ") credit: qsTr("Images from https://commons.wikimedia.org/wiki, https://archive.org") section: "discovery music" createdInVersion: 0 } diff --git a/src/activities/family/ActivityInfo.qml b/src/activities/family/ActivityInfo.qml index 535d46c45..57fd81a9e 100644 --- a/src/activities/family/ActivityInfo.qml +++ b/src/activities/family/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Rajdeep Kaur * * 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: 2 icon: "family/family.svg" author: "Rajdeep Kaur <rajdeep.kaur@kde.org>" - demo: true //: Activity title title: qsTr("Family") //: Help title description: qsTr("Select the name you should call this family member") //intro: "Let us understand what to call our relatives" //: Help goal goal: qsTr("Learn the relationships in a family, according to the lineal system used in most Western societies") //: Help prerequisite prerequisite: qsTr("Reading skills") //: Help manual manual: qsTr("A family tree is shown.\n" + "The circles are linked with lines to mark the relations. Married couples are marked with a ring on the link.\n" + "You are the person in the white circle. Select the name you should call the person in the orange circle.\n") credit: "" section: "sciences history" createdInVersion: 9000 } diff --git a/src/activities/family_find_relative/ActivityInfo.qml b/src/activities/family_find_relative/ActivityInfo.qml index cd61797aa..085734f20 100644 --- a/src/activities/family_find_relative/ActivityInfo.qml +++ b/src/activities/family_find_relative/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Rudra Nil Basu * * 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_find_relative/Family_find_relative.qml" difficulty: 2 icon: "family_find_relative/family_find_relative.svg" author: "Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>" - demo: true //: Activity title title: qsTr("Point the relatives") //: Help title description: qsTr("Click on a pair corresponding to the given relation") //intro: "Click on a pair that defines the given relation" //: Help goal goal: qsTr("Learn the relationships in a family, according to the lineal system used in most Western societies") //: Help prerequisite prerequisite: qsTr("Reading, moving and clicking with the mouse") //: Help manual manual: qsTr("A family tree is shown, with some instructions.\n" + "The circles are linked with lines to mark the relations. Married couples are marked with a ring on the link.\n" + "Click on a pair of family members which corresponds to the given relation.") credit: "" section: "sciences history" createdInVersion: 9000 } diff --git a/src/activities/fifteen/ActivityInfo.qml b/src/activities/fifteen/ActivityInfo.qml index ffc85e014..089addb7f 100644 --- a/src/activities/fifteen/ActivityInfo.qml +++ b/src/activities/fifteen/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "fifteen/Fifteen.qml" difficulty: 5 icon: "fifteen/fifteen.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("The fifteen game") //: Help title description: qsTr("Move each item to recreate the image.") //intro: "Click or drag an element next to a free space, the element will move and release its space. You must put all the pieces in the correct order. The numbers on the pieces can help you." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click or drag on any pieces that has a free block beside it, and it will be swapped with the empty one.") credit: "" section: "discovery logic" createdInVersion: 0 } diff --git a/src/activities/find_the_day/ActivityInfo.qml b/src/activities/find_the_day/ActivityInfo.qml index 99c75ac0f..d24d81b05 100644 --- a/src/activities/find_the_day/ActivityInfo.qml +++ b/src/activities/find_the_day/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Amit Sagtani * * 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: "find_the_day/FindTheDay.qml" difficulty: 6 icon: "find_the_day/find_the_day.svg" author: "Amit Sagtani <asagtani06@gmail.com>" - demo: true //: Activity title title: qsTr("Find the day") //: Help title description: qsTr("Find the correct date and select it on the calendar.") //intro: "Select the required day." //: Help goal goal: qsTr("Learn how to count days and find a date on a calendar.") //: Help prerequisite prerequisite: qsTr("Basics of calendar") //: Help manual manual: qsTr("Read the instructions and perform the requested calculation to find a date. Then select this date on the calendar.") credit: "" section: "math measures" createdInVersion: 9000 } diff --git a/src/activities/followline/ActivityInfo.qml b/src/activities/followline/ActivityInfo.qml index e558be6da..66967b89d 100644 --- a/src/activities/followline/ActivityInfo.qml +++ b/src/activities/followline/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "followline/Followline.qml" difficulty: 1 icon: "followline/followline.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Control the hose-pipe") //: Help title description: qsTr("The fireman needs to stop the fire, but the hose is blocked.") // intro: " Move the mouse or your finger along the pipe to stop the fire." //: Help goal goal: qsTr("Fine motor coordination") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Move the mouse or your finger over the lock which is represented as a red part in the hose-pipe. This will move it, bringing it, part by part, up to the fire. Be careful, if you move off the hose, the lock will go backward.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/football/ActivityInfo.qml b/src/activities/football/ActivityInfo.qml index b3e9c8c2d..110694a71 100644 --- a/src/activities/football/ActivityInfo.qml +++ b/src/activities/football/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "football/Football.qml" difficulty: 1 icon: "football/football.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("The football game") //: Help title description: qsTr("Kick the ball into the goal") // intro: "Drag a line from the ball to set the speed and direction of your kick." //: Help goal goal: qsTr("Kick the ball behind the goal keeper on the right") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Drag a line from the ball, to set its speed and direction.") credit: "" section: "fun" createdInVersion: 0 } diff --git a/src/activities/geo-country/ActivityInfo.qml b/src/activities/geo-country/ActivityInfo.qml index 5ce202320..310f6e388 100644 --- a/src/activities/geo-country/ActivityInfo.qml +++ b/src/activities/geo-country/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "geo-country/GeoCountry.qml" difficulty: 2 icon: "geo-country/geo-country.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Locate the region") //: Help title description: qsTr("Drag and Drop the regions to redraw the whole country") // intro: "Drag and drop the regions to complete the country maps." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Drag and drop different regions of the country to correct locations to redraw the whole country.") credit: "" section: "sciences geography" createdInVersion: 4000 } diff --git a/src/activities/geography/ActivityInfo.qml b/src/activities/geography/ActivityInfo.qml index 3a21ee78e..c740744d7 100644 --- a/src/activities/geography/ActivityInfo.qml +++ b/src/activities/geography/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "geography/Geography.qml" difficulty: 2 icon: "geography/geography.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Locate the countries") //: Help title description: qsTr("Drag and Drop the items to redraw the whole map") // intro: "Drag and drop the objects to complete the map." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Drag and drop the map pieces to correct locations to redraw the whole map.") credit: "" section: "sciences geography" createdInVersion: 4000 } diff --git a/src/activities/gletters/ActivityInfo.qml b/src/activities/gletters/ActivityInfo.qml index 08af48ca2..4e6666fff 100644 --- a/src/activities/gletters/ActivityInfo.qml +++ b/src/activities/gletters/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "gletters/Gletters.qml" difficulty: 2 icon: "gletters/gletters.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Simple Letters") //: Help title description: qsTr("Type the falling letters before they reach the ground") // intro: "Type the letters on your keyboard before they reach the ground." //: Help goal goal: qsTr("Letter association between the screen and the keyboard") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Type the falling letters before they reach the ground") credit: "" section: "computer keyboard reading letters" createdInVersion: 0 } diff --git a/src/activities/gnumch-equality/ActivityInfo.qml b/src/activities/gnumch-equality/ActivityInfo.qml index e97325bf9..cd48fd8a5 100644 --- a/src/activities/gnumch-equality/ActivityInfo.qml +++ b/src/activities/gnumch-equality/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * 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: "gnumch-equality/GnumchEquality.qml" difficulty: 3 icon: "gnumch-equality/gnumch-equality.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" - demo: true //: Activity title title: qsTr("Gnumch Equality") //: Help title description: qsTr("Guide the Number Muncher to the expressions that equal the number at the bottom of the screen.") // intro: "Guide the number eater with the arrow keys to the required numbers and press the space bar to swallow them." //: Help goal goal: qsTr("Practice addition, multiplication, division and subtraction.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Guide the Number Muncher to the expressions that equal the number at the bottom of the screen.") + "

" + qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math arithmetic" createdInVersion: 0 } diff --git a/src/activities/gnumch-factors/ActivityInfo.qml b/src/activities/gnumch-factors/ActivityInfo.qml index 84586a792..68ce457f7 100644 --- a/src/activities/gnumch-factors/ActivityInfo.qml +++ b/src/activities/gnumch-factors/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * 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: "gnumch-factors/GnumchFactors.qml" difficulty: 5 icon: "gnumch-factors/gnumch-factors.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" - demo: true //: Activity title title: qsTr("Gnumch Factors") //: Help title description: qsTr("Guide the Number Muncher to all the factors of the number at the bottom of the screen.") // intro: "Guide the number eater with the arrow keys to the factors of the displayed number and press space to swallow them." //: Help goal goal: qsTr("Learn about multiples and factors.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("The factors of a number are all the numbers that divide that number evenly. For example, the factors of 6 are 1, 2, 3 and 6. 4 is not a factor of 6 because 6 cannot be divided into 4 equal pieces. If one number is a multiple of a second number, then the second number is a factor of the first number. You can think of multiples as families, and factors are the people in those families. So 1, 2, 3 and 6 all fit into the 6 family, but 4 belongs to another family.") + "

" + qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math arithmetic" createdInVersion: 0 } diff --git a/src/activities/gnumch-inequality/ActivityInfo.qml b/src/activities/gnumch-inequality/ActivityInfo.qml index 4509a63c7..3a3a2abc5 100644 --- a/src/activities/gnumch-inequality/ActivityInfo.qml +++ b/src/activities/gnumch-inequality/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * 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 // Must be updated once GnumchEquality is reviewed ActivityInfo { name: "gnumch-inequality/GnumchInequality.qml" difficulty: 3 icon: "gnumch-inequality/gnumch-inequality.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" - demo: true //: Activity title title: qsTr("Gnumch Inequality") //: Help title description: qsTr("Guide the Number Muncher to all the expressions that do not equal the number at the bottom of the screen.") // intro: "Guide the number eater with the arrow keys to the numbers that are different from the ones displayed and press the space bar to swallow them." //: Help goal goal: qsTr("Practice addition, subtraction, multiplication and division.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math arithmetic" createdInVersion: 0 } diff --git a/src/activities/gnumch-multiples/ActivityInfo.qml b/src/activities/gnumch-multiples/ActivityInfo.qml index 1918c5a4a..1094201b9 100644 --- a/src/activities/gnumch-multiples/ActivityInfo.qml +++ b/src/activities/gnumch-multiples/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * 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: "gnumch-multiples/GnumchMultiples.qml" difficulty: 3 icon: "gnumch-multiples/gnumch-multiples.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" - demo: true //: Activity title title: qsTr("Gnumch Multiples") //: Help title description: qsTr("Guide the Number Muncher to all the multiples of the number at the bottom of the screen.") // intro: "Guide the number eater with the arrow keys to the multiples of the displayed number and press space to swallow them." //: Help goal goal: qsTr("Learn about multiples and factors.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("The multiples of a number are all the numbers that are equal to the original number times another number. For example, 24, 36, 48 and 60 are all multiples of 12. 25 is not a multiple of 12 because there isn't any number that can be multiplied by 12 to get 25. If one number is a factor of a second number, then the second number is a multiple of the first number. Again, you can think of multiples as families, and factors are the people who belong to those families. The factor 5, has parents 10, grandparents 15, great-grandparents 20, great-great-grandparents 25, and every extra step of 5 is another great- in front! But the number 5 does not belong in the 8 or 23 families. You can't fit any number of 5s into 8 or 23 with nothing left over. So 8 isn't a multiple of 5, nor is 23. Only 5, 10, 15, 20, 25 ... are multiples (or families or steps) of 5.") + "

" + qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math arithmetic" createdInVersion: 0 } diff --git a/src/activities/gnumch-primes/ActivityInfo.qml b/src/activities/gnumch-primes/ActivityInfo.qml index bdb03cce2..557792c4e 100644 --- a/src/activities/gnumch-primes/ActivityInfo.qml +++ b/src/activities/gnumch-primes/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Manuel Tondeur * * 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: "gnumch-primes/GnumchPrimes.qml" difficulty: 6 icon: "gnumch-primes/gnumch-primes.svg" author: "Manuel Tondeur <manueltondeur@gmail.com>" - demo: true //: Activity title title: qsTr("Gnumch Primes") //: Help title description: qsTr("Guide the Number Muncher to all the prime numbers.") // intro: "Guide the number eater with the arrow keys to the prime numbers and press space to swallow them." //: Help goal goal: qsTr("Learn about prime numbers.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Prime numbers are numbers that are only divisible by themselves and 1. For example, 3 is a prime number, but 4 isn't (because 4 is divisible by 2). You can think of prime numbers as very small families: they only ever have two people in them! Only themselves and 1. You can't fit any other numbers into them with nothing left over. 5 is one of these lonely numbers (only 5 × 1 = 5), but you can see that 6 has 2 and 3 in its family as well (6 × 1 = 6, 2 × 3 = 6). So 6 is not a prime number.") + "

" + qsTr("If you have a keyboard you can use the arrow keys to move and hit space to swallow a number. With a mouse you can click on the block next to your position to move and click again to swallow the number. With a touch screen you can do like with a mouse or swipe anywhere in the direction you want to move and tap to swallow the number.") + "

" + qsTr("Take care to avoid the Troggles.") credit: "" section: "math arithmetic" createdInVersion: 0 } diff --git a/src/activities/graph-coloring/ActivityInfo.qml b/src/activities/graph-coloring/ActivityInfo.qml index c65da209d..8dd89bb6a 100644 --- a/src/activities/graph-coloring/ActivityInfo.qml +++ b/src/activities/graph-coloring/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Akshat Tandon * * 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: "graph-coloring/GraphColoring.qml" difficulty: 1 icon: "graph-coloring/graph-coloring.svg" author: "Akshat Tandon <akshat.tandon@research.iiit.ac.in>" - demo: true //: Activity title title: qsTr("Graph Coloring") //: Help title description: qsTr("Color the graph so that no two adjacent nodes have the same color.") //intro: "Color the graph so that no two adjacent nodes have the same color." //: Help goal goal: qsTr("Learn to distinguish between different colors/shapes and learn about relative positions.") //: Help prerequisite prerequisite: qsTr("Ability to distinguish different colors/shapes, sense of positions") //: Help manual manual: "" credit: "" section: "discovery logic" createdInVersion: 6000 } diff --git a/src/activities/gravity/ActivityInfo.qml b/src/activities/gravity/ActivityInfo.qml index d02701e30..fcad5e51d 100644 --- a/src/activities/gravity/ActivityInfo.qml +++ b/src/activities/gravity/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2020 Timothée Giet * * Authors: * Siddhesh suthar (Qt Quick port) * Timothée Giet (complete activity rewrite) * * 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: "gravity/Gravity.qml" difficulty: 3 icon: "gravity/gravity.svg" author: "Timothée Giet <animtim@gmail.com>" - demo: true //: Activity title title: qsTr("Gravity") //: Help title description: qsTr("Introduction to the concept of gravity") //intro: "Move the spaceship to avoid hitting the planets and reach the space station." //: Help goal goal: qsTr("Move the spaceship to avoid hitting the planets and reach the space station.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Move the spaceship with the left and right keys, or with the buttons on the screen for mobile devices. Try to stay near the center of the screen and anticipate by looking at the size and direction of the arrow showing the gravity force.") credit: "" section: "sciences experiment" createdInVersion: 9800 } diff --git a/src/activities/guesscount/ActivityInfo.qml b/src/activities/guesscount/ActivityInfo.qml index 09535ed42..9ef057a1a 100644 --- a/src/activities/guesscount/ActivityInfo.qml +++ b/src/activities/guesscount/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Rahul Yadav * * Authors: * Pascal Georges (GTK+ version) * RAHUL YADAV (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 GCompris 1.0 ActivityInfo { name: "guesscount/Guesscount.qml" difficulty: 3 icon: "guesscount/guesscount.svg" author: "Rahul Yadav <rahulyadav170923@gmail.com>" - demo: true //: Activity title title: qsTr("Guesscount") //: Help title description:qsTr("Guess the algebraic expression and drag the tiles to get a result equal to the Guesscount.") //intro: "Use the numbers and operations suggested to find the results proposed above." //: Help goal goal: qsTr("Intuition and practice of algebraic-like calculations.") //: Help prerequisite prerequisite: qsTr("knowledge of arithmetic operations") //: Help manual manual: qsTr("Drag the appropriate numbers and the operators to the boxes to obtain the number to guess in the instruction.") credit: "" section: "math arithmetic" createdInVersion: 8000 } diff --git a/src/activities/guessnumber/ActivityInfo.qml b/src/activities/guessnumber/ActivityInfo.qml index ff01fae5a..ad638ec5e 100644 --- a/src/activities/guessnumber/ActivityInfo.qml +++ b/src/activities/guessnumber/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Thib ROMAIN * * 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: "guessnumber/Guessnumber.qml" difficulty: 3 icon: "guessnumber/guessnumber.svg" author: "Thib ROMAIN <thibrom@gmail.com>" - demo: true //: Activity title title: qsTr("Guess a number") //: Help title description: qsTr("Help Tux escape the cave. Tux hides a number for you to find.") // intro: "Find out the number by typing a number from the range proposed." //: Help goal goal: "" //: Help prerequisite prerequisite: qsTr("Numbers from 1 to 1000 for the last level.") //: Help manual manual: qsTr("Read the instructions that give you the range of the number to find. Enter a number in the top right entry box. You will be told if your number is higher or lower. Then enter another number. The distance between Tux and the escape area on the right represents how far you are from the correct number. If Tux is over or under the escape area, it means your number is over or under the correct number.") credit: "" section: "math numeration" createdInVersion: 0 levels: "1,2,3,4,5" } diff --git a/src/activities/hangman/ActivityInfo.qml b/src/activities/hangman/ActivityInfo.qml index e742e4f11..833d1ade7 100644 --- a/src/activities/hangman/ActivityInfo.qml +++ b/src/activities/hangman/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Rajdeep Kaur * * 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: "hangman/Hangman.qml" difficulty: 5 icon: "hangman/hangman.svg" author: "Rajdeep kaur <rajdeep1994@gmail.com>" - demo: true //: Activity title title: qsTr("The classic hangman game") //: Help title description: qsTr("Guess the letters of the given word. To help you, on every wrong try, a part of the image representing the word will be revealed.") //: Help goal goal: qsTr("This is a good exercise to improve reading and spelling skills.") //: Help prerequisite prerequisite: "" // intro: "A word is hidden, you must discover it letter by letter." //: Help manual manual: qsTr("You can enter the letters using the virtual keyboard on the screen or with the real keyboard.") credit: "" section: "keyboard reading words" createdInVersion: 5000 } diff --git a/src/activities/hanoi/ActivityInfo.qml b/src/activities/hanoi/ActivityInfo.qml index 8e0500a87..66027b35d 100644 --- a/src/activities/hanoi/ActivityInfo.qml +++ b/src/activities/hanoi/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "hanoi/Hanoi.qml" difficulty: 2 icon: "hanoi/hanoi.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Simplified Tower of Hanoi") //: Help title description: qsTr("Reproduce the given tower") //intro: "Rebuild the same tower in the empty area as the one you see on the right hand side." //: Help goal goal: qsTr("Reproduce the tower on the right in the empty space on the left") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Drag and Drop one top piece at a time, from one peg to another, to reproduce the tower on the right in the empty space on its left.") credit: qsTr("Concept taken from EPI games.") section: "discovery logic" createdInVersion: 4000 } diff --git a/src/activities/hanoi_real/ActivityInfo.qml b/src/activities/hanoi_real/ActivityInfo.qml index bb6a675ab..c3469914c 100644 --- a/src/activities/hanoi_real/ActivityInfo.qml +++ b/src/activities/hanoi_real/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Amit Tomar * * 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: "hanoi_real/HanoiReal.qml" difficulty: 5 icon: "hanoi_real/hanoi_real.svg" author: "Amit Tomar <a.tomar@outlook.com>" - demo: true //: Activity title title: qsTr("The Tower of Hanoi") //: Help title description: qsTr("Reproduce the tower on the right side") //intro: "Rebuild the model tower on the right support. Take care, no disc may be placed atop a smaller disc." //: Help goal goal: qsTr("The object of the game is to move the entire stack to another peg, obeying the following rules: only one disc may be moved at a time no disc may be placed atop a smaller disc ") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Drag and drop the top pieces only from one peg to another, to reproduce the initial left side tower on the right peg.") credit: qsTr("The puzzle was invented by the French mathematician Edouard Lucas in 1883. There is a legend about a Hindu temple whose priests were constantly engaged in moving a set of 64 discs according to the rules of the Tower of Hanoi puzzle. According to the legend, the world would end when the priests finished their work. The puzzle is therefore also known as the Tower of Brahma puzzle. It is not clear whether Lucas invented this legend or was inspired by it. (source Wikipedia: https://en.wikipedia.org/wiki/Tower_of_hanoi)") section: "discovery logic" createdInVersion: 4000 } diff --git a/src/activities/hexagon/ActivityInfo.qml b/src/activities/hexagon/ActivityInfo.qml index 5340d94ae..10f00e182 100644 --- a/src/activities/hexagon/ActivityInfo.qml +++ b/src/activities/hexagon/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "hexagon/Hexagon.qml" difficulty: 2 icon: "hexagon/hexagon.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Hexagon") //: Help title description: qsTr("Find the strawberry by clicking on the blue fields") // intro: "Click on the hexagons to find the hidden object, the red zone indicates that you're close to it!" //: Help goal goal: qsTr("Logic-training activity") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Try to find the strawberry under the blue fields. The fields become redder as you get closer.") credit: "" section: "fun" createdInVersion: 0 } diff --git a/src/activities/imagename/ActivityInfo.qml b/src/activities/imagename/ActivityInfo.qml index 221d8d4b4..a7b97b72e 100644 --- a/src/activities/imagename/ActivityInfo.qml +++ b/src/activities/imagename/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "imagename/Imagename.qml" difficulty: 3 icon: "imagename/imagename.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Image Name") //: Help title description: qsTr("Drag and Drop each item above its name") // intro: "Drag and drop each item above its name." //: Help goal goal: qsTr("Vocabulary and reading") //: Help prerequisite prerequisite: qsTr("Reading") //: Help manual manual: qsTr("Drag each image from the (vertical) box on the left to its (corresponding) name on the right. Click the OK button to check your answer.") section: "reading words" createdInVersion: 4000 } diff --git a/src/activities/instruments/ActivityInfo.qml b/src/activities/instruments/ActivityInfo.qml index ed13ccada..f3ecbfc6a 100644 --- a/src/activities/instruments/ActivityInfo.qml +++ b/src/activities/instruments/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "instruments/Instruments.qml" difficulty: 4 icon: "instruments/instruments.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Music instruments") //: Help title description: qsTr("Click on the correct musical instruments") // intro: "Click on the correct musical instrument." //: Help goal goal: qsTr("Learn to recognize musical instruments.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click on the correct instrument.") credit: "" section: "discovery music" createdInVersion: 0 } diff --git a/src/activities/land_safe/ActivityInfo.qml b/src/activities/land_safe/ActivityInfo.qml index 90f1b5b31..38dcb122d 100644 --- a/src/activities/land_safe/ActivityInfo.qml +++ b/src/activities/land_safe/ActivityInfo.qml @@ -1,49 +1,48 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Holger Kaelberer * * 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: "land_safe/LandSafe.qml" difficulty: 4 icon: "land_safe/land_safe.svg" author: "Matilda Bernard <serah4291@gmail.com> (Gtk+), Holger Kaelberer <holger.k@elberer.de> (Qt Quick)" - demo: true //: Activity title title: qsTr("Land Safe") //: Help title description: qsTr("Understanding acceleration due to gravity.") // intro: "Use the arrow keys to pilot your spaceship safely onto the landing pad." //: Help goal goal: qsTr("Pilot the spaceship towards the green landing area.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Acceleration due to gravity experienced by the spaceship is directly proportional to the mass of the planet and inversely proportional to the square of the distance from the center of the planet. Thus, with every planet the acceleration will differ and as the spaceship comes closer and closer to the planet the acceleration increases. Use the up/down keys to control the thrust and the right/left keys to control direction. On touch screens you can control the rocket through the corresponding on-screen buttons. The accelerometer on the right border shows your rocket's overall vertical acceleration including gravitational force. In the upper green area of the accelerometer your acceleration is higher than the gravitational force, in the lower red area it's lower, and on the blue baseline in the yellow middle area the two forces cancel each other out. In higher levels, you can use the right/left keys to rotate the spaceship. By rotating the spaceship you can trigger an acceleration in non-vertical direction using the up/down keys. The landing platform is green if your speed is fine for a safe landing.") credit: "" section: "sciences experiment" enabled: ApplicationInfo.isBox2DInstalled //ApplicationInfo.hasShader createdInVersion: 6000 } diff --git a/src/activities/lang/ActivityInfo.qml b/src/activities/lang/ActivityInfo.qml index fdf442192..244518812 100644 --- a/src/activities/lang/ActivityInfo.qml +++ b/src/activities/lang/ActivityInfo.qml @@ -1,48 +1,47 @@ /* GCompris - lang.qml * * Copyright (C) Siddhesh suthar (Qt Quick port) * * Authors: * Pascal Georges (pascal.georges1@free.fr) (GTK+ version) * Holger Kaelberer (Qt Quick port of imageid) * Siddhesh suthar (Qt Quick port) * Bruno Coudoin (Integration Lang dataset) * * 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: "lang/Lang.qml" difficulty: 4 icon: "lang/lang.svg" author: "siddhesh suthar <siddhesh.it@gmail.com>" - demo: true //: Activity title title: qsTr("Enrich your vocabulary") //: Help title description: qsTr("Complete language learning activities.") // intro: "Select the language you want to learn then review the words before doing the exercises." //: Help goal goal: qsTr("Enrich your vocabulary in your native language or in a foreign one.") //: Help prerequisite prerequisite: qsTr("Reading") //: Help manual manual: qsTr("Review a set of words. Each word is shown with a voice, a text and an image.
" + "When done, you are suggested an exercise in which, given the voice, " + "you must find the right word. In the configuration, you can select the language you want to learn.") credit: qsTr("The images and voices come from the Art4Apps project: https://www.art4apps.org/.") section: "reading vocabulary" createdInVersion: 5000 } diff --git a/src/activities/leftright/ActivityInfo.qml b/src/activities/leftright/ActivityInfo.qml index e2d8d7deb..06380acf4 100644 --- a/src/activities/leftright/ActivityInfo.qml +++ b/src/activities/leftright/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "leftright/Leftright.qml" difficulty: 2 icon: "leftright/leftright.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Find your left and right hands") //: Help title description: qsTr("Determine if a hand is a right or a left hand") // intro: "Guess if the picture presents a left or right hand and click on the correct answer." //: Help goal goal: qsTr("Distinguish right and left hands from different points of view. Spatial representation") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("You can see a hand: is it a left hand or a right hand? Click on the left button, or the right button depending on the displayed hand.") credit: "" section: "puzzle" createdInVersion: 0 } diff --git a/src/activities/letter-in-word/ActivityInfo.qml b/src/activities/letter-in-word/ActivityInfo.qml index 3428e40d9..f42606e74 100644 --- a/src/activities/letter-in-word/ActivityInfo.qml +++ b/src/activities/letter-in-word/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Akshat Tandon * * 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: "letter-in-word/LetterInWord.qml" difficulty: 2 icon: "letter-in-word/letter-in-word.svg" author: "Akshat Tandon <akshat.tandon@research.iiit.ac.ins>" - demo: true //: Activity title title: qsTr("Letter in which word") //: Help title description: qsTr("A letter is written and/or spoken. Some words are displayed, the children must find the word or the words in which this letter appears.") //intro: "Click on all the words containing the wanted letter." //: Help goal goal: qsTr("Select all the words which contain the spoken letter.") //: Help prerequisite prerequisite: qsTr("spellings, letter recognition") //: Help manual manual: qsTr("A letter is displayed on the flag attached to the plane, select all the words or the objects in which the letter appears and then press OK.") credit: "" section: "reading words" createdInVersion: 7000 } diff --git a/src/activities/lightsoff/ActivityInfo.qml b/src/activities/lightsoff/ActivityInfo.qml index 4e19e9b9f..dbaa59f07 100644 --- a/src/activities/lightsoff/ActivityInfo.qml +++ b/src/activities/lightsoff/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "lightsoff/Lightsoff.qml" difficulty: 6 icon: "lightsoff/lightsoff.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Lights Off") //: Help title description: qsTr("The aim is to switch off all the lights.") // intro: "Click on the lamps to turn them off." //: Help goal goal: qsTr("The aim is to switch off all the lights.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("The effect of pressing a window is to toggle the state of that window, and of its immediate vertical and horizontal neighbors. The sun and the color of the sky depend on the number of clicks needed to solve the puzzle. If you click on Tux, the solution is shown.") credit: qsTr("The solver algorithm is described on Wikipedia. To know more about the Lights Off game: <https://en.wikipedia.org/wiki/Lights_Out_(game)>") section: "discovery logic" createdInVersion: 0 } diff --git a/src/activities/louis-braille/ActivityInfo.qml b/src/activities/louis-braille/ActivityInfo.qml index d3bfd0aa6..60368b9e1 100644 --- a/src/activities/louis-braille/ActivityInfo.qml +++ b/src/activities/louis-braille/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Arkit Vora * * 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: "louis-braille/LouisBraille.qml" difficulty: 4 icon: "louis-braille/louis-braille.svg" author: "Arkit Vora <arkitvora123@gmail.com>" - demo: true //: Activity title title: qsTr("The History of Louis Braille") //: Help title description: qsTr("Review the major dates of the inventor of the Braille System") //intro: "Discover the history of Louis Braille." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Read the history of Louis Braille, his biography, and the invention of the Braille system. Click on the previous and next buttons to move between the story pages. At the end, arrange the sequence in chronological order.") credit: qsTr("Louis Braille Video: <https:\/\/www.youtube.com/watch?v=9bdfC2j_4x4>") section: "sciences history" createdInVersion: 4000 } diff --git a/src/activities/magic-hat-minus/ActivityInfo.qml b/src/activities/magic-hat-minus/ActivityInfo.qml index 21cd08594..d30b5db11 100644 --- a/src/activities/magic-hat-minus/ActivityInfo.qml +++ b/src/activities/magic-hat-minus/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Thibaut ROMAIN * * 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: "magic-hat-minus/MagicHat.qml" difficulty: 2 icon: "magic-hat-minus/magic-hat-minus.svg" author: "Thibaut ROMAIN <thibrom@gmail.com>" - demo: true //: Activity title title: qsTr("The magician hat") //: Help title description: qsTr("Count how many items are under the magic hat after some have got away") // intro: "Click on the hat. How many stars are still hiding under the hat." //: Help goal goal: qsTr("Learn subtraction") //: Help prerequisite prerequisite: qsTr("Subtraction") //: Help manual manual: qsTr("Click on the hat to open it. Stars go in and a few stars escape. You have to count how many are still under the hat. Click on the bottom area to input your answer and on the OK button to validate your answer.") credit: "" section: "math arithmetic" createdInVersion: 0 levels: "1,2,3,4,5,6" } diff --git a/src/activities/magic-hat-plus/ActivityInfo.qml b/src/activities/magic-hat-plus/ActivityInfo.qml index da9492174..edaa4869f 100644 --- a/src/activities/magic-hat-plus/ActivityInfo.qml +++ b/src/activities/magic-hat-plus/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Thib ROMAIN * * 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: "magic-hat-plus/MagicHatPlus.qml" difficulty: 2 icon: "magic-hat-plus/magic-hat-plus.svg" author: "Thib ROMAIN <thibrom@gmail.com>" - demo: true //: Activity title title: qsTr("The magician hat") //: Help title description: qsTr("Count how many items are under the magic hat") // intro: "Count the number of stars hidden under the hat and then click on the stars to indicate their number." //: Help goal goal: qsTr("Learn addition") //: Help prerequisite prerequisite: qsTr("Addition") //: Help manual manual: qsTr("Click on the hat to open it. Under the hat, how many stars can you see moving around? Count carefully. Click on the bottom area to input your answer and on the OK button to validate your answer.") credit: "" section: "math arithmetic" createdInVersion: 0 levels: "1,2,3,4,5,6" } diff --git a/src/activities/maze/ActivityInfo.qml b/src/activities/maze/ActivityInfo.qml index 5e2b94fed..f4ad276a2 100644 --- a/src/activities/maze/ActivityInfo.qml +++ b/src/activities/maze/ActivityInfo.qml @@ -1,45 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "maze/Maze.qml" difficulty: 1 icon: "maze/maze.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Maze") //: Help title description: qsTr("Help Tux get out of this maze") // intro: "Use the arrows keys or swipe the touch screen to help Tux find his way out." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Use the arrow keys or swipe the touch screen to move Tux up to the door.") + "

" + qsTr("At the first levels, Tux walks comfortably, one step on each move request, through the maze.") + "

" + qsTr("For larger mazes, there is a special walking mode, called \"run-fast-mode\". If this run-fast-mode is enabled, Tux will run all the way automatically until he reaches a fork and you have to decide which way to go further.") + "

" + qsTr("You can see whether this mode is enabled or not, by looking at Tux's feet: If Tux is barefooted, \"run-fast-mode\" is disabled. And if he wears red sport shoes, \"run-fast-mode\" is enabled.") + "

" + qsTr("At higher levels, run-fast-mode will be enabled automatically. If you want to use this feature in earlier levels or want to disable it in advanced levels, click on the \"barefoot / sportshoe\"-icon in the upper left corner of the screen to toggle the run-fast-mode. \t") credit: "" section: "fun maze" createdInVersion: 0 } diff --git a/src/activities/mazeinvisible/ActivityInfo.qml b/src/activities/mazeinvisible/ActivityInfo.qml index 64059e7f7..b921d2070 100644 --- a/src/activities/mazeinvisible/ActivityInfo.qml +++ b/src/activities/mazeinvisible/ActivityInfo.qml @@ -1,45 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "mazeinvisible/Mazeinvisible.qml" difficulty: 4 icon: "mazeinvisible/mazeinvisible.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Invisible Maze") //: Help title description: qsTr("Guide Tux out of the invisible maze") // intro: "Use the arrow keys or swipe the touch screen to guide Tux out. Use the maze icon or the space key to see the map." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Use the arrow keys or swipe the touch screen to move Tux up to the door. Use the maze icon or the spacebar to switch between invisible and visible modes. Visible mode just gives you an indication of your position, like a map. You cannot move Tux in visible mode.") + "

" + qsTr("At the first levels, Tux walks comfortably, one step on each move request, through the maze.") + "

" + qsTr("For larger mazes, there is a special walking mode, called \"run-fast-mode\". If this run-fast-mode is enabled, Tux will run all the way automatically until he reaches a fork and you have to decide which way to go further.") + "

" + qsTr("You can see whether this mode is enabled or not, by looking at Tux's feet: If Tux is barefooted, \"run-fast-mode\" is disabled. And if he wears red sport shoes, \"run-fast-mode\" is enabled.") + "

" + qsTr("At higher levels, run-fast-mode will be enabled automatically. If you want to use this feature in earlier levels or want to disable it in advanced levels, click on the \"barefoot / sportshoe\"-icon in the upper left corner of the screen to toggle the run-fast-mode. \t") credit: "" section: "fun maze" createdInVersion: 0 } diff --git a/src/activities/mazerelative/ActivityInfo.qml b/src/activities/mazerelative/ActivityInfo.qml index c6bc67544..fbc71f1d9 100644 --- a/src/activities/mazerelative/ActivityInfo.qml +++ b/src/activities/mazerelative/ActivityInfo.qml @@ -1,46 +1,45 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "mazerelative/Mazerelative.qml" difficulty: 3 icon: "mazerelative/mazerelative.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Relative Maze") //: Help title description: qsTr("Help Tux get out of this maze (Move is relative)") // intro: "Help Tux find his way out. Left and right are used to turn and up to go forward." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Use the arrow keys or swipe the touch screen to move Tux up to the door.") + "

" + qsTr("In this maze, the move is relative (first person). Left and right are used to turn and up to go forward.") + "

" + qsTr("At the first levels, Tux walks comfortably, one step on each move request, through the maze.") + "

" + qsTr("For larger mazes, there is a special walking mode, called \"run-fast-mode\". If this run-fast-mode is enabled, Tux will run all the way automatically until he reaches a fork and you have to decide which way to go further.") + "

" + qsTr("You can see whether this mode is enabled or not, by looking at Tux's feet: If Tux is barefooted, \"run-fast-mode\" is disabled. And if he wears red sport shoes, \"run-fast-mode\" is enabled.") + "

" + qsTr("At higher levels, run-fast-mode will be enabled automatically. If you want to use this feature in earlier levels or want to disable it in advanced levels, click on the \"barefoot / sportshoe\"-icon in the upper left corner of the screen to toggle the run-fast-mode. \t") credit: "" section: "fun maze" createdInVersion: 0 } diff --git a/src/activities/melody/ActivityInfo.qml b/src/activities/melody/ActivityInfo.qml index ca6b86955..435323202 100644 --- a/src/activities/melody/ActivityInfo.qml +++ b/src/activities/melody/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "melody/Melody.qml" difficulty: 2 icon: "melody/melody.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Melody") //: Help title description: qsTr("Reproduce a sound sequence") // intro: "Listen to the sound sequence played, and reproduce it by clicking on the xylophone's bars" //: Help goal goal: qsTr("Ear-training activity") //: Help prerequisite prerequisite: qsTr("Move and click the mouse") //: Help manual manual: qsTr("Listen to the sound sequence played, and repeat it by clicking on the xylophone's bars. You can listen again by clicking on the repeat button.") credit: "" section: "discovery memory music" createdInVersion: 5000 } diff --git a/src/activities/memory-case-association-tux/ActivityInfo.qml b/src/activities/memory-case-association-tux/ActivityInfo.qml index 2d79e9e6e..635bc62a4 100644 --- a/src/activities/memory-case-association-tux/ActivityInfo.qml +++ b/src/activities/memory-case-association-tux/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Aman Kumar Gupta * * 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: "memory-case-association-tux/MemoryCaseAssociationTux.qml" difficulty: 2 icon: "memory-case-association-tux/memory-case-association-tux.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Case association memory game against Tux") //: Help title description: qsTr("Turn the cards over to match the alphabet with its lower/uppercase value against Tux.") //intro: "Match the upper case card with its lower case pair." //: Help goal goal: qsTr("Learning lower and upper case alphabets, memory.") //: Help prerequisite prerequisite: qsTr("Knowing alphabets") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding the lower/uppercase of an alphabet, and you have to associate all the upper case letters with its lower case and vice versa. Tux teacher does the same.") credit: "" section: "reading letters" createdInVersion: 9000 } diff --git a/src/activities/memory-case-association/ActivityInfo.qml b/src/activities/memory-case-association/ActivityInfo.qml index 658e70f24..b81bbdc41 100644 --- a/src/activities/memory-case-association/ActivityInfo.qml +++ b/src/activities/memory-case-association/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Aman Kumar Gupta * * 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: "memory-case-association/MemoryCaseAssociation.qml" difficulty: 2 icon: "memory-case-association/memory-case-association.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Case association memory game") //: Help title description: qsTr("Turn the cards over to match the alphabet with its lower/uppercase value.") //intro: "Match the upper case card with its lower case pair." //: Help goal goal: qsTr("Learning lower and upper case alphabets, memory.") //: Help prerequisite prerequisite: qsTr("Knowing alphabets") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding the lower/uppercase of an alphabet, and you have to associate all the upper case letters with its lower case and vice versa.") credit: "" section: "reading letters" createdInVersion: 9000 } diff --git a/src/activities/memory-enumerate/ActivityInfo.qml b/src/activities/memory-enumerate/ActivityInfo.qml index d1faef75d..42020a42a 100644 --- a/src/activities/memory-enumerate/ActivityInfo.qml +++ b/src/activities/memory-enumerate/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "memory-enumerate/MemoryEnumerate.qml" difficulty: 2 icon: "memory-enumerate/memory-enumerate.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Enumeration memory game") //: Help title description: qsTr("Turn the cards over to match the number with the drawn picture.") // intro: "Match a number card with a card displaying the same number of butterflies." //: Help goal goal: qsTr("Numeration training, memory.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding a number of pictures, or the written number.") credit: "" section: "math numeration" createdInVersion: 0 } diff --git a/src/activities/memory-math-add-minus-mult-div-tux/ActivityInfo.qml b/src/activities/memory-math-add-minus-mult-div-tux/ActivityInfo.qml index 1ca17be19..927a71be7 100644 --- a/src/activities/memory-math-add-minus-mult-div-tux/ActivityInfo.qml +++ b/src/activities/memory-math-add-minus-mult-div-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add-minus-mult-div-tux/MemoryMathAddMinusMultDivTux.qml" difficulty: 6 icon: "memory-math-add-minus-mult-div-tux/memory-math-add-minus-mult-div-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("All operations memory game against Tux") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice addition, subtraction, multiplication, division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition, subtraction, multiplication, division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more than Tux, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-add-minus-mult-div/ActivityInfo.qml b/src/activities/memory-math-add-minus-mult-div/ActivityInfo.qml index 1016e378e..94509c843 100644 --- a/src/activities/memory-math-add-minus-mult-div/ActivityInfo.qml +++ b/src/activities/memory-math-add-minus-mult-div/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add-minus-mult-div/MemoryMathAddMinusMultDiv.qml" difficulty: 6 icon: "memory-math-add-minus-mult-div/memory-math-add-minus-mult-div.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("All operations memory game") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice addition, subtraction, multiplication, division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition, subtraction, multiplication, division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-add-minus-tux/ActivityInfo.qml b/src/activities/memory-math-add-minus-tux/ActivityInfo.qml index 8c367bbff..9190f62ae 100644 --- a/src/activities/memory-math-add-minus-tux/ActivityInfo.qml +++ b/src/activities/memory-math-add-minus-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add-minus-tux/MemoryMathAddMinusTux.qml" difficulty: 4 icon: "memory-math-add-minus-tux/memory-math-add-minus-tux.svg" author: "JB BUTET <ashashiwa@mgail.com>" - demo: true //: Activity title title: qsTr("Addition and subtraction memory game against Tux") //: Help title description: qsTr("Turn the cards over to find two numbers which add or subtract the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice addition, subtraction, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition and subtraction") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more than Tux, and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-add-minus/ActivityInfo.qml b/src/activities/memory-math-add-minus/ActivityInfo.qml index 6266444d5..740e880dc 100644 --- a/src/activities/memory-math-add-minus/ActivityInfo.qml +++ b/src/activities/memory-math-add-minus/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add-minus/MemoryMathAddMinus.qml" difficulty: 4 icon: "memory-math-add-minus/memory-math-add-minus.svg" author: "JB BUTET <ashashiwa@mgail.com>" - demo: true //: Activity title title: qsTr("Addition and subtraction memory game") //: Help title description: qsTr("Turn the cards over to find two numbers which add or subtract the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice addition, subtraction, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition and subtraction") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-add-tux/ActivityInfo.qml b/src/activities/memory-math-add-tux/ActivityInfo.qml index cad9ba748..222aab4c6 100644 --- a/src/activities/memory-math-add-tux/ActivityInfo.qml +++ b/src/activities/memory-math-add-tux/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add-tux/MemoryMathAddTux.qml" difficulty: 3 icon: "memory-math-add-tux/memory-math-add-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Addition memory game against Tux") //: Help title description: qsTr("Turn the cards over to find two numbers which add up the same, until all the cards are gone. Tux will do the same. You have to beat it!") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice adding up, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an adding-up sum, or the answer to the sum. An adding-up sum looks like this: 2 + 2 = 4 The numbers on one side of the equals sign (=) have to be the same as the number on the other side. So 2 (1, 2) and 2 more (3, 4) makes 4. Count aloud when you work this out, and count on your fingers, because the more ways you do something, the better you remember it. You can also use blocks, or buttons, or anything you can count. If you have lots of brothers and sisters, you can count them! Or the kids in your class at school. Sing counting songs. Count lots of things, for practice, and you'll be very good at adding-up! In this game, these cards are hiding the two parts of an adding-up sum (also called an addition sum). You need to find the two parts of the sum, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole sum. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper sum. When you do that, both those cards disappear! When you've made them all disappear, found more sums than Tux and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-add/ActivityInfo.qml b/src/activities/memory-math-add/ActivityInfo.qml index 75d880a6d..058013c79 100644 --- a/src/activities/memory-math-add/ActivityInfo.qml +++ b/src/activities/memory-math-add/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-add/MemoryMathAdd.qml" difficulty: 3 icon: "memory-math-add/memory-math-add.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Addition memory game") //: Help title description: qsTr("Turn the cards over to find two numbers which add up the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice adding up, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an adding-up sum, or the answer to the sum. An adding-up sum looks like this: 2 + 2 = 4 The numbers on one side of the equals sign (=) have to be the same as the number on the other side. So 2 (1, 2) and 2 more (3, 4) makes 4. Count aloud when you work this out, and count on your fingers, because the more ways you do something, the better you remember it. You can also use blocks, or buttons, or anything you can count. If you have lots of brothers and sisters, you can count them! Or the kids in your class at school. Sing counting songs. Count lots of things, for practice, and you'll be very good at adding-up! In this game, these cards are hiding the two parts of an adding-up sum (also called an addition sum). You need to find the two parts of the sum, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole sum. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper sum. When you do that, both those cards disappear! When you've made them all disappear, found all the sums, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-div-tux/ActivityInfo.qml b/src/activities/memory-math-div-tux/ActivityInfo.qml index 887d3be1b..f526fb2c7 100644 --- a/src/activities/memory-math-div-tux/ActivityInfo.qml +++ b/src/activities/memory-math-div-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-div-tux/MemoryMathDivTux.qml" difficulty: 6 icon: "memory-math-div-tux/memory-math-div-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Division memory game against Tux") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more than Tux and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-div/ActivityInfo.qml b/src/activities/memory-math-div/ActivityInfo.qml index 4ae865257..4a189ddf2 100644 --- a/src/activities/memory-math-div/ActivityInfo.qml +++ b/src/activities/memory-math-div/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-div/MemoryMathDiv.qml" difficulty: 6 icon: "memory-math-div/memory-math-div.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Division memory game") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-minus-tux/ActivityInfo.qml b/src/activities/memory-math-minus-tux/ActivityInfo.qml index 5d14d7c8b..e5183efc3 100644 --- a/src/activities/memory-math-minus-tux/ActivityInfo.qml +++ b/src/activities/memory-math-minus-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-minus-tux/MemoryMathMinusTux.qml" difficulty: 4 icon: "memory-math-minus-tux/memory-math-minus-tux.svg" author: "JB BUTET <ashashiwa@mgail.com>" - demo: true //: Activity title title: qsTr("Subtraction memory game against Tux") //: Help title description: qsTr("Turn the cards over to find two numbers which subtract the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice subtraction, until all the cards are gone. Tux will do the same") //: Help prerequisite prerequisite: qsTr("subtraction") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more operations than Tux and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-minus/ActivityInfo.qml b/src/activities/memory-math-minus/ActivityInfo.qml index c233d0e4d..98a96ad57 100644 --- a/src/activities/memory-math-minus/ActivityInfo.qml +++ b/src/activities/memory-math-minus/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-minus/MemoryMathMinus.qml" difficulty: 4 icon: "memory-math-minus/memory-math-minus.svg" author: "JB BUTET <ashashiwa@mgail.com>" - demo: true //: Activity title title: qsTr("Subtraction memory game") //: Help title description: qsTr("Turn the cards over to find two numbers which subtract the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice subtraction, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Subtraction") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-mult-div-tux/ActivityInfo.qml b/src/activities/memory-math-mult-div-tux/ActivityInfo.qml index ad51dcc25..7dee5e091 100644 --- a/src/activities/memory-math-mult-div-tux/ActivityInfo.qml +++ b/src/activities/memory-math-mult-div-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-mult-div-tux/MemoryMathMultDivTux.qml" difficulty: 6 icon: "memory-math-mult-div-tux/memory-math-mult-div-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Multiplication and division memory game against Tux") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice multiplication, division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Multiplication, division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more than Tux and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-mult-div/ActivityInfo.qml b/src/activities/memory-math-mult-div/ActivityInfo.qml index 6c5d5463c..f744419c2 100644 --- a/src/activities/memory-math-mult-div/ActivityInfo.qml +++ b/src/activities/memory-math-mult-div/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-mult-div/MemoryMathMultDiv.qml" difficulty: 6 icon: "memory-math-mult-div/memory-math-mult-div.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Multiplication and division memory game") //: Help title description: qsTr("Turn the cards over to find a matching operation, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice multiplication, division, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Multiplication, division") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-mult-tux/ActivityInfo.qml b/src/activities/memory-math-mult-tux/ActivityInfo.qml index ac396868f..966f13d45 100644 --- a/src/activities/memory-math-mult-tux/ActivityInfo.qml +++ b/src/activities/memory-math-mult-tux/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-mult-tux/MemoryMathMultTux.qml" difficulty: 5 icon: "memory-math-mult-tux/memory-math-mult-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Multiplication memory game against Tux") //: Help title description: qsTr("Turn the cards over to find two numbers which multiply the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice multiplication, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Multiplication") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more than Tux and you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-math-mult/ActivityInfo.qml b/src/activities/memory-math-mult/ActivityInfo.qml index 28cd54d21..0656430da 100644 --- a/src/activities/memory-math-mult/ActivityInfo.qml +++ b/src/activities/memory-math-mult/ActivityInfo.qml @@ -1,42 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-math-mult/MemoryMathMult.qml" difficulty: 5 icon: "memory-math-mult/memory-math-mult.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Multiplication memory game") //: Help title description: qsTr("Turn the cards over to find two numbers which multiply the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice multiplication, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Multiplication") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found all the operations, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 } diff --git a/src/activities/memory-sound-tux/ActivityInfo.qml b/src/activities/memory-sound-tux/ActivityInfo.qml index b6968cd68..6e2b0e9b9 100644 --- a/src/activities/memory-sound-tux/ActivityInfo.qml +++ b/src/activities/memory-sound-tux/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "memory-sound-tux/MemorySoundTux.qml" difficulty: 2 icon: "memory-sound-tux/memory-sound-tux.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Audio memory game against Tux") //: Help title description: qsTr("Play the audio memory game against Tux") // intro: "Click on an audio card and find its double." //: Help goal goal: qsTr("Train your audio memory and remove all the cards.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A set of cards is shown. Each card has an associated sound, and each sound has a twin exactly the same. Click on a card to hear its hidden sound, and try to match the twins. You can only activate two cards at once, so you need to remember where a sound is, while you listen to its twin. When you turn over the twins, they both disappear.") credit: "" section: "discovery memory music" createdInVersion: 0 } diff --git a/src/activities/memory-sound/ActivityInfo.qml b/src/activities/memory-sound/ActivityInfo.qml index d36ac0697..b834f4b82 100644 --- a/src/activities/memory-sound/ActivityInfo.qml +++ b/src/activities/memory-sound/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-sound/MemorySound.qml" difficulty: 2 icon: "memory-sound/memory-sound.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Audio memory game") //: Help title description: qsTr("Click on cards and listen to find the matching sounds") // intro: "Click on an audio card and find its double." //: Help goal goal: qsTr("Train your audio memory and remove all the cards.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A set of cards is shown. Each card has an associated sound, and each sound has a twin exactly the same. Click on a card to hear its hidden sound, and try to match the twins. You can only activate two cards at once, so you need to remember where a sound is, while you listen to its twin. When you turn over the twins, they both disappear.") credit: "" section: "discovery memory music" createdInVersion: 0 } diff --git a/src/activities/memory-tux/ActivityInfo.qml b/src/activities/memory-tux/ActivityInfo.qml index 51170261f..d6e1ff017 100644 --- a/src/activities/memory-tux/ActivityInfo.qml +++ b/src/activities/memory-tux/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory-tux/MemoryTux.qml" difficulty: 1 icon: "memory-tux/memory-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Memory Game with images against Tux") //: Help title description: qsTr("Flip the cards to find the matching pairs against Tux") // intro: "Click on a card and find its double." //: Help goal goal: qsTr("Train your memory and remove all the cards") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("A set of blank cards is shown. Each card has a picture on the other side, and each picture card has a twin exactly the same. Click on a card to see its hidden picture, and try to match the twins. You can only turn over two cards at once, so you need to remember where a picture is, while you look for its twin. When you turn over the twins, they both disappear. Tux teacher do the same.") credit: "" section: "fun memory" createdInVersion: 0 } diff --git a/src/activities/memory-wordnumber/ActivityInfo.qml b/src/activities/memory-wordnumber/ActivityInfo.qml index fe8e35147..689963fb4 100644 --- a/src/activities/memory-wordnumber/ActivityInfo.qml +++ b/src/activities/memory-wordnumber/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "memory-wordnumber/MemoryWordnumber.qml" difficulty: 3 icon: "memory-wordnumber/memory-wordnumber.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Wordnumber memory game") //: Help title description: qsTr("Turn the cards over to match the number with the word matching it.") // intro: "Match the numeric with the word." //: Help goal goal: qsTr("Reading numbers, memory.") //: Help prerequisite prerequisite: qsTr("Reading") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding the numeral form of a number, or the word to write it.") credit: "" section: "math numeration" createdInVersion: 0 } diff --git a/src/activities/memory/ActivityInfo.qml b/src/activities/memory/ActivityInfo.qml index 6af2b18cf..064aaedc2 100644 --- a/src/activities/memory/ActivityInfo.qml +++ b/src/activities/memory/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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: "memory/Memory.qml" difficulty: 1 icon: "memory/memory.svg" author: "JB BUTET <ashashiwa@gmail.com>" - demo: true //: Activity title title: qsTr("Memory Game with images") //: Help title description: qsTr("Flip the cards to find the matching pairs") // intro: "Click on a card and find its double." //: Help goal goal: qsTr("Train your memory and remove all the cards") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A set of blank cards is shown. Each card has a picture on the other side, and each picture card has a twin exactly the same. Click on a card to see its hidden picture, and try to match the twins. You can only turn over two cards at once, so you need to remember where a picture is, while you look for its twin. When you turn over the twins, they both disappear.") credit: "" section: "fun memory" createdInVersion: 0 } diff --git a/src/activities/menu/ConfigurationItem.qml b/src/activities/menu/ConfigurationItem.qml index 8b25af68e..fabe8d43d 100644 --- a/src/activities/menu/ConfigurationItem.qml +++ b/src/activities/menu/ConfigurationItem.qml @@ -1,885 +1,733 @@ /* GCompris - ConfigurationItem.qml * * Copyright (C) 2014-2016 Johnny Jazeix * * Authors: * Johnny Jazeix * * 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 QtQuick.Controls 1.5 import QtQuick.Controls.Styles 1.4 import GCompris 1.0 import QtMultimedia 5.0 import "../../core" import "qrc:/gcompris/src/core/core.js" as Core Item { id: dialogConfig property var languages: allLangs.languages property int contentWidth: Math.floor(dialogConfig.width * 0.9) height: contentColumn.height LanguageList { id: allLangs inMenu: true } Column { id: contentColumn spacing: 10 * ApplicationInfo.ratio width: parent.width move: Transition { NumberAnimation { properties: "x,y"; duration: 120 } } - // Put configuration here - Row { - id: demoModeBox - width: parent.width - spacing: 10 * ApplicationInfo.ratio - - property bool checked: !ApplicationSettings.isDemoMode - - Image { - sourceSize.height: 50 * ApplicationInfo.ratio - source: - demoModeBox.checked ? "qrc:/gcompris/src/core/resource/apply.svg" : - "qrc:/gcompris/src/core/resource/cancel.svg" - MouseArea { - anchors.fill: parent - onClicked: { - if(ApplicationSettings.isDemoMode) - ApplicationSettings.isDemoMode = false - } - } - } - - Button { - width: parent.parent.width - 50 * ApplicationInfo.ratio - 10 * 2 - height: parent.height - enabled: ApplicationSettings.isDemoMode - anchors.leftMargin: 10 - anchors.verticalCenter: parent.verticalCenter - text: demoModeBox.checked ? qsTr("You have the full version") : - qsTr("Buy the full version").toUpperCase() - style: ButtonStyle { - background: Rectangle { - implicitWidth: 100 - implicitHeight: 25 - border.width: control.activeFocus ? 4 : 2 - border.color: "black" - radius: 10 - gradient: Gradient { - GradientStop { position: 0 ; color: control.pressed ? "#87ff5c" : - ApplicationSettings.isDemoMode ? "#ffe85c" : "#EEEEEE"} - GradientStop { position: 1 ; color: control.pressed ? "#44ff00" : - ApplicationSettings.isDemoMode ? "#f8d600" : "#AAAAAA"} - } - } - label: GCText { - text: control.text - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - wrapMode: Text.WordWrap - } - } - - onClicked: { - if(ApplicationSettings.activationMode == 1) { - if(ApplicationSettings.isDemoMode) - ApplicationSettings.isDemoMode = false - } else if(ApplicationSettings.activationMode == 2) { - activationCodeEntry.visible = !activationCodeEntry.visible - } - } - } - } - - Column { - id: activationCodeEntry - width: parent.width - spacing: 10 - visible: false - opacity: 0 - - Behavior on opacity { NumberAnimation { duration: 200 } } - - onVisibleChanged: { - if(visible) { - activationInput.forceActiveFocus() - activationInput.cursorPosition = 0 - opacity = 1 - } else { - activationInput.focus = false - opacity = 0 - } - } - - GCText { - id: activationInstruction - fontSize: regularSize - color: "black" - style: Text.Outline - styleColor: "white" - horizontalAlignment: Text.AlignHCenter - width: parent.width - wrapMode: TextEdit.WordWrap - text: qsTr("On https://gcompris.net " + - "you will find the instructions to obtain an activation code.") - Component.onCompleted: ApplicationInfo.isDownloadAllowed ? - linkActivated.connect(Qt.openUrlExternally) : null - } - - TextInput { - id: activationInput - width: parent.width - focus: true - font.weight: Font.DemiBold - font.pointSize: ApplicationSettings.baseFontSize - + 14 * ApplicationInfo.fontRatio - color: 'black' - horizontalAlignment: Text.AlignHCenter - inputMask: '>HHHH-HHHH-HHHH;#' - text: ApplicationSettings.codeKey - onTextChanged: { - var code = text.replace(/-/g,'') - var codeValidity = ApplicationSettings.checkActivationCode(code); - switch (codeValidity) { - case 0: - activationMsg.text = qsTr('Enter your activation code'); - break; - case 1: - activationMsg.text = qsTr('Sorry, your code is too old for this version of GCompris'); - break; - case 2: - activationMsg.text = qsTr('Your code is valid, thanks a lot for your support'); - activationCodeEntry.visible = false - ApplicationSettings.codeKey = code - break; - } - } - } - - GCText { - id: activationMsg - width: parent.width - color: "black" - fontSize: regularSize - horizontalAlignment: TextInput.AlignHCenter - wrapMode: TextEdit.WordWrap - } - } - - GCDialogCheckBox { - id: displayLockedActivitiesBox - text: qsTr("Show locked activities") - visible: ApplicationSettings.isDemoMode - checked: showLockedActivities - onCheckedChanged: { - showLockedActivities = checked; - } - } - GCDialogCheckBox { id: enableAudioVoicesBox text: qsTr("Enable audio voices") checked: isAudioVoicesEnabled onCheckedChanged: { isAudioVoicesEnabled = checked; } } GCDialogCheckBox { id: enableAudioEffectsBox text: qsTr("Enable audio effects") checked: isAudioEffectsEnabled onCheckedChanged: { isAudioEffectsEnabled = checked; } } GCText { id: audioEffectsVolumeText text: qsTr("Audio effects volume") width: dialogConfig.contentWidth fontSize: mediumSize wrapMode: Text.WordWrap } GCSlider { id: audioEffectsVolumeSlider width: 250 * ApplicationInfo.ratio maximumValue: 10 minimumValue: 0 value: audioEffectsVolume * 10 onValueChanged: ApplicationSettings.audioEffectsVolume = value / 10; scrollEnabled: false } GCDialogCheckBox { id: enableBackgroundMusicBox text: qsTr("Enable background music") checked: isBackgroundMusicEnabled onCheckedChanged: { isBackgroundMusicEnabled = checked; } } Flow { spacing: 5 * ApplicationInfo.ratio width: dialogConfig.contentWidth GCText { text: qsTr("Background Music") fontSize: mediumSize } Image { source: "qrc:/gcompris/src/core/resource/bar_next.svg" height: parent.height sourceSize.width: height MouseArea { anchors.fill: parent enabled: (backgroundMusic.playbackState == Audio.PlayingState && !backgroundMusic.muted) onClicked: backgroundMusic.nextAudio() } } } Button { id: backgroundMusicName height: 30 * ApplicationInfo.ratio width: background.width * 0.8 text: { if(backgroundMusic.playbackState != Audio.PlayingState) return qsTr("Not playing") else if (backgroundMusic.metaDataMusic[0] != undefined) return (qsTr("Title: %1 Artist: %2").arg(backgroundMusic.metaDataMusic[0]).arg(backgroundMusic.metaDataMusic[1])) else if (String(backgroundMusic.source).slice(0, 37) === "qrc:/gcompris/src/core/resource/intro") return qsTr("Introduction music") return "" } style: GCButtonStyle {} onClicked: { dialogConfig.visible = false backgroundMusicList.visible = true } } GCText { id: backgroundMusicVolumeText text: qsTr("Background music volume") fontSize: mediumSize wrapMode: Text.WordWrap } GCSlider { id: backgroundMusicVolumeSlider width: 250 * ApplicationInfo.ratio maximumValue: 10 minimumValue: 0 value: backgroundMusicVolume * 10 onValueChanged: ApplicationSettings.backgroundMusicVolume = value / 10; scrollEnabled: false } GCDialogCheckBox { id: enableFullscreenBox text: qsTr("Fullscreen") checked: isFullscreen onCheckedChanged: { isFullscreen = checked; } visible: !ApplicationInfo.isMobile } GCDialogCheckBox { id: enableVirtualKeyboardBox text: qsTr("Virtual Keyboard") checked: isVirtualKeyboard onCheckedChanged: { isVirtualKeyboard = checked; } } GCDialogCheckBox { id: enableAutomaticDownloadsBox checked: isAutomaticDownloadsEnabled text: qsTr("Enable automatic downloads/updates of sound files") visible: ApplicationInfo.isDownloadAllowed onCheckedChanged: { isAutomaticDownloadsEnabled = checked; } } /* Technically wordset config is a string that holds the wordset name or '' for the * internal wordset. But as we support only internal and words its best to show the * user a boolean choice. */ GCDialogCheckBox { id: wordsetBox checked: DownloadManager.isDataRegistered("words") text: enabled ? qsTr("Use full word image set") : qsTr("Download full word image set") visible: ApplicationInfo.isDownloadAllowed enabled: !DownloadManager.isDataRegistered("words") onCheckedChanged: { wordset = checked ? 'data2/words/words.rcc' : ''; } } GCDialogCheckBox { id: sectionVisibleBox checked: sectionVisible text: qsTr("The activity section menu is visible") onCheckedChanged: { sectionVisible = checked; } } GCComboBox { id: fontBox model: fonts background: dialogActivityConfig label: qsTr("Font selector") } GCText { id: baseFontSizeText text: qsTr("Font size") width: dialogConfig.contentWidth fontSize: mediumSize wrapMode: Text.WordWrap } Flow { spacing: 5 width: dialogConfig.contentWidth GCSlider { id: baseFontSizeSlider width: 250 * ApplicationInfo.ratio maximumValue: ApplicationSettings.baseFontSizeMax minimumValue: ApplicationSettings.baseFontSizeMin value: baseFontSize onValueChanged: ApplicationSettings.baseFontSize = value; scrollEnabled: false } Button { height: 30 * ApplicationInfo.ratio text: qsTr("Default"); style: GCButtonStyle {} onClicked: baseFontSizeSlider.value = 0.0 } } GCComboBox { id: fontCapitalizationBox model: fontCapitalizationModel background: dialogActivityConfig label: qsTr("Font Capitalization") } GCText { id: fontLetterSpacingText text: qsTr("Font letter spacing") fontSize: mediumSize width: dialogConfig.contentWidth wrapMode: Text.WordWrap } Flow { spacing: 5 width: dialogConfig.contentWidth GCSlider { id: fontLetterSpacingSlider width: 250 * ApplicationInfo.ratio maximumValue: ApplicationSettings.fontLetterSpacingMax minimumValue: ApplicationSettings.fontLetterSpacingMin value: fontLetterSpacing onValueChanged: ApplicationSettings.fontLetterSpacing = value; scrollEnabled: false } Button { height: 30 * ApplicationInfo.ratio text: qsTr("Default"); style: GCButtonStyle {} onClicked: fontLetterSpacingSlider.value = ApplicationSettings.fontLetterSpacingMin } } GCComboBox { id: languageBox model: dialogConfig.languages background: dialogActivityConfig onCurrentIndexChanged: voicesRow.localeChanged(); label: qsTr("Language selector") } Flow { id: voicesRow width: dialogConfig.contentWidth spacing: 5 * ApplicationInfo.ratio property bool haveLocalResource: false function localeChanged() { var language = dialogConfig.languages[languageBox.currentIndex].text; voicesRow.haveLocalResource = DownloadManager.isDataRegistered( "voices-" + ApplicationInfo.CompressedAudio + "/" + ApplicationInfo.getVoicesLocale(dialogConfig.languages[languageBox.currentIndex].locale) ) } Connections { target: DownloadManager onDownloadFinished: voicesRow.localeChanged() } GCText { id: voicesText text: qsTr("Localized voices") fontSize: mediumSize wrapMode: Text.WordWrap } Image { id: voicesImage sourceSize.height: 30 * ApplicationInfo.ratio source: voicesRow.haveLocalResource ? "qrc:/gcompris/src/core/resource/apply.svg" : "qrc:/gcompris/src/core/resource/cancel.svg" } Button { id: voicesButton height: 30 * ApplicationInfo.ratio visible: ApplicationInfo.isDownloadAllowed text: voicesRow.haveLocalResource ? qsTr("Check for updates") : qsTr("Download") style: GCButtonStyle {} onClicked: { if (DownloadManager.downloadResource( DownloadManager.getVoicesResourceForLocale(dialogConfig.languages[languageBox.currentIndex].locale))) { var downloadDialog = Core.showDownloadDialog(dialogConfig.parent.rootItem, {}); } } } } GCText { text: qsTr("Difficulty filter:") fontSize: mediumSize width: dialogConfig.contentWidth height: 50 * ApplicationInfo.ratio } Flow { id: difficultyFlow width: dialogConfig.contentWidth spacing: 5 * ApplicationInfo.ratio property int starsSize: Math.floor(dialogConfig.contentWidth * 0.11) Image { source: "qrc:/gcompris/src/core/resource/bar_next.svg" sourceSize.height: difficultyFlow.starsSize sourceSize.width: difficultyFlow.starsSize MouseArea { anchors.fill: parent onClicked: { filterRepeater.setMin(filterRepeater.minFilter + 1) } } } // Level filtering Repeater { id: filterRepeater model: 6 property int minFilter: ApplicationSettings.filterLevelMin property int maxFilter: ApplicationSettings.filterLevelMax function setMin(value) { var newMin if(minFilter < 1) { newMin = 1 } else if(minFilter > 6) { newMin = 6 } else if(maxFilter >= value) { newMin = value } if(newMin) { minFilter = newMin } } function setMax(value) { var newMax if(maxFilter < 1) { newMax = 1 } else if(maxFilter > 6) { newMax = 6 } else if(minFilter <= value) { newMax = value } if(newMax) { maxFilter = newMax } } Image { source: "qrc:/gcompris/src/core/resource/difficulty" + (modelData + 1) + ".svg"; sourceSize.width: difficultyFlow.starsSize opacity: modelData + 1 >= filterRepeater.minFilter && modelData + 1 <= filterRepeater.maxFilter ? 1 : 0.4 property int value: modelData + 1 MouseArea { anchors.fill: parent onClicked: { if(parent.value < filterRepeater.maxFilter) { if(parent.opacity == 1) { filterRepeater.setMin(parent.value + 1) } else { filterRepeater.setMin(parent.value) } } else if(parent.value > filterRepeater.minFilter) { if(parent.opacity == 1) { filterRepeater.setMax(parent.value - 1) } else { filterRepeater.setMax(parent.value) } } } } } } Image { source: "qrc:/gcompris/src/core/resource/bar_previous.svg" sourceSize.height: difficultyFlow.starsSize sourceSize.width: difficultyFlow.starsSize MouseArea { anchors.fill: parent onClicked: { filterRepeater.setMax(filterRepeater.maxFilter - 1) } } } } } - property bool showLockedActivities: ApplicationSettings.showLockedActivities property bool isAudioVoicesEnabled: ApplicationSettings.isAudioVoicesEnabled property bool isAudioEffectsEnabled: ApplicationSettings.isAudioEffectsEnabled property bool isBackgroundMusicEnabled: ApplicationSettings.isBackgroundMusicEnabled property bool isFullscreen: ApplicationSettings.isFullscreen property bool isVirtualKeyboard: ApplicationSettings.isVirtualKeyboard property bool isAutomaticDownloadsEnabled: ApplicationSettings.isAutomaticDownloadsEnabled property bool sectionVisible: ApplicationSettings.sectionVisible property string wordset: ApplicationSettings.wordset property var filteredBackgroundMusic: ApplicationSettings.filteredBackgroundMusic property var allBackgroundMusic: ApplicationInfo.getBackgroundMusicFromRcc() property int baseFontSize // don't bind to ApplicationSettings.baseFontSize property real fontLetterSpacing // don't bind to ApplicationSettings.fontLetterSpacing // or we get a binding loop warning property real backgroundMusicVolume property real audioEffectsVolume function extractMusicNameFromPath(musicPath) { var musicDirectoryPath = ApplicationInfo.getAudioFilePath("backgroundMusic/") var musicName = String(musicPath) musicName = musicName.slice(musicDirectoryPath.length, musicName.length) return musicName.slice(0, musicName.lastIndexOf('.')) } function loadFromConfig() { // Synchronize settings with data - showLockedActivities = ApplicationSettings.showLockedActivities isAudioVoicesEnabled = ApplicationSettings.isAudioVoicesEnabled enableAudioVoicesBox.checked = isAudioVoicesEnabled isAudioEffectsEnabled = ApplicationSettings.isAudioEffectsEnabled enableAudioEffectsBox.checked = isAudioEffectsEnabled isBackgroundMusicEnabled = ApplicationSettings.isBackgroundMusicEnabled enableBackgroundMusicBox.checked = isBackgroundMusicEnabled isFullscreen = ApplicationSettings.isFullscreen enableFullscreenBox.checked = isFullscreen isVirtualKeyboard = ApplicationSettings.isVirtualKeyboard enableVirtualKeyboardBox.checked = isVirtualKeyboard isAutomaticDownloadsEnabled = ApplicationSettings.isAutomaticDownloadsEnabled enableAutomaticDownloadsBox.checked = isAutomaticDownloadsEnabled filterRepeater.minFilter = ApplicationSettings.filterLevelMin filterRepeater.maxFilter = ApplicationSettings.filterLevelMax sectionVisible = ApplicationSettings.sectionVisible sectionVisibleBox.checked = sectionVisible wordset = ApplicationSettings.wordset wordsetBox.checked = DownloadManager.isDataRegistered("words") || ApplicationSettings.wordset == 'data2/words/words.rcc' wordsetBox.enabled = !DownloadManager.isDataRegistered("words") baseFontSize = ApplicationSettings.baseFontSize fontLetterSpacing = ApplicationSettings.fontLetterSpacing backgroundMusicVolume = ApplicationSettings.backgroundMusicVolume audioEffectsVolume = ApplicationSettings.audioEffectsVolume filteredBackgroundMusic = ApplicationSettings.filteredBackgroundMusic allBackgroundMusic = ApplicationInfo.getBackgroundMusicFromRcc() if(filteredBackgroundMusic.length === 0) filteredBackgroundMusic = allBackgroundMusic // Set locale for(var i = 0 ; i < dialogConfig.languages.length ; i ++) { if(dialogConfig.languages[i].locale === ApplicationSettings.locale) { languageBox.currentIndex = i; break; } } // Set font for(var i = 0 ; i < fonts.count ; i ++) { if(fonts.get(i).text == ApplicationSettings.font) { fontBox.currentIndex = i; break; } } // Set font capitalization for(var i = 0 ; i < fontCapitalizationModel.length ; i ++) { if(fontCapitalizationModel[i].value == ApplicationSettings.fontCapitalization) { fontCapitalizationBox.currentIndex = i; break; } } } function save() { - ApplicationSettings.showLockedActivities = showLockedActivities ApplicationSettings.isAudioVoicesEnabled = isAudioVoicesEnabled ApplicationSettings.isAudioEffectsEnabled = isAudioEffectsEnabled ApplicationSettings.isBackgroundMusicEnabled = isBackgroundMusicEnabled ApplicationSettings.filteredBackgroundMusic = filteredBackgroundMusic ApplicationSettings.isFullscreen = isFullscreen ApplicationSettings.isVirtualKeyboard = isVirtualKeyboard ApplicationSettings.isAutomaticDownloadsEnabled = isAutomaticDownloadsEnabled ApplicationSettings.sectionVisible = sectionVisible ApplicationSettings.wordset = wordset ApplicationSettings.isEmbeddedFont = fonts.get(fontBox.currentIndex).isLocalResource; ApplicationSettings.font = fonts.get(fontBox.currentIndex).text ApplicationSettings.fontCapitalization = fontCapitalizationModel[fontCapitalizationBox.currentIndex].value if(ApplicationSettings.filterLevelMin != filterRepeater.minFilter || ApplicationSettings.filterLevelMax != filterRepeater.maxFilter) { ApplicationSettings.filterLevelMin = filterRepeater.minFilter ApplicationSettings.filterLevelMax = filterRepeater.maxFilter ActivityInfoTree.minMaxFiltersChanged(filterRepeater.minFilter, filterRepeater.maxFilter) } ApplicationSettings.saveBaseFontSize(); ApplicationSettings.notifyFontLetterSpacingChanged(); if (ApplicationSettings.locale != dialogConfig.languages[languageBox.currentIndex].locale) { ApplicationSettings.locale = dialogConfig.languages[languageBox.currentIndex].locale if(ApplicationInfo.isDownloadAllowed && !DownloadManager.isDataRegistered( "voices-" + ApplicationInfo.CompressedAudio + "/" + ApplicationInfo.getVoicesLocale(dialogConfig.languages[languageBox.currentIndex].locale) )) { // ask for downloading new voices Core.showMessageDialog(main, qsTr("You selected a new locale. You need to restart GCompris to play in your new locale.
Do you want to download the corresponding sound files now?"), qsTr("Yes"), function() { // yes -> start download if (DownloadManager.downloadResource( DownloadManager.getVoicesResourceForLocale(ApplicationSettings.locale))) var downloadDialog = Core.showDownloadDialog(main, {}); }, qsTr("No"), null, null ); } else { // check for updates or/and register new voices DownloadManager.updateResource( DownloadManager.getVoicesResourceForLocale(ApplicationSettings.locale)) } } // download words.rcc if needed if(ApplicationSettings.wordset != "") { // we want to use the external dataset, it is either in // words/words.rcc or full-${CA}.rcc if(DownloadManager.isDataRegistered("words")) { // we either have it, we try to update in the background // or we are downloading it if(DownloadManager.haveLocalResource(wordset)) DownloadManager.updateResource(wordset) } else { // download automatically if automatic download else ask for download if(isAutomaticDownloadsEnabled) { var prevAutomaticDownload = ApplicationSettings.isAutomaticDownloadsEnabled ApplicationSettings.isAutomaticDownloadsEnabled = true; DownloadManager.updateResource(wordset); ApplicationSettings.isAutomaticDownloadsEnabled = prevAutomaticDownload } else { Core.showMessageDialog(main, qsTr("The images for several activities are not yet installed. ") + qsTr("Do you want to download them now?"), qsTr("Yes"), function() { if (DownloadManager.downloadResource(wordset)) var downloadDialog = Core.showDownloadDialog(pageView.currentItem, {}); }, qsTr("No"), function() { ApplicationSettings.wordset = '' }, null ); } } } // download backgroundMusic.rcc if needed if(DownloadManager.isDataRegistered("backgroundMusic")) { // we either have it, we try to update in the background // or we are downloading it if(DownloadManager.haveLocalResource(DownloadManager.getBackgroundMusicResources())) DownloadManager.updateResource(DownloadManager.getBackgroundMusicResources()) } else { // download automatically if automatic download else ask for download if(isAutomaticDownloadsEnabled) { var prevAutomaticDownload = ApplicationSettings.isAutomaticDownloadsEnabled ApplicationSettings.isAutomaticDownloadsEnabled = true; DownloadManager.updateResource(DownloadManager.getBackgroundMusicResources()); ApplicationSettings.isAutomaticDownloadsEnabled = prevAutomaticDownload } else if(ApplicationSettings.isBackgroundMusicEnabled) { Core.showMessageDialog(main, qsTr("The background music is not yet installed. ") + qsTr("Do you want to download it now?"), qsTr("Yes"), function() { if (DownloadManager.downloadResource(DownloadManager.getBackgroundMusicResources())) var downloadDialog = Core.showDownloadDialog(pageView.currentItem, {}); }, qsTr("No"),null ); } } } ListModel { id: fonts Component.onCompleted: { var systemFonts = Qt.fontFamilies(); var rccFonts = ApplicationInfo.getFontsFromRcc(); // Remove explicitly all *symbol* and *ding* fonts var excludedFonts = ApplicationInfo.getSystemExcludedFonts(); excludedFonts.push("ding"); excludedFonts.push("symbol"); // first display fonts from rcc for(var i = 0 ; i < rccFonts.length ; ++ i) { // Append fonts from resources fonts.append({ "text": rccFonts[i], "isLocalResource": true }); } for(var i = 0 ; i < systemFonts.length ; ++ i) { var isExcluded = false; var systemFont = systemFonts[i].toLowerCase(); // Remove symbol fonts for(var j = 0 ; j < excludedFonts.length ; ++ j) { if(systemFont.indexOf(excludedFonts[j].toLowerCase()) != -1) { isExcluded = true; break; } } // Remove fonts from rcc (if you have a default font from rcc, Qt will add it to systemFonts) for(var j = 0 ; j < rccFonts.length ; ++ j) { if(rccFonts[j].toLowerCase().indexOf(systemFont) != -1) { isExcluded = true; break; } } // Finally, we know if we add this font or not if(!isExcluded) { fonts.append({ "text": systemFonts[i], "isLocalResource": false }); } } } } property var fontCapitalizationModel: [ { text: qsTr("Mixed case (default)"), value: Font.MixedCase }, { text: qsTr("All uppercase"), value: Font.AllUppercase }, { text: qsTr("All lowercase"), value: Font.AllLowercase } ] function isFilteredBackgroundMusicChanged() { initialFilteredMusic = ApplicationSettings.filteredBackgroundMusic if(initialFilteredMusic.length != filteredBackgroundMusic.length) return true for(var i = 0; i < initialFilteredMusic.length; i++) if(filteredBackgroundMusic.indexOf(initialFilteredMusic[i]) == -1) return true return false } function hasConfigChanged() { return (ApplicationSettings.locale !== dialogConfig.languages[languageBox.currentIndex].locale || (ApplicationSettings.sectionVisible != sectionVisible) || (ApplicationSettings.wordset != wordset) || (ApplicationSettings.font != fonts.get(fontBox.currentIndex).text) || (ApplicationSettings.isEmbeddedFont != fonts.get(fontBox.currentIndex).isLocalResource) || (ApplicationSettings.isEmbeddedFont != fonts.get(fontBox.currentIndex).isLocalResource) || (ApplicationSettings.fontCapitalization != fontCapitalizationModel[(fontcapitalizationBox.currentIndex)].value) || (ApplicationSettings.fontLetterSpacing != fontLetterSpacing) || (ApplicationSettings.isAudioVoicesEnabled != isAudioVoicesEnabled) || (ApplicationSettings.isAudioEffectsEnabled != isAudioEffectsEnabled) || (ApplicationSettings.isBackgroundMusicEnabled != isBackgroundMusicEnabled) || (ApplicationSettings.isFullscreen != isFullscreen) || (ApplicationSettings.isVirtualKeyboard != isVirtualKeyboard) || (ApplicationSettings.isAutomaticDownloadsEnabled != isAutomaticDownloadsEnabled) || (ApplicationSettings.baseFontSize != baseFontSize) || - (ApplicationSettings.showLockedActivities != showLockedActivities) || isFilteredBackgroundMusicChanged() ); } } diff --git a/src/activities/menu/Menu.qml b/src/activities/menu/Menu.qml index d7cf12cf1..e84dec25a 100644 --- a/src/activities/menu/Menu.qml +++ b/src/activities/menu/Menu.qml @@ -1,1118 +1,1103 @@ /* GCompris - Menu.qml * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin (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 GCompris 1.0 import QtGraphicalEffects 1.0 import "qrc:/gcompris/src/core/core.js" as Core import QtQuick.Controls 1.5 import QtQuick.Controls.Styles 1.4 /** * GCompris' top level menu screen. * * Displays a grid of available activities divided subdivided in activity * categories/sections. * * The visibility of the section row is toggled by the setting * ApplicationSettings.sectionVisible. * * The list of available activities depends on the following settings: * * * ApplicationSettings.showLockedActivities * * ApplicationSettings.filterLevelMin * * ApplicationSettings.filterLevelMax * * @inherit QtQuick.Item */ ActivityBase { id: activity focus: true activityInfo: ActivityInfoTree.rootMenu onBack: { pageView.pop(to); // Restore focus that has been taken by the loaded activity if(pageView.currentItem == activity) focus = true; } onHome: { if(pageView.depth === 1 && !ApplicationSettings.isKioskMode) { Core.quit(main); } else { pageView.pop(); // Restore focus that has been taken by the loaded activity if(pageView.currentItem == activity) focus = true; } } onDisplayDialog: pageView.push(dialog) onDisplayDialogs: { var toPush = new Array(); for (var i = 0; i < dialogs.length; i++) { toPush.push({item: dialogs[i]}); } pageView.push(toPush); } Connections { // At the launch of the application, box2d check is performed after we // first initialize the menu. This connection is to refresh // automatically the menu at start. target: ApplicationInfo onIsBox2DInstalledChanged: { ActivityInfoTree.filterByTag(activity.currentTag, currentCategory) - ActivityInfoTree.filterLockedActivities() ActivityInfoTree.filterEnabledActivities() } } // @cond INTERNAL_DOCS property string url: "qrc:/gcompris/src/activities/menu/resource/" property var sections: [ { icon: activity.url + "all.svg", tag: "favorite" }, { icon: activity.url + "computer.svg", tag: "computer" }, { icon: activity.url + "discovery.svg", tag: "discovery", categories: [{ "logic": qsTr("Logic") }, { "arts": qsTr("Fine Arts") }, { "music": qsTr("Music") } ] }, { icon: activity.url + "sciences.svg", tag: "sciences", categories: [{ "experiment": qsTr("Experiment") }, { "history": qsTr("History") }, { "geography": qsTr("Geography") } ] }, { icon: activity.url + "fun.svg", tag: "fun" }, { icon: activity.url + "math.svg", tag: "math", categories: [{ "numeration": qsTr("Numeration") }, { "arithmetic": qsTr("Arithmetic") }, { "measures": qsTr("Measures") } ] }, { icon: activity.url + "puzzle.svg", tag: "puzzle" }, { icon: activity.url + "reading.svg", tag: "reading", categories: [{ "letters": qsTr("Letters") }, { "words": qsTr("Words") }, { "vocabulary": qsTr("Vocabulary") } ] }, { icon: activity.url + "strategy.svg", tag: "strategy" }, { icon: activity.url + "search-icon.svg", tag: "search" } ] property string currentTag: sections[0].tag property var currentTagCategories: [] property string currentCategory: "" /// @endcond property string clickMode: "play" pageComponent: Image { id: background source: activity.url + "background.svg" sourceSize.width: Math.max(parent.width, parent.height) height: main.height fillMode: Image.PreserveAspectCrop Timer { // triggered once at startup to populate the keyboard id: keyboardFiller interval: 1000; running: true; onTriggered: { keyboard.populate(); } } function loadActivity() { // @TODO init of item would be better in setsource but it crashes on Qt5.6 // https://bugreports.qt.io/browse/QTBUG-49793 activityLoader.item.audioVoices = audioVoices activityLoader.item.audioEffects = audioEffects activityLoader.item.loading = loading //take the focus away from textField before starting an activity searchTextField.focus = false pageView.push(activityLoader.item) } Loader { id: activityLoader asynchronous: true onStatusChanged: { if (status == Loader.Loading) { loading.start(); } else if (status == Loader.Ready) { loading.stop(); loadActivity(); } else if (status == Loader.Error) loading.stop(); } } // Filters property bool horizontal: main.width >= main.height property int sectionIconWidth: Math.min(100 * ApplicationInfo.ratio, main.width / (sections.length + 1)) property int sectionCellWidth: sectionIconWidth * 1.1 property int categoriesHeight: currentCategory == "" ? 0 : sectionCellWidth - 2 property var currentActiveGrid: activitiesGrid property bool keyboardMode: false Keys.onPressed: { // Ctrl-modifiers should never be handled by the search-field if (event.modifiers === Qt.ControlModifier) { if (event.key === Qt.Key_S) { // Ctrl+S toggle show / hide section ApplicationSettings.sectionVisible = !ApplicationSettings.sectionVisible } } else if(currentTag === "search") { // forward to the virtual keyboard the pressed keys if(event.key == Qt.Key_Backspace) keyboard.keypress(keyboard.backspace); else keyboard.keypress(event.text); } else if(event.key === Qt.Key_Space && currentActiveGrid.currentItem) { currentActiveGrid.currentItem.selectCurrentItem() } } Keys.onReleased: { keyboardMode = true event.accepted = false } Keys.onTabPressed: { if(currentActiveGrid == section) { if(currentTagCategories && currentTagCategories.length != 0) { currentActiveGrid = categoriesGrid; } else { currentActiveGrid = activitiesGrid; } } else if(currentActiveGrid == categoriesGrid) { currentActiveGrid = activitiesGrid; } else { currentActiveGrid = section; } } Keys.onEnterPressed: if(currentActiveGrid.currentItem) currentActiveGrid.currentItem.selectCurrentItem(); Keys.onReturnPressed: if(currentActiveGrid.currentItem) currentActiveGrid.currentItem.selectCurrentItem(); Keys.onRightPressed: if(currentActiveGrid.currentItem) currentActiveGrid.moveCurrentIndexRight(); Keys.onLeftPressed: if(currentActiveGrid.currentItem) currentActiveGrid.moveCurrentIndexLeft(); Keys.onDownPressed: if(currentActiveGrid.currentItem && !currentActiveGrid.atYEnd) currentActiveGrid.moveCurrentIndexDown(); Keys.onUpPressed: if(currentActiveGrid.currentItem && !currentActiveGrid.atYBeginning) currentActiveGrid.moveCurrentIndexUp(); GridView { id: section model: sections x: ApplicationSettings.sectionVisible ? section.initialX : -sectionCellWidth y: ApplicationSettings.sectionVisible ? section.initialY : -sectionCellWidth visible: ApplicationSettings.sectionVisible cellWidth: sectionCellWidth cellHeight: sectionCellWidth interactive: false keyNavigationWraps: true property int initialX: 4 property int initialY: 4 Component { id: sectionDelegate Item { id: backgroundSection width: sectionCellWidth height: sectionCellWidth Image { source: modelData.icon sourceSize.height: sectionIconWidth anchors.margins: 5 anchors.horizontalCenter: parent.horizontalCenter } ParticleSystemStarLoader { id: particles anchors.fill: backgroundSection clip: false } MouseArea { anchors.fill: backgroundSection onClicked: { selectCurrentItem() } } function selectCurrentItem() { section.currentIndex = index activity.currentTag = modelData.tag activity.currentTagCategories = modelData.categories if(modelData.categories != undefined) { currentCategory = Object.keys(modelData.categories[0])[0]; } else { currentCategory = "" } particles.burst(10) if(modelData.tag === "search") { ActivityInfoTree.filterBySearch(searchTextField.text); } else { ActivityInfoTree.filterByTag(modelData.tag, currentCategory) - ActivityInfoTree.filterLockedActivities() ActivityInfoTree.filterEnabledActivities() } } } } delegate: sectionDelegate highlight: Item { width: sectionCellWidth height: sectionCellWidth Rectangle { anchors.fill: parent color: "#5AFFFFFF" } Image { source: "qrc:/gcompris/src/core/resource/button.svg" anchors.fill: parent } Behavior on x { SpringAnimation { spring: 2; damping: 0.2 } } Behavior on y { SpringAnimation { spring: 2; damping: 0.2 } } } } // Activities property int iconWidth: 120 * ApplicationInfo.ratio property int activityCellWidth: activitiesGrid.width / Math.floor(activitiesGrid.width / iconWidth) property int activityCellHeight: iconWidth * 1.7 Loader { id: warningOverlay anchors { bottom: parent.bottom right: parent.right margins: 4 } active: (ActivityInfoTree.menuTree.length === 0) && (currentTag === "favorite") sourceComponent: Item { anchors.fill: parent GCText { id: instructionTxt fontSize: smallSize y: height * 0.2 x: (parent.width - width) / 2 z: 2 width: parent.width * 0.6 horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap font.weight: Font.DemiBold color: 'white' text: qsTr("Put your favorite activities here by selecting the " + "sun at the top right of that activity.") } Rectangle { anchors.fill: instructionTxt anchors.margins: -6 z: 1 opacity: 0.5 radius: 10 border.width: 2 border.color: "black" gradient: Gradient { GradientStop { position: 0.0; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } } } } GridView { id: categoriesGrid model: currentTagCategories topMargin: 5 interactive: false keyNavigationWraps: true visible: activity.currentTag !== "search" cellWidth: currentTagCategories ? categoriesGrid.width / currentTagCategories.length : 0 cellHeight: height delegate: Button { id: button style: GCButtonStyle { selected: currentCategory === button.category theme: "categories" textSize: "regular" haveIconRight: horizontal } width: categoriesGrid.width / (currentTagCategories.length + 1) height: categoriesGrid.cellHeight text: modelData[category] property string category: Object.keys(modelData)[0] onClicked: { selectCurrentItem() } function selectCurrentItem() { categoriesGrid.currentIndex = index currentCategory = Object.keys(modelData)[0] ActivityInfoTree.filterByTag(currentTag, currentCategory) - ActivityInfoTree.filterLockedActivities() ActivityInfoTree.filterEnabledActivities() } Image { visible: horizontal source: "qrc:/gcompris/src/activities/menu/resource/category-" + button.category + ".svg"; height: Math.round(parent.height * 0.8) sourceSize.height: height width: height anchors { verticalCenter: parent.verticalCenter right: parent.right rightMargin: parent.height * 0.1 } } } highlight: Rectangle { z: 10 width: activityCellWidth - activitiesGrid.spacing height: activityCellHeight - activitiesGrid.spacing color: "#00FFFFFF" radius: 10 border.width: 5 border.color: "#FF87A6DD" visible: true Behavior on x { SpringAnimation { spring: 2; damping: 0.2 } } Behavior on y { SpringAnimation { spring: 2; damping: 0.2 } } } } GridView { id: activitiesGrid anchors { top: { if(searchBar.visible) return searchBar.bottom else return categoriesGrid.bottom } bottom: bar.top margins: 4 topMargin: currentCategory == "" ? 4 : 10 } width: background.width cellWidth: activityCellWidth cellHeight: activityCellHeight clip: true model: ActivityInfoTree.menuTree keyNavigationWraps: true property int spacing: 10 delegate: Item { id: delegateItem width: activityCellWidth - activitiesGrid.spacing height: activityCellHeight - activitiesGrid.spacing enabled: clickMode === "play" || dialogChooseLevel.hasConfigOrDataset Rectangle { id: activityBackground width: parent.width height: parent.height anchors.horizontalCenter: parent.horizontalCenter color: "white" opacity: 0.5 } Image { source: "qrc:/gcompris/src/activities/" + icon anchors.top: activityBackground.top anchors.horizontalCenter: parent.horizontalCenter width: iconWidth - activitiesGrid.spacing height: width sourceSize.width: width fillMode: Image.PreserveAspectFit anchors.margins: 5 opacity: delegateItem.enabled ? 1 : 0.5 Image { id: minimalDifficultyIcon source: "qrc:/gcompris/src/core/resource/difficulty" + ActivityInfoTree.menuTree[index].minimalDifficulty + ".svg" anchors.top: parent.top sourceSize.width: iconWidth * 0.15 } Image { id: iconSeparator source: "qrc:/gcompris/src/core/resource/separator.svg" visible: ActivityInfoTree.menuTree[index].minimalDifficulty !== ActivityInfoTree.menuTree[index].maximalDifficulty anchors.top: parent.top anchors.left: minimalDifficultyIcon.right sourceSize.height: minimalDifficultyIcon.height } Image { source: "qrc:/gcompris/src/core/resource/difficulty" + ActivityInfoTree.menuTree[index].maximalDifficulty + ".svg" visible: iconSeparator.visible anchors.top: parent.top anchors.left: iconSeparator.right sourceSize.width: minimalDifficultyIcon.width } - Image { - anchors { - horizontalCenter: parent.horizontalCenter - top: parent.top - rightMargin: 4 - } - source: demo || !ApplicationSettings.isDemoMode - ? "" : - activity.url + "lock.svg" - sourceSize.width: 30 * ApplicationInfo.ratio - } Image { anchors { left: parent.left bottom: parent.bottom } source: ActivityInfoTree.menuTree[index].createdInVersion == ApplicationInfo.GCVersionCode ? activity.url + "new.svg" : "" sourceSize.width: 30 * ApplicationInfo.ratio } GCText { id: title anchors.top: parent.bottom anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter width: activityBackground.width fontSizeMode: Text.Fit minimumPointSize: 7 fontSize: regularSize elide: Text.ElideRight maximumLineCount: 2 wrapMode: Text.WordWrap text: ActivityInfoTree.menuTree[index].title } } ParticleSystemStarLoader { id: particles anchors.fill: activityBackground } MouseArea { anchors.fill: activityBackground onClicked: selectCurrentItem() } Image { source: activity.url + (favorite ? "all.svg" : "all_disabled.svg"); anchors { top: parent.top right: parent.right rightMargin: 4 * ApplicationInfo.ratio } sourceSize.width: iconWidth * 0.25 visible: ApplicationSettings.sectionVisible MouseArea { anchors.fill: parent onClicked: favorite = !favorite } } DialogChooseLevel { id: dialogChooseLevel displayDatasetAtStart: hasDataset currentActivity: ActivityInfoTree.menuTree[index] inMenu: true onClose: { home() } onSaveData: { currentLevels = dialogChooseLevel.chosenLevels ApplicationSettings.setCurrentLevels(name, currentLevels) } onStartActivity: { clickMode = "play" // immediately pop the Dialog to load the activity // if we don't do it immediately the page is busy // and it does not load the activity pageView.pop({immediate: true}) selectCurrentItem() } } function selectCurrentItem() { if(pageView.busy || !delegateItem.enabled) return if(clickMode == "play") { particles.burst(50) ActivityInfoTree.currentActivity = ActivityInfoTree.menuTree[index] activityLoader.setSource("qrc:/gcompris/src/activities/" + ActivityInfoTree.currentActivity.name, { 'menu': activity, 'activityInfo': ActivityInfoTree.currentActivity, 'levelFolder': currentLevels }) if (activityLoader.status == Loader.Ready) loadActivity() } else { displayDialog(dialogChooseLevel); } activitiesGrid.currentIndex = index } } highlight: Rectangle { width: activityCellWidth - activitiesGrid.spacing height: activityCellHeight - activitiesGrid.spacing color: "#AAFFFFFF" border.width: 3 border.color: "black" visible: background.keyboardMode Behavior on x { SpringAnimation { spring: 2; damping: 0.2 } } Behavior on y { SpringAnimation { spring: 2; damping: 0.2 } } } Rectangle { id: activitiesMask visible: false anchors.fill: activitiesGrid gradient: Gradient { GradientStop { position: 0.0; color: "#FFFFFFFF" } GradientStop { position: 0.92; color: "#FFFFFFFF" } GradientStop { position: 0.96; color: "#00FFFFFF"} } } layer.enabled: ApplicationInfo.useOpenGL layer.effect: OpacityMask { id: activitiesOpacity source: activitiesGrid maskSource: activitiesMask anchors.fill: activitiesGrid } } // The scroll buttons GCButtonScroll { visible: !ApplicationInfo.useOpenGL anchors.right: parent.right anchors.rightMargin: 5 * ApplicationInfo.ratio anchors.bottom: activitiesGrid.bottom anchors.bottomMargin: 30 * ApplicationInfo.ratio onUp: activitiesGrid.flick(0, 1127) onDown: activitiesGrid.flick(0, -1127) upVisible: activitiesGrid.visibleArea.yPosition <= 0 ? false : true downVisible: activitiesGrid.visibleArea.yPosition >= 1 ? false : true } Rectangle { id: categories height: searchTextField.height visible: sections[activity.currentTag] === "search" } Rectangle { id: searchBar visible: activity.currentTag === "search" opacity: 0.5 radius: 10 border.width: 2 border.color: "black" gradient: Gradient { GradientStop { position: 0.3; color: "#000" } GradientStop { position: 0.9; color: "#666" } GradientStop { position: 1.0; color: "#AAA" } } Connections { // On mobile with GCompris' virtual keyboard activated: // Force invisibility of Androids virtual keyboard: target: (ApplicationInfo.isMobile && activity.currentTag === "search" && ApplicationSettings.isVirtualKeyboard) ? Qt.inputMethod : null onVisibleChanged: { if (ApplicationSettings.isVirtualKeyboard && visible) Qt.inputMethod.hide(); } onAnimatingChanged: { // note: seems to be never fired! if (ApplicationSettings.isVirtualKeyboard && Qt.inputMethod.visible) Qt.inputMethod.hide(); } } Connections { target: activity onCurrentTagChanged: { if (activity.currentTag === 'search') { searchTextField.focus = true; } else activity.focus = true; } } TextField { id: searchTextField width: parent.width height: parent.height textColor: "black" font.pointSize: 32 font.bold: true horizontalAlignment: TextInput.AlignHCenter verticalAlignment: TextInput.AlignVCenter font.family: GCSingletonFontLoader.fontLoader.name inputMethodHints: Qt.ImhNoPredictiveText // Note: we give focus to the textfield also in case // isMobile && !ApplicationSettings.isVirtualKeyboard // in conjunction with auto-hiding the inputMethod to always get // an input-cursor: activeFocusOnPress: true //ApplicationInfo.isMobile ? !ApplicationSettings.isVirtualKeyboard : true Keys.onReturnPressed: { if (ApplicationInfo.isMobile && !ApplicationSettings.isVirtualKeyboard) Qt.inputMethod.hide(); activity.focus = true; } onEditingFinished: { if (ApplicationInfo.isMobile && !ApplicationSettings.isVirtualKeyboard) Qt.inputMethod.hide(); activity.focus = true; } style: TextFieldStyle { placeholderTextColor: "black" } placeholderText: qsTr("Search specific activities") onTextChanged: searchTimer.restart(); } } //timer to workaround some weird Type errors when typing too fast in the search field Timer { id: searchTimer interval: 500 onTriggered: ActivityInfoTree.filterBySearch(searchTextField.text); } Rectangle { id: activityConfigTextBar height: activitySettingsLabel.height visible: clickMode === "activityConfig" anchors { bottom: bar.top bottomMargin: height * 0.3 } radius: 10 border.width: height * 0.05 border.color: "#8b66b2" color: "#eeeeee" GCText { id: activitySettingsLabel text: qsTr("Activity Settings") visible: parent.visible width: parent.width height: paintedHeight anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignHCenter color: "#232323" } } states: [ State { name: "horizontalState"; when: horizontal === true PropertyChanges { target: background sectionIconWidth: Math.min(100 * ApplicationInfo.ratio, main.width / (sections.length + 1)) } PropertyChanges { target: section width: main.width height: sectionCellWidth } PropertyChanges { target: categoriesGrid width: main.width height: categoriesHeight * 0.5 x: currentTagCategories ? categoriesGrid.width / (4 * (currentTagCategories.length + 1)) : 0 } PropertyChanges { target: activitiesGrid width: background.width } PropertyChanges { target: categories width: background.width } PropertyChanges { target: searchBar width: background.width * 0.5 height: sectionCellWidth * 0.5 anchors.topMargin: 0 anchors.bottomMargin: 0 } PropertyChanges { target: activityConfigTextBar width: background.width * 0.5 } AnchorChanges { target: warningOverlay anchors.top: section.bottom anchors.left: background.left } AnchorChanges { target: categoriesGrid anchors.top: section.bottom } AnchorChanges { target: activitiesGrid anchors.left: background.left } AnchorChanges { target: categories anchors.top: section.bottom anchors.left: undefined } AnchorChanges { target: searchBar anchors.top: section.bottom anchors.left: undefined anchors.horizontalCenter: background.horizontalCenter } AnchorChanges { target: activityConfigTextBar anchors.left: undefined anchors.horizontalCenter: background.horizontalCenter } }, State { name: "verticalState"; when: horizontal === false PropertyChanges { target: background sectionIconWidth: Math.min(100 * ApplicationInfo.ratio, (background.height - bar.height) / (sections.length + 1)) } PropertyChanges { target: section width: sectionCellWidth height: main.height - bar.height } PropertyChanges { target: categoriesGrid width: main.width - section.width height: categoriesHeight x: currentTagCategories ? categoriesGrid.width / (4 * (currentTagCategories.length + 1)) + section.width : 0 } PropertyChanges { target: activitiesGrid width: background.width - sectionCellWidth } PropertyChanges { target: categories width: background.width - (section.width + 10) } PropertyChanges { target: searchBar width: background.width - (section.width + 10) height: sectionCellWidth anchors.topMargin: 4 anchors.bottomMargin: 4 } PropertyChanges { target: activityConfigTextBar width: background.width - (section.width + 10) } AnchorChanges { target: warningOverlay anchors.top: background.top anchors.left: section.right } AnchorChanges { target: categoriesGrid anchors.top: background.top } AnchorChanges { target: activitiesGrid anchors.left: section.right } AnchorChanges { target: categories anchors.top: categoriesGrid.top anchors.left: section.right } AnchorChanges { target: searchBar anchors.top: background.top anchors.left: section.right anchors.horizontalCenter: undefined } AnchorChanges { target: activityConfigTextBar anchors.left: section.right anchors.horizontalCenter: undefined } }, State { name: "verticalWithSearch"; when: horizontal === false && activity.currentTag === "search" && ApplicationSettings.isVirtualKeyboard PropertyChanges { target: background sectionIconWidth: Math.min(100 * ApplicationInfo.ratio, (background.height - (bar.height+keyboard.height)) / (sections.length + 1)) } PropertyChanges { target: section width: main.width height: sectionCellWidth (sections.length + 1) } PropertyChanges { target: categoriesGrid width: main.width - section.width height: categoriesHeight x: currentTagCategories ? categoriesGrid.width / (4 * (currentTagCategories.length + 1)) + section.width : 0 } PropertyChanges { target: activitiesGrid width: background.width - sectionCellWidth } PropertyChanges { target: categories width: background.width - (section.width + 10) } PropertyChanges { target: searchBar width: background.width - (section.width + 10) height: sectionCellWidth anchors.topMargin: 4 anchors.bottomMargin: 4 } PropertyChanges { target: activityConfigTextBar width: background.width - (section.width + 10) } AnchorChanges { target: warningOverlay anchors.top: background.top anchors.left: section.right } AnchorChanges { target: categoriesGrid anchors.top: background.top } AnchorChanges { target: activitiesGrid anchors.left: section.right } AnchorChanges { target: categories anchors.top: categoriesGrid.top anchors.left: section.right } AnchorChanges { target: searchBar anchors.top: background.top anchors.left: section.right anchors.horizontalCenter: undefined } } ] VirtualKeyboard { id: keyboard readonly property var letter: ActivityInfoTree.characters width: parent.width visible: activity.currentTag === "search" && ApplicationSettings.isVirtualKeyboard anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter onKeypress: { if(text == keyboard.backspace) { searchTextField.text = searchTextField.text.slice(0, -1); } else if(text == keyboard.space) { searchTextField.text = searchTextField.text.concat(" "); } else { searchTextField.text = searchTextField.text.concat(text); } } function populate() { var tmplayout = []; var row = 0; var offset = 0; var cols; while(offset < letter.length-1) { if(letter.length <= 100) { cols = Math.ceil((letter.length-offset) / (3 - row)); } else { cols = background.horizontal ? (Math.ceil((letter.length-offset) / (15 - row))) :(Math.ceil((letter.length-offset) / (22 - row))) if(row == 0) { tmplayout[row] = new Array(); tmplayout[row].push({ label: keyboard.backspace }); tmplayout[row].push({ label: keyboard.space }); row ++; } } tmplayout[row] = new Array(); for (var j = 0; j < cols; j++) tmplayout[row][j] = { label: letter[j+offset] }; offset += j; row ++; } if(letter.length <= 100) { tmplayout[0].push({ label: keyboard.space }); tmplayout[row-1].push({ label: keyboard.backspace }); } keyboard.layout = tmplayout } } Bar { id: bar // No exit button on mobile, UI Guidelines prohibits it content: BarEnumContent { value: help | config | activityConfig | about | (ApplicationInfo.isMobile ? 0 : exit) } anchors.bottom: keyboard.visible ? keyboard.top : parent.bottom onAboutClicked: { searchTextField.focus = false displayDialog(dialogAbout) } onHelpClicked: { searchTextField.focus = false displayDialog(dialogHelp) } onActivityConfigClicked: { if(clickMode == "play") { clickMode = "activityConfig" } else { clickMode = "play" } } onConfigClicked: { searchTextField.focus = false dialogActivityConfig.active = true dialogActivityConfig.loader.item.loadFromConfig() displayDialog(dialogActivityConfig) } } DialogAbout { id: dialogAbout onClose: home() } DialogHelp { id: dialogHelp onClose: home() activityInfo: ActivityInfoTree.rootMenu } DialogActivityConfig { id: dialogActivityConfig currentActivity: activity content: Component { ConfigurationItem { id: configItem width: dialogActivityConfig.width - 50 * ApplicationInfo.ratio } } onSaveData: { dialogActivityConfig.configItem.save() } onClose: { if(activity.currentTag != "search") { ActivityInfoTree.filterByTag(activity.currentTag, currentCategory) - ActivityInfoTree.filterLockedActivities() ActivityInfoTree.filterEnabledActivities() } else ActivityInfoTree.filterBySearch(searchTextField.text); backgroundMusic.clearQueue() /** * 1. If the current playing background music is in new filtered playlist too, continue playing it and append all the next filtered musics to backgroundMusic element. * 2. Else, stop the current music, find the filtered music which comes just after it, and append all the further musics after it. */ var backgroundMusicSource = String(backgroundMusic.source) var backgroundMusicName = dialogActivityConfig.configItem.extractMusicNameFromPath(backgroundMusicSource) + backgroundMusicSource.slice(backgroundMusicSource.lastIndexOf('.'), backgroundMusicSource.length) var nextMusicIndex = dialogActivityConfig.configItem.filteredBackgroundMusic.indexOf(backgroundMusicName) if(nextMusicIndex != -1) { nextMusicIndex++ while(nextMusicIndex < dialogActivityConfig.configItem.filteredBackgroundMusic.length) backgroundMusic.append(ApplicationInfo.getAudioFilePath("backgroundMusic/" + dialogActivityConfig.configItem.filteredBackgroundMusic[nextMusicIndex++])) } else { nextMusicIndex = dialogActivityConfig.configItem.allBackgroundMusic.indexOf(backgroundMusicName) + 1 while(nextMusicIndex < dialogActivityConfig.configItem.allBackgroundMusic.length) { if(dialogActivityConfig.configItem.filteredBackgroundMusic.indexOf(dialogActivityConfig.configItem.allBackgroundMusic[nextMusicIndex]) != -1) { nextMusicIndex = dialogActivityConfig.configItem.filteredBackgroundMusic.indexOf(dialogActivityConfig.configItem.allBackgroundMusic[nextMusicIndex]) break } nextMusicIndex++ } while(nextMusicIndex < dialogActivityConfig.configItem.filteredBackgroundMusic.length) backgroundMusic.append(ApplicationInfo.getAudioFilePath("backgroundMusic/" + dialogActivityConfig.configItem.filteredBackgroundMusic[nextMusicIndex++])) backgroundMusic.nextAudio() } home() } BackgroundMusicList { id: backgroundMusicList onClose: { visible = false dialogActivityConfig.configItem.visible = true } } } } } diff --git a/src/activities/menu/resource/README b/src/activities/menu/resource/README index 0837eaba8..251d4b204 100644 --- a/src/activities/menu/resource/README +++ b/src/activities/menu/resource/README @@ -1,35 +1,30 @@ -Copyright: Iyo, 2013 -License: Public domain -Files: -lock.svg - Copyright: Timothée Giet, 2015-2019 License: CC-BY-SA 4.0 Files: all_disabled.svg all.svg background.svg category-arithmetic.svg category-experiment.svg category-arts.svg category-geography.svg category-history.svg category-letters.svg category-logic.svg category-measures.svg category-music.svg category-numeration.svg category-vocabulary.svg category-words.svg computer.svg discovery.svg experience.svg fun.svg math.svg new.svg puzzle.svg reading.svg search-icon.svg strategy.svg diff --git a/src/activities/menu/resource/lock.svg b/src/activities/menu/resource/lock.svg deleted file mode 100644 index c596913e4..000000000 --- a/src/activities/menu/resource/lock.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - Open and closed lock - 2013-11-07T10:50:32 - Set of 2 locks, one opened and one closed. - https://openclipart.org/detail/188421/open-and-closed-lock-by-iyo-188421 - - - Iyo - - - - - closed - lock - locks - open - pic - pictogram - sign - - - - - - - - - - - diff --git a/src/activities/mining/ActivityInfo.qml b/src/activities/mining/ActivityInfo.qml index cae68c6b1..469c84867 100644 --- a/src/activities/mining/ActivityInfo.qml +++ b/src/activities/mining/ActivityInfo.qml @@ -1,46 +1,45 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "mining/Mining.qml" difficulty: 1 icon: "mining/mining.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Mining for gold") //: Help title description: qsTr("Use the mousewheel to approach the rockwall and look for gold nuggets.") //intro: "Looking at the rockwall, you can see a sparkle somewhere. Move the mouse cursor next to this sparkle and use the mousewheel or the zoom gesture to zoom in." //: Help goal goal: qsTr("Learn to use the mousewheel or the zoom / pinch gesture to zoom in and out.") //: Help prerequisite prerequisite: qsTr("You should be familiar with moving the mouse and clicking.") //: Help manual manual: qsTr("Looking at the rockwall, you can see a sparkle somewhere. Move next to this sparkle and use the mousewheel or the zoom gesture to zoom in. If you zoomed in at maximum, a gold nugget will appear at the position of the sparkle. Click on the gold nugget to collect it. Having collected the nugget, use the mousewheel or the pinch gesture to zoom out again. If you zoomed out at maximum, another sparkle will appear, showing the next gold nugget to collect. Collect enough nuggets to complete the level. The truck in the lower, right corner of the screen will tell you the number of already collected nuggets and the total number of nuggets to collect in this level.") credit: qsTr("Thanks to the Tuxpaint team for providing the following sounds under GPL: - realrainbow.ogg - used when a new gold nugget appears - metalpaint.wav - remixed and used when a gold nugget is collected") section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/missing-letter/ActivityInfo.qml b/src/activities/missing-letter/ActivityInfo.qml index c275acabb..688e96fd0 100644 --- a/src/activities/missing-letter/ActivityInfo.qml +++ b/src/activities/missing-letter/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Amit Tomar * * 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: "missing-letter/MissingLetter.qml" difficulty: 2 icon: "missing-letter/missing-letter.svg" author: "Amit Tomar <a.tomar@outlook.com>" - demo: true //: Activity title title: qsTr("Missing Letter") //: Help title description: "" // intro: "Find the missing letter and complete the word by clicking on one of the letters proposed on the side." //: Help goal goal: qsTr("Training reading skills") //: Help prerequisite prerequisite: qsTr("Word reading") //: Help manual manual: qsTr("An object is displayed in the main area, and an incomplete word is printed under the picture. Select the missing letter to complete the word.") credit: "" section: "reading words" createdInVersion: 0 } diff --git a/src/activities/money/ActivityInfo.qml b/src/activities/money/ActivityInfo.qml index d782af737..1a7f101e3 100644 --- a/src/activities/money/ActivityInfo.qml +++ b/src/activities/money/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "money/Money.qml" difficulty: 2 icon: "money/money.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Money") //: Help title description: qsTr("Practice money usage") // intro: "Click or tap on the money to pay." //: Help goal goal: qsTr("You must buy the different items and give the exact price. At higher levels, several items are displayed, and you must first calculate the total price.") //: Help prerequisite prerequisite: qsTr("Can count") //: Help manual manual: qsTr("Click or tap on the coins or paper money at the bottom of the screen to pay. If you want to remove a coin or note, click or tap on it on the upper screen area.") credit: "" section: "math money measures" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/money_back/ActivityInfo.qml b/src/activities/money_back/ActivityInfo.qml index f1584fdcc..77866623d 100644 --- a/src/activities/money_back/ActivityInfo.qml +++ b/src/activities/money_back/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "money_back/MoneyBack.qml" difficulty: 3 icon: "money_back/money_back.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Give Tux his change") //: Help title description: qsTr("Practice money usage by giving Tux his change") // intro: "Click on the money at the bottom of the screen to give Tux his change." //: Help goal goal: qsTr("Tux bought different items from you and shows you his money. You must give him back his change. At higher levels, several items are displayed, and you must first calculate the total price.") //: Help prerequisite prerequisite: qsTr("Can count") //: Help manual manual: qsTr("Click on the coins or paper money at the bottom of the screen to pay. If you want to remove a coin or note, click on it on the upper screen area.") credit: "" section: "math money measures" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/money_back_cents/ActivityInfo.qml b/src/activities/money_back_cents/ActivityInfo.qml index 4564553de..ac4610720 100644 --- a/src/activities/money_back_cents/ActivityInfo.qml +++ b/src/activities/money_back_cents/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "money_back_cents/MoneyBackCents.qml" difficulty: 5 icon: "money_back_cents/money_back_cents.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Give Tux his change, including cents") //: Help title description: qsTr("Practice money usage by giving Tux his change") // intro: "Click on the money at the bottom of the screen to give Tux his change." //: Help goal goal: qsTr("Tux bought different items from you and shows you his money. You must give him back his change. At higher levels, several items are displayed, and you must first calculate the total price.") //: Help prerequisite prerequisite: qsTr("Can count") //: Help manual manual: qsTr("Click on the coins or paper money at the bottom of the screen to pay. If you want to remove a coin or note, click on it on the upper screen area.") credit: "" section: "math money measures" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/money_cents/ActivityInfo.qml b/src/activities/money_cents/ActivityInfo.qml index 301c533ac..050470c30 100644 --- a/src/activities/money_cents/ActivityInfo.qml +++ b/src/activities/money_cents/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "money_cents/MoneyCents.qml" difficulty: 5 icon: "money_cents/money_cents.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Money with cents") //: Help title description: qsTr("Practice money usage including cents") // intro: "Click on the money to pay." //: Help goal goal: qsTr("You must buy the different items and give the exact price. At higher levels, several items are displayed, and you must first calculate the total price.") //: Help prerequisite prerequisite: qsTr("Can count") //: Help manual manual: qsTr("Click on the coins or paper money at the bottom of the screen to pay. If you want to remove a coin or note, click on it on the upper screen area.") credit: "" section: "math money measures" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/mosaic/ActivityInfo.qml b/src/activities/mosaic/ActivityInfo.qml index 59dc615e5..06994b501 100644 --- a/src/activities/mosaic/ActivityInfo.qml +++ b/src/activities/mosaic/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "mosaic/Mosaic.qml" difficulty: 1 icon: "mosaic/mosaic.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Rebuild the mosaic") //: Help title description: qsTr("Put each item at the same place as in the given example.") // intro: "Put each item at the same place as in the given example." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("First select the item you want to put then click on a spot on the empty area") credit: "" section: "puzzle" createdInVersion: 0 } diff --git a/src/activities/nine_men_morris/ActivityInfo.qml b/src/activities/nine_men_morris/ActivityInfo.qml index 0a971776b..61dfdfefe 100644 --- a/src/activities/nine_men_morris/ActivityInfo.qml +++ b/src/activities/nine_men_morris/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Pulkit Gupta * * 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: "nine_men_morris/NineMenMorris.qml" difficulty: 2 icon: "nine_men_morris/nine_men_morris.svg" author: "Pulkit Gupta <pulkitnsit@gmail.com>" - demo: true //: Activity title title: qsTr("Nine men's morris (against Tux)") //: Help title description: qsTr("Reduce the opponent to two pieces, or by leaving him without a legal move.") //intro: "Click on the dot where you wish to place your piece and try to take all Tux's pieces." //: Help goal goal: qsTr("Form mills (line of 3 pieces) to remove pieces of Tux until Tux has only two pieces, or doesn't have a legal move") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Play with the computer. First take turns to place nine pieces, and then take turns to move pieces") credit: "" section: "strategy" createdInVersion: 7000 } diff --git a/src/activities/nine_men_morris_2players/ActivityInfo.qml b/src/activities/nine_men_morris_2players/ActivityInfo.qml index 90d47d5e3..264299274 100644 --- a/src/activities/nine_men_morris_2players/ActivityInfo.qml +++ b/src/activities/nine_men_morris_2players/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Pulkit Gupta * * 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: "nine_men_morris_2players/NineMenMorris2players.qml" difficulty: 2 icon: "nine_men_morris_2players/nine_men_morris_2players.svg" author: "Pulkit Gupta <pulkitnsit@gmail.com>" - demo: true //: Activity title title: qsTr("Nine men's morris (with a friend)") //: Help title description: qsTr("Reduce the opponent to two pieces, or by leaving him without a legal move.") //intro: "Click on the dot where you wish to place your piece and try to take all your friend's pieces." //: Help goal goal: qsTr("Form mills (line of 3 pieces) to remove pieces of opponent until opponent has only two pieces, or doesn't have a legal move") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Play with a friend. First take turns to place nine pieces, and then take turns to move pieces") credit: "" section: "strategy" createdInVersion: 7000 } diff --git a/src/activities/note_names/ActivityInfo.qml b/src/activities/note_names/ActivityInfo.qml index ef88981e8..898228601 100644 --- a/src/activities/note_names/ActivityInfo.qml +++ b/src/activities/note_names/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Aman Kumar Gupta * * 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: "note_names/NoteNames.qml" difficulty: 4 icon: "note_names/note_names.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Name that Note") //: Help title description: qsTr("Learn the names of the notes, in bass and treble clef.") //intro: "Identify the note and press the correct piano key" //: Help goal goal: qsTr("To develop a good understanding of note position and naming convention. To prepare for the piano player and composition activity.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Identify the notes correctly and score a 100% to complete a level.") credit: "" section: "discovery music" createdInVersion: 9500 } diff --git a/src/activities/number_sequence/ActivityInfo.qml b/src/activities/number_sequence/ActivityInfo.qml index 9e9d31e64..9ca72c9bc 100644 --- a/src/activities/number_sequence/ActivityInfo.qml +++ b/src/activities/number_sequence/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Emmanuel Charruau * * 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: "number_sequence/NumberSequence.qml" difficulty: 2 icon: "number_sequence/number_sequence.svg" author: "Emmanuel Charruau <echarruau@gmail.com>" - demo: true //: Activity title title: qsTr("Number sequence") //: Help title description: qsTr("Touch the numbers in the right sequence.") // intro: "Draw the picture by touching the numbers in ascending order." //: Help goal goal: qsTr("Can count from 1 to 50.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Draw the picture by touching each number in the right sequence, or sliding your finger or dragging the mouse through the numbers in the correct sequence.") credit: "" section: "math numeration" createdInVersion: 0 } diff --git a/src/activities/numbers-odd-even/ActivityInfo.qml b/src/activities/numbers-odd-even/ActivityInfo.qml index cd2155cce..b75ed46f0 100644 --- a/src/activities/numbers-odd-even/ActivityInfo.qml +++ b/src/activities/numbers-odd-even/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "numbers-odd-even/NumbersOddEven.qml" difficulty: 2 icon: "numbers-odd-even/numbers-odd-even.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Even and Odd Numbers") //: Help title description: qsTr("Move the helicopter to catch the clouds having even or odd numbers") // intro: "Move the helicopter to catch the clouds having even or odd numbers, in the shown order." //: Help goal goal: qsTr("Numeration training") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Catch the odd or even number clouds. With a keyboard use the arrow keys to move the helicopter. With a pointing device you just click or tap on the target location. To know which number you have to catch you can either remember it or check the bottom right corner.") credit: "" section: "math numeration" createdInVersion: 0 } diff --git a/src/activities/paintings/ActivityInfo.qml b/src/activities/paintings/ActivityInfo.qml index 3ed701476..2067c0f86 100644 --- a/src/activities/paintings/ActivityInfo.qml +++ b/src/activities/paintings/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Pulkit Gupta * * Authors: * Bruno Coudoin (bruno.coudoin@gcompris.net) (GTK+ version) * Pulkit Gupta (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 GCompris 1.0 ActivityInfo { name: "paintings/Paintings.qml" difficulty: 1 icon: "paintings/paintings.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Assemble the puzzle") //: Help title description: qsTr("Drag and Drop the items to rebuild the original paintings") // intro: "Catch and drop each piece on the points." //: Help goal goal: qsTr("Spatial representation") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation: movement, drag and drop") //: Help manual manual: qsTr("Drag the image parts from the box on the left to create a painting on the main board.") section: "discovery arts puzzle" createdInVersion: 5000 } diff --git a/src/activities/penalty/ActivityInfo.qml b/src/activities/penalty/ActivityInfo.qml index 51b2931fe..71cace1f9 100644 --- a/src/activities/penalty/ActivityInfo.qml +++ b/src/activities/penalty/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Stephane Mankowski * * 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: "penalty/Penalty.qml" difficulty: 1 icon: "penalty/penalty.svg" author: "Stephane Mankowski <stephane@mankowski.fr>" - demo: true //: Activity title title: qsTr("Penalty kick") //: Help title description: qsTr("Double click or double tap on any side of the goal in order to score.") // intro: "Double click or double tap on the goal, in order to score." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Double click or double tap on a side of the goal to kick the ball. " + "You can double click the left right or middle mouse button. " + "If you do not click fast enough, Tux catches the ball. " + "You must click on it to bring it back to its former position.") credit: "" section: "computer mouse" createdInVersion: 0 } diff --git a/src/activities/photo_hunter/ActivityInfo.qml b/src/activities/photo_hunter/ActivityInfo.qml index 8659dc695..5754ba31d 100644 --- a/src/activities/photo_hunter/ActivityInfo.qml +++ b/src/activities/photo_hunter/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Stefan Toncu * * 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: "photo_hunter/PhotoHunter.qml" difficulty: 2 icon: "photo_hunter/photo_hunter.svg" author: "Stefan Toncu <stefan.toncu29@gmail.com>" - demo: true //: Activity title title: qsTr("Photo Hunter") //: Help title description: qsTr("Find the differences between the two pictures!") //intro: "look at the two pictures carefully and click where you see a difference" //: Help goal goal: qsTr("Visual Discrimination") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Observe the two pictures carefully. There are some slight differences. When you find a difference you must click on it.") credit: "" section: "fun" createdInVersion: 6000 } diff --git a/src/activities/piano_composition/ActivityInfo.qml b/src/activities/piano_composition/ActivityInfo.qml index c6d81d802..642e574c1 100644 --- a/src/activities/piano_composition/ActivityInfo.qml +++ b/src/activities/piano_composition/ActivityInfo.qml @@ -1,59 +1,58 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Johnny Jazeix * Copyright (C) 2018 Aman Kumar Gupta * * 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: "piano_composition/Piano_composition.qml" difficulty: 2 icon: "piano_composition/piano_composition.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Piano Composition") //: Help title description: qsTr("An activity to learn how the piano keyboard works, how notes are written on a musical staff and explore music composition by loading and saving your work.") //intro: "Learn to compose piano music using the octaves and the tools presented above the staff." //: Help goal goal: qsTr("Develop an understanding of music composition, and increase interest in making music with a piano keyboard. This activity covers many fundamental aspects of music, but there is much more to explore about music composition. If you enjoy this activity but want a more advanced tool, try downloading Minuet (https://minuet.kde.org/), an open source software for music education or MuseScore (https://musescore.org/en/download), an open source music notation tool.") //: Help prerequisite prerequisite: qsTr("Familiarity with note naming conventions, note-names activity useful to learn this notation.") //: Help manual manual: qsTr("This activity has several levels, each level adds a new functionality to the previous level. Level 1: Basic piano keyboard (white keys only) and students can experiment with clicking the colored rectangle keys to write music. Level 2: The musical staff switches to bass clef, so pitches are lower than in previous level. Level 3: Option to choose between treble and bass clef, addition of black keys (sharp keys). Level 4: Flat notation used for black keys. Level 5: Option to select note duration (whole, half, quarter, eighth notes). Level 6: Addition of rests (whole, half, quarter, eighth rests) Level 7: Load children's melodies from around the world and also save your composition. The following keyboard bindings work in this game: - backspace: undo - delete: erase attempt - enter/return: OK button - space bar: play - left/right arrow keys: switch keyboard octave - number keys: - 1 to 8: Corresponding white keys in the order on the displayed octave. - F1 to F5: Corresponding black keys in the order on the displayed octave. ") credit: qsTr("The synthesizer original code is https://github.com/vsr83/miniSynth") section: "discovery music" createdInVersion: 9500 } diff --git a/src/activities/planegame/ActivityInfo.qml b/src/activities/planegame/ActivityInfo.qml index aa6e82b54..40bb6a1ee 100644 --- a/src/activities/planegame/ActivityInfo.qml +++ b/src/activities/planegame/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "planegame/Sequence.qml" difficulty: 2 icon: "planegame/planegame.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Numbers in Order") //: Help title description: qsTr("Move the helicopter to catch the clouds in the correct order") // intro: "Move the helicopter with the arrow keys and catch the numbers in the clouds, in ascending order." //: Help goal goal: qsTr("Numeration training") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Catch the clouds in increasing order. With a keyboard use the arrow keys to move the helicopter. With a pointing device you just click or tap on the target location. To know which number you have to catch you can either remember it or check the bottom right corner.") credit: "" section: "math numeration" createdInVersion: 0 } diff --git a/src/activities/play_piano/ActivityInfo.qml b/src/activities/play_piano/ActivityInfo.qml index ba3a579ea..69b40b7f0 100644 --- a/src/activities/play_piano/ActivityInfo.qml +++ b/src/activities/play_piano/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Beth Hadley (GTK+ version) * Aman Kumar Gupta (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 GCompris 1.0 ActivityInfo { name: "play_piano/PlayPiano.qml" difficulty: 1 icon: "play_piano/play_piano.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Play piano") //: Help title description: "" //intro: "Click on the keyboard keys that match the notes that you see and hear" //: Help goal goal: qsTr("Understand how the piano keyboard can play music as written on the musical staff.") //: Help prerequisite prerequisite: qsTr("Knowledge of musical notation and musical staff. Play the activity named 'Piano Composition' first.") //: Help manual manual: qsTr("The notes you see will be played to you. Click on the corresponding keys on the keyboard that match the notes you hear and see.
Levels 1-5 will offer treble clef to practice and levels 6-10 will offer bass clef.") credit: qsTr("The synthesizer original code is https://github.com/vsr83/miniSynth") section: "discovery music" createdInVersion: 9500 } diff --git a/src/activities/play_rhythm/ActivityInfo.qml b/src/activities/play_rhythm/ActivityInfo.qml index 4a42678b0..85b24817d 100644 --- a/src/activities/play_rhythm/ActivityInfo.qml +++ b/src/activities/play_rhythm/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Beth Hadley (GTK+ version) * Aman Kumar Gupta (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 GCompris 1.0 ActivityInfo { name: "play_rhythm/PlayRhythm.qml" difficulty: 1 icon: "play_rhythm/play_rhythm.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Play rhythm") //: Help title description: "" //intro: "Click the drum to recreate the rhythm" //: Help goal goal: qsTr("Learn to beat rhythms precisely and accurately based on what you see and hear.") //: Help prerequisite prerequisite: qsTr("Simple understanding of musical rhythm and beat.") //: Help manual manual: qsTr("Listen to the rhythm played, and follow along with the music. When you're ready to perform the identical rhythm, click the drum to the rhythm. If you clicked tempo at correct times, another rhythm is displayed. If not, you must try again.
Odd levels display a vertical playing line when you click the drum, which helps you see when to click, to follow the rhythm. Click on the drum when the line is in the middle of the notes.
Even levels are harder, because there is no vertical playing line. You must read the rhythm, and click it back in tempo. Click the metronome to hear the quarter note tempos.
Click on the reload button to replay the rhythm.") credit: "" section: "discovery music" createdInVersion: 9500 } diff --git a/src/activities/programmingMaze/ActivityInfo.qml b/src/activities/programmingMaze/ActivityInfo.qml index 054c8b87e..427103d21 100644 --- a/src/activities/programmingMaze/ActivityInfo.qml +++ b/src/activities/programmingMaze/ActivityInfo.qml @@ -1,59 +1,58 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Siddhesh Suthar * Copyright (C) 2018 Aman Kumar Gupta * * 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: "programmingMaze/ProgrammingMaze.qml" difficulty: 3 icon: "programmingMaze/programmingMaze.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: false //: Activity title title: qsTr("Programming Maze") //: Help title description: qsTr("This activity teaches the kid to program the Tux to its goal using simple instructions like move forward, turn left etc") // intro: "Arrange the instructions and traverse the correct path to reach the fish." //: Help goal goal: qsTr("Tux is hungry. Help him find fish by programming him to the correct ice spot.") //: Help prerequisite prerequisite: qsTr("Can read instructions. Thinking of the path logically") //: Help manual manual: qsTr("Choose the instructions from given menu. Arrange the instruction in an order so that they can make the Tux reach to his goal.

") + qsTr("Keyboard Controls:

") + qsTr("1. To navigate through instructions in the current code area having keyboard focus:") + qsTr("
  • Arrow keys

") + qsTr("2. To append an instruction from instruction area to the main/procedure code area:") + qsTr("
  • Select an instruction from the instruction area by pressing SPACE.
  • ") + qsTr("
  • Navigate to the code areas by pressing TAB, then press SPACE to append the instruction.

") + qsTr("3. To add an instruction at any particular position in the main/procedure code area:") + qsTr("
  • Navigate to the instruction at that position and press SPACE to add the selected instruction from the instruction area.

") + qsTr("4. To delete the current navigated instruction in the main/procedure code area:") + qsTr("
  • DELETE.

") + qsTr("5. To edit an instruction in the main/procedure code area:") + qsTr("
  • Navigate to the instruction to edit using Arrow keys.
  • ") + qsTr("
  • Press SPACE to select it.
  • ") + qsTr("
  • Then navigate to the instruction area using TAB and select the new instruction by pressing SPACE.

") + qsTr("6. To run the code or reset Tux when it fails to reach the fish:") + qsTr("
  • ENTER or RETURN.
") credit: "" section: "fun" createdInVersion: 9800 } diff --git a/src/activities/railroad/ActivityInfo.qml b/src/activities/railroad/ActivityInfo.qml index a4b0c0a74..93d022368 100644 --- a/src/activities/railroad/ActivityInfo.qml +++ b/src/activities/railroad/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Utkarsh Tiwari * Copyright (C) 2018 Amit Sagtani * * 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: "railroad/Railroad.qml" difficulty: 1 icon: "railroad/railroad.svg" author: "Utkarsh Tiwari <iamutkarshtiwari@kde.org>" - demo: true //: Activity title title: qsTr("Railroad activity") //: Help title description: qsTr("Rebuild the displayed train at the top of the screen by dragging the appropriate carriages and locomotive. Deselect an item by dragging it down.") //intro: "Observe the train and then click on the items to set up a similar train" //: Help goal goal: qsTr("Memory training") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A train - a locomotive and carriage(s) - is displayed at the top of the main area for a few seconds. Rebuild it at the top of the screen by dragging the appropriate carriages and locomotive. Deselect an item by dragging it down.

") + qsTr("Keyboard Controls:

") + qsTr("1. Use arrow keys to move in the answer or sample zone.
") + qsTr("2. Use Enter or Return key to submit the answers.
") + qsTr("3. Use Space key to swap two wagons or locomotives in answer zone.
") + qsTr("4. Use Space key to add a wagon or locomotive from samples to answer list.
") + qsTr("5. Use Delete key to remove a wagon or locomotive from answer zone.
") credit: "" section: "discovery logic" createdInVersion: 9500 } diff --git a/src/activities/readingh/ActivityInfo.qml b/src/activities/readingh/ActivityInfo.qml index f80964bda..a51f1dda2 100644 --- a/src/activities/readingh/ActivityInfo.qml +++ b/src/activities/readingh/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "readingh/Readingh.qml" difficulty: 2 icon: "readingh/readingh.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Horizontal reading practice") //: Help title description: qsTr("Read a list of words and work out if a given word is in it.") // intro: "Read a list of words and say if a given word is in it." //: Help goal goal: qsTr("Reading training in a limited time") //: Help prerequisite prerequisite: qsTr("Reading") //: Help manual manual: qsTr("A word is shown on the board. A list of words, displayed horizontally, will appear and disappear. Does the given word belong to the list?") credit: "" section: "reading words" createdInVersion: 5000 } diff --git a/src/activities/readingv/ActivityInfo.qml b/src/activities/readingv/ActivityInfo.qml index 26f5945b7..d8861c50c 100644 --- a/src/activities/readingv/ActivityInfo.qml +++ b/src/activities/readingv/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "readingv/Readingv.qml" difficulty: 2 icon: "readingv/readingv.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Vertical-reading practice") //: Help title description: qsTr("Read a vertical list of words and work out if a given word is in it.") // intro: "Read a list of words and say if a given word is in it." //: Help goal goal: qsTr("Reading training in a limited time") //: Help prerequisite prerequisite: qsTr("Reading") //: Help manual manual: qsTr("A word is shown on the board. A list of words, displayed vertically, will appear and disappear. Does the given word belong to the list?") credit: "" section: "reading words" createdInVersion: 5000 } diff --git a/src/activities/redraw/ActivityInfo.qml b/src/activities/redraw/ActivityInfo.qml index 518c1f84c..37bc00cde 100644 --- a/src/activities/redraw/ActivityInfo.qml +++ b/src/activities/redraw/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "redraw/Redraw.qml" difficulty: 3 icon: "redraw/redraw.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Redraw the given image") //: Help title description: qsTr("Draw perfectly the given image on the empty grid.") //intro: "Use the drawing tools to build an identical pattern on the right." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("First, select the proper color from the toolbar. Then click on the grid and drag to paint, then release the click to stop painting.") credit: "" section: "puzzle" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/redraw_symmetrical/ActivityInfo.qml b/src/activities/redraw_symmetrical/ActivityInfo.qml index ce30edd5a..c10bf4df0 100644 --- a/src/activities/redraw_symmetrical/ActivityInfo.qml +++ b/src/activities/redraw_symmetrical/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "redraw_symmetrical/RedrawSymmetrical.qml" difficulty: 4 icon: "redraw_symmetrical/redraw_symmetrical.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Mirror the given image") //: Help title description: qsTr("Draw the image on the empty grid as if you see it in a mirror.") //intro: "Use the drawing tools to reproduce symmetrically the pattern on the right." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("First, select the proper color from the toolbar. Then click on the grid and drag to paint, then release the click to stop painting.") credit: "" section: "puzzle" createdInVersion: 0 levels: "1,2,3" } diff --git a/src/activities/renewable_energy/ActivityInfo.qml b/src/activities/renewable_energy/ActivityInfo.qml index 7d95da94c..b7500a258 100644 --- a/src/activities/renewable_energy/ActivityInfo.qml +++ b/src/activities/renewable_energy/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Sagar Chand Agarwal * * 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: "renewable_energy/RenewableEnergy.qml" difficulty: 4 icon: "renewable_energy/renewable_energy.svg" author: "Sagar Chand Agarwal <atomsagar@gmail.com>" - demo: true //: Activity title title: qsTr("Renewable Energy") //: Help title description: qsTr("Tux has come back from fishing on his boat. Bring the electrical system back up so he can have light in his home. ") //intro: "Click on the different stages that go to make up the power supply." //: Help goal goal: qsTr("Learn about an electrical system based on renewable energy") //: Help manual manual: qsTr("Click on different active elements: sun, cloud, dam, solar array, wind farm and transformers, in order to reactivate the entire electrical system. When the system is back up and Tux is in his home, push the light button for him. To win you must switch on all the consumers while all the producers are up. ") //: Help prerequisite prerequisite: "" credit: qsTr("Drawing by Stephane Cabaraux") section: "sciences experiment" createdInVersion: 5000 } diff --git a/src/activities/reversecount/ActivityInfo.qml b/src/activities/reversecount/ActivityInfo.qml index 24cf69fff..2c7c91c93 100644 --- a/src/activities/reversecount/ActivityInfo.qml +++ b/src/activities/reversecount/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "reversecount/Reversecount.qml" difficulty: 2 icon: "reversecount/reversecount.svg" author: "Emmanuel Charruau <echarruau@gmail.com>" - demo: false //: Activity title title: qsTr("Count intervals") //: Help title description: qsTr("Tux is hungry. Help him find fish by counting to the correct ice spot.") // intro: "Click on the domino and validate your choice with the OK button to indicate the number of ice blocks Tux will have to follow to eat a fish." //: Help goal goal: qsTr("Tux is hungry. Help him find fish by counting to the correct ice spot.") //: Help prerequisite prerequisite: qsTr("Can read numbers on a domino, and count intervals up to 10 for the first level") //: Help manual manual: qsTr("Click on the domino to show how many ice spots there are between Tux and the fish. Click the domino with the right mouse button to count backwards. When done, click on the OK button or hit the Enter key.") credit: "" section: "math numeration" createdInVersion: 0 levels: "1,2" } diff --git a/src/activities/roman_numerals/ActivityInfo.qml b/src/activities/roman_numerals/ActivityInfo.qml index 91aea7031..028a280d4 100644 --- a/src/activities/roman_numerals/ActivityInfo.qml +++ b/src/activities/roman_numerals/ActivityInfo.qml @@ -1,44 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Bruno Coudoin < bruno.coudoin@gcompris.net> * * 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: "roman_numerals/RomanNumerals.qml" difficulty: 4 icon: "roman_numerals/roman_numerals.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: true //: Activity title title: qsTr("Roman numerals") //: Help title description: "" //intro: "Learn and practice roman to arabic numerals conversion" //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("A Roman numeral is the name for a number when it is written in the way the Romans used to write numbers. Roman numerals are not used very often today in the west. They are used to write the names of kings and queens, or popes. For example: Queen Elizabeth II. They may be used to write the year a book or movie was made.\n The building of the roman numbers is made up by an agglutination of numbers (the thousands, joined with the hundreds, joined with the tens, joined with the units → just like the arab decimal system). This agglutination of numbers is interpreted as the sum of these particular numbers (again → just like the arab decimal system: you add up thousands+hundreds+tens+units, and you write the respective figures combined).\n Examples:\n 2394: we got a sum of 2000 (MM), 300 (CCC), 90 (XC) and 4 units (IV), so we write this combined: MMCCCXCIV\n MMMCMXLIX: we got first thousands (MMM=3000), then we got hundreds (CM=1000–100=900), then we got tens (XL=50–10=40), and at last we got units (IX=10–1=9), so we write this in the decimal system: 3949.") credit: "" section: "sciences history" createdInVersion: 7000 } diff --git a/src/activities/scalesboard/ActivityInfo.qml b/src/activities/scalesboard/ActivityInfo.qml index f7a798c1e..7a01478d4 100644 --- a/src/activities/scalesboard/ActivityInfo.qml +++ b/src/activities/scalesboard/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "scalesboard/ScaleNumber.qml" difficulty: 2 icon: "scalesboard/scalesboard.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Balance the scales properly") //: Help title description: qsTr("Drag and Drop weights to balance the scales") // intro: "Drag the weights up to balance the scales." //: Help goal goal: qsTr("Mental calculation, arithmetic equality") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("To balance the scales, move the weights to the left or the right side (on higher levels). The weights can be arranged in any order.") credit:"" section: "math measures" createdInVersion: 0 levels: "1,2,3,4,5" } diff --git a/src/activities/scalesboard_weight/ActivityInfo.qml b/src/activities/scalesboard_weight/ActivityInfo.qml index 4d421ff4e..972a359cc 100644 --- a/src/activities/scalesboard_weight/ActivityInfo.qml +++ b/src/activities/scalesboard_weight/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "scalesboard_weight/ScalesboardWeight.qml" difficulty: 4 icon: "scalesboard_weight/scalesboard_weight.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Balance the scales properly") //: Help title description: qsTr("Drag and Drop masses to balance the scales and calculate the weight") // intro: "Drag the weights up to balance the scales." //: Help goal goal: qsTr("Mental calculation, arithmetic equality, unit conversion") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("To balance the scales, move the masses to the left or the right side (on higher levels). They can be arranged in any order. Take care of the weight and the unit of the masses, remember that a kilogram (kg) is 1000 grams (g).") credit: "" section: "math measures" createdInVersion: 0 levels: "1,2,3,4,5,6" } diff --git a/src/activities/scalesboard_weight_avoirdupois/ActivityInfo.qml b/src/activities/scalesboard_weight_avoirdupois/ActivityInfo.qml index 7e3535115..c73e8e96a 100644 --- a/src/activities/scalesboard_weight_avoirdupois/ActivityInfo.qml +++ b/src/activities/scalesboard_weight_avoirdupois/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "scalesboard_weight_avoirdupois/ScalesboardWeight.qml" difficulty: 4 icon: "scalesboard_weight_avoirdupois/scalesboard_weight_avoirdupois.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Balance the scales properly") //: Help title description: qsTr("Drag and Drop masses to balance the scales and calculate the weight in the avoirdupois unit") // intro: "Drag the weights up to balance the scales." //: Help goal goal: qsTr("Mental calculation, arithmetic equality, unit conversion") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("To balance the scales, move the masses to the left or the right side (on higher levels). They can be arranged in any order. Take care of the weight and the unit of the masses, remember that a pound (lb) is 16 ounce (oz).") credit: "" section: "math measures" createdInVersion: 0 levels:"1,2,3,4,5,6" } diff --git a/src/activities/share/ActivityInfo.qml b/src/activities/share/ActivityInfo.qml index d58016ca6..1dd6ca397 100644 --- a/src/activities/share/ActivityInfo.qml +++ b/src/activities/share/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Stefan Toncu * * 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: "share/Share.qml" difficulty: 2 icon: "share/share.svg" author: "Stefan Toncu <stefan.toncu29@gmail.com>" - demo: true //: Activity title title: qsTr("Share pieces of candy") //: Help title description: qsTr("Try to split the pieces of candy to a given number of children") //intro: "Share the candies equally among the specified number of children and notice that there may be a rest left" //: Help goal goal: qsTr("Learn the division of numbers") //: Help prerequisite prerequisite: qsTr("Know how to count") //: Help manual manual: qsTr("Follow the instructions shown on the screen: first, drag the given number of boys/girls to the middle, then drag pieces of candy to each child's rectangle.") credit: "" section: "math arithmetic" createdInVersion: 7000 } diff --git a/src/activities/simplepaint/ActivityInfo.qml b/src/activities/simplepaint/ActivityInfo.qml index 125b4ab04..0fd0748ce 100644 --- a/src/activities/simplepaint/ActivityInfo.qml +++ b/src/activities/simplepaint/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "simplepaint/Simplepaint.qml" difficulty: 1 icon: "simplepaint/simplepaint.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: true //: Activity title title: qsTr("A simple drawing activity") //: Help title description: qsTr("Create your own drawing") // intro: "Select a color and paint the rectangles as you like to create a drawing." //: Help goal goal: qsTr("Enhance creative skills") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Select a color and paint the rectangles as you like to create a drawing.") credit: "" section: "fun" createdInVersion: 4000 } diff --git a/src/activities/smallnumbers/ActivityInfo.qml b/src/activities/smallnumbers/ActivityInfo.qml index 569cb835a..c2ec52eb8 100644 --- a/src/activities/smallnumbers/ActivityInfo.qml +++ b/src/activities/smallnumbers/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "smallnumbers/Smallnumbers.qml" difficulty: 2 icon: "smallnumbers/smallnumbers.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Numbers With Dice") //: Help title description: qsTr("Count the number of dots on dice before they reach the ground") // intro: "Count the number on your dice and type it on your keyboard before it reaches the ground." //: Help goal goal: qsTr("In a limited time, count the number of dots") //: Help prerequisite prerequisite: qsTr("Counting skills") //: Help manual manual: qsTr("With the keyboard, type the number of dots you see on the falling dice.") credit: "" section: "computer keyboard math numeration" createdInVersion: 0 levels: "1,2,3,4,5,6,7,8" } diff --git a/src/activities/smallnumbers2/ActivityInfo.qml b/src/activities/smallnumbers2/ActivityInfo.qml index 44728d855..67cd838aa 100644 --- a/src/activities/smallnumbers2/ActivityInfo.qml +++ b/src/activities/smallnumbers2/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "smallnumbers2/Smallnumbers2.qml" difficulty: 2 icon: "smallnumbers2/smallnumbers2.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Numbers with dominoes") //: Help title description: qsTr("Count the number of dots on the dominoes before they reach the ground") // intro: "Count the number of the points on the dominoes then type the result on your keyboard." //: Help goal goal: qsTr("In a limited time, count the number of dots") //: Help prerequisite prerequisite: qsTr("Counting skills") //: Help manual manual: qsTr("With the keyboard, type the number of dots you see on the falling dominoes.") credit: "" section: "math numeration" createdInVersion: 0 levels: "1,2,3,4,5,6,7,8" } diff --git a/src/activities/solar_system/ActivityInfo.qml b/src/activities/solar_system/ActivityInfo.qml index a6a7e2d4f..90880e550 100644 --- a/src/activities/solar_system/ActivityInfo.qml +++ b/src/activities/solar_system/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2018 Aman Kumar Gupta * * Authors: * Aman Kumar Gupta * * 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: "solar_system/SolarSystem.qml" difficulty: 5 icon: "solar_system/solar_system.svg" author: "Aman Kumar Gupta <gupta2140@gmail.com>" - demo: true //: Activity title title: qsTr("Solar System") //: Help title description: qsTr("Answer the questions with a correctness of 100%.") //intro: "Answer the questions presented and get a 100% correctness among the options." //: Help goal goal: qsTr("Learn information about the solar system. If you want to learn more about astronomy, try downloading KStars (https://edu.kde.org/kstars/) or Stellarium (https://stellarium.org/) which are open source astronomy softwares.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click on a planet or the Sun to reveal questions. Each question contains 4 options. One of those is 100% correct. Try to answer the questions until you get a 100% closeness in the closeness meter.") credit: "" section: "sciences experiment" createdInVersion: 9500 } diff --git a/src/activities/submarine/ActivityInfo.qml b/src/activities/submarine/ActivityInfo.qml index d11449500..2196b3e7a 100644 --- a/src/activities/submarine/ActivityInfo.qml +++ b/src/activities/submarine/ActivityInfo.qml @@ -1,60 +1,59 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2017 Rudra Nil Basu * * 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: "submarine/Submarine.qml" difficulty: 5 icon: "submarine/submarine.svg" author: "Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>" - demo: true //: Activity title title: qsTr("Pilot a Submarine") //: Help title description: qsTr("Drive the submarine to the end point.") //intro: "Drive the submarine to the right end of the screen without colliding with any objects" //: Help goal goal: qsTr("Learn how to control a submarine") //: Help prerequisite prerequisite: qsTr("Move and click using the mouse, physics basics") //: Help manual manual: qsTr("Control the various parts of the submarine (the engine, rudders and ballast tanks) to reach the end point. Controls: Engine: D / Right arrow: Increase velocity A / Left arrow: Decrease velocity Ballast tanks: Switch filling of Ballast tanks: W / Up arrow: Central ballast tank R: Left ballast tank T: Right ballast tank Switch flush ballast tanks: S / Down arrow: Central ballast tank F: Left ballast tank G: Right ballast tank Diving planes: + : Increase diving plane angle - : Decrease diving plane angle") credit: "" section: "sciences experiment" enabled: ApplicationInfo.isBox2DInstalled createdInVersion: 9000 } diff --git a/src/activities/sudoku/ActivityInfo.qml b/src/activities/sudoku/ActivityInfo.qml index 8ae8776f0..499a8c931 100644 --- a/src/activities/sudoku/ActivityInfo.qml +++ b/src/activities/sudoku/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Johnny Jazeix * * 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: "sudoku/Sudoku.qml" difficulty: 4 icon: "sudoku/sudoku.svg" author: "Johnny Jazeix <jazeix@gmail.com>" - demo: true //: Activity title title: qsTr("Sudoku, place unique symbols in a grid") //: Help title description: qsTr("Symbols must be unique in a row, in a column, and (if defined) each region.") // intro: "Select a number or a symbol and click its target area. Each symbol must appear only once in a row, in a column and in a subregion if any." //: Help goal goal: qsTr("The aim of the puzzle is to enter a symbol or numeral from 1 through 9 in each cell of a grid. In the official Sudoku the grid is 9x9 made up of 3x3 subgrids (called 'regions'). In GCompris we start at lower levels with a simpler version using symbols and with no regions. In all cases the grid is presented with various symbols or numerals given in some cells (the 'givens'). Each row, column and region must contain only one instance of each symbol or numeral (Source <https://en.wikipedia.org/wiki/Sudoku>).") //: Help prerequisite prerequisite: qsTr("Completing the puzzle requires patience and logical ability") //: Help manual manual: qsTr("Select a number or a symbol on the left and click on its target position. GCompris will not let you enter invalid data.") credit: "" section: "discovery logic" createdInVersion: 0 } diff --git a/src/activities/superbrain/ActivityInfo.qml b/src/activities/superbrain/ActivityInfo.qml index 742a61e59..53c07f4b0 100644 --- a/src/activities/superbrain/ActivityInfo.qml +++ b/src/activities/superbrain/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "superbrain/Superbrain.qml" difficulty: 2 icon: "superbrain/superbrain.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Super Brain") //: Help title description: qsTr("Tux has hidden several items. Find them again in the correct order") //intro: "Find out the right combination of colors. A dot framed in a black square means that you found the correct colour in the correct position, while a dot framed in a white square means it's the correct colour, but in the wrong position." //: Help goal goal: qsTr("Tux has hidden several items. Find them again in the correct order") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click on the items until you find what you think is the correct answer. Then, click on the OK button. In the lower levels, Tux gives you an indication if you found a hiding place by marking the item with a black box. In the levels 4 and 8 an item may be hidden several times.
You can use the right mouse button to flip the items in the opposite order or the item chooser to directly pick an item. Press and hold a mouse button or on the touch screen to automatically choose the last item selected on a column. Double click or tap on a previously selected item in your guess history to mark it as 'correct'. Such marked items are automatically selected in your current and future guesses until you un-mark them, again by double clicking or tapping.") credit: "" section: "discovery logic" createdInVersion: 4000 } diff --git a/src/activities/tangram/ActivityInfo.qml b/src/activities/tangram/ActivityInfo.qml index e016cb6c9..19a091206 100644 --- a/src/activities/tangram/ActivityInfo.qml +++ b/src/activities/tangram/ActivityInfo.qml @@ -1,47 +1,46 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Bruno Coudoin * * 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: "tangram/Tangram.qml" difficulty: 3 icon: "tangram/tangram.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("The tangram puzzle game") //: Help title description: qsTr("The objective is to form a given shape") // intro: "Click on each object to obtain the same figure. You can change their orientation by clicking on the arrows." //: Help goal goal: qsTr("From Wikipedia, the free encyclopedia. Tangram (Chinese: literally 'seven boards of cunning') is a Chinese puzzle. While the tangram is often said to be ancient, its existence has only been verified as far back as 1800. It consists of 7 pieces, called tans, which fit together to form a square; Using the square side as 1 unit, the 7 pieces contains: 5 right isosceles triangles, including: - 2 small size ones (legs of 1) - 1 medium size (legs of square root of 2) - 2 large size (legs of 2) 1 square (side of 1) and 1 parallelogram (sides of 1 and square root of 2) ") //: Help prerequisite prerequisite: qsTr("Mouse-manipulation") //: Help manual manual: qsTr("Select the tangram to form. Move a piece by dragging it. The symmetrical button appears on items that supports it. Click on the rotation button or drag around it to show the rotation you want. Check baby tangram activity for an introduction to tangram.") credit: "" section: "puzzle" createdInVersion: 6000 } diff --git a/src/activities/target/ActivityInfo.qml b/src/activities/target/ActivityInfo.qml index be3346b57..68fe9c18d 100644 --- a/src/activities/target/ActivityInfo.qml +++ b/src/activities/target/ActivityInfo.qml @@ -1,41 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Bruno Coudoin * * 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: "target/Target.qml" difficulty: 2 icon: "target/target.svg" author: "Bruno Coudoin <bruno.coudoin@gcompris.net>" - demo: false //: Activity title title: qsTr("Practice addition with a target game") //: Help title description: qsTr("Hit the target and count your points") // intro: "Click on the target to launch darts, then count your final score!" //: Help goal goal: qsTr("Throw darts at a target and count your score.") //: Help prerequisite prerequisite: qsTr("Can move the mouse, can read numbers and count up to 15 for the first level") //: Help manual manual: qsTr("Check the speed and direction of the target, and then click on it to launch a dart. When all your darts are thrown, you are asked to count your score. Enter the score with the keyboard.") credit: "" section: "math addition arithmetic" createdInVersion: 0 levels: "1,2,3,4,5" } diff --git a/src/activities/template/ActivityInfo.qml b/src/activities/template/ActivityInfo.qml index 13a2ba9c7..33e7d69d1 100644 --- a/src/activities/template/ActivityInfo.qml +++ b/src/activities/template/ActivityInfo.qml @@ -1,40 +1,39 @@ /* 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: "template/Template.qml" difficulty: 1 icon: "template/template.svg" author: "Your Name <yy@zz.org>" - demo: true //: Activity title title: "Template 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: creationversion } diff --git a/src/activities/tic_tac_toe/ActivityInfo.qml b/src/activities/tic_tac_toe/ActivityInfo.qml index e64da94b8..23ba1510a 100644 --- a/src/activities/tic_tac_toe/ActivityInfo.qml +++ b/src/activities/tic_tac_toe/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityIngo.qml * * Copyright (C) 2014 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "tic_tac_toe/TicTacToe.qml" difficulty: 2 icon: "tic_tac_toe/tic_tac_toe.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Tic Tac Toe (against Tux)") //: Help title description: qsTr("Place three marks in a row") // intro: "Click on the square which you wish to mark and try to mark 3 consecutive squares before Tux." //: Help goal goal: qsTr("Place three respective marks in any horizontal, vertical, or diagonal row to win the game") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Play with the computer. Take turns to click on the square which you want to mark. First player to create a line of 3 marks wins") credit: "" section: "strategy" createdInVersion: 4000 } diff --git a/src/activities/tic_tac_toe_2players/ActivityInfo.qml b/src/activities/tic_tac_toe_2players/ActivityInfo.qml index 7e0eb6f6c..57f53679a 100644 --- a/src/activities/tic_tac_toe_2players/ActivityInfo.qml +++ b/src/activities/tic_tac_toe_2players/ActivityInfo.qml @@ -1,43 +1,42 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2014 Pulkit Gupta * * Authors: * Pulkit Gupta * * 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: "tic_tac_toe_2players/Tic_tac_toe_2players.qml" difficulty: 2 icon: "tic_tac_toe_2players/tic_tac_toe_2players.svg" author: "Pulkit Gupta <pulkitgenius@gmail.com>" - demo: true //: Activity title title: qsTr("Tic Tac Toe (with a friend)") //: Help title description: qsTr("Place three marks in a row") // intro: "Click on the square which you wish to mark and try to mark 3 consecutive squares before Tux." //: Help goal goal: qsTr("Place three respective marks in any horizontal, vertical, or diagonal row to win the game") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Play with a friend. Take turns to click on the square which you want to mark. First player to create a line of 3 marks wins") credit: "" section: "strategy" createdInVersion: 4000 } diff --git a/src/activities/traffic/ActivityInfo.qml b/src/activities/traffic/ActivityInfo.qml index 8c20f70b6..3f3cca897 100644 --- a/src/activities/traffic/ActivityInfo.qml +++ b/src/activities/traffic/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "traffic/Traffic.qml" difficulty: 2 icon: "traffic/traffic.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("A sliding-block puzzle game") //: Help title description: qsTr("Remove the red car from the parking lot through the gate on the right") // intro: "Slide the cars to make a space so that the red car can go out of the box." //: Help goal goal: "" //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Each car can only move either horizontally or vertically. You must make some room in order to let the red car move through the gate on the right.") credit: "" section: "discovery logic" createdInVersion: 0 } diff --git a/src/activities/watercycle/ActivityInfo.qml b/src/activities/watercycle/ActivityInfo.qml index 32321d301..d91a21130 100644 --- a/src/activities/watercycle/ActivityInfo.qml +++ b/src/activities/watercycle/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Sagar Chand Agarwal (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 GCompris 1.0 ActivityInfo { name: "watercycle/Watercycle.qml" difficulty: 3 icon: "watercycle/watercycle.svg" author: "Sagar Chand Agarwal <atomsagar@gmail.com>" - demo: true //: Activity title title: qsTr("Watercycle") //: Help title description: qsTr("Tux has come back from fishing on his boat. Bring the water system back up so he can take a shower.") //intro: "Click on the various active elements that make up the water supply. Then press the shower button for Tux." //: Help goal goal: qsTr("Learn the water cycle") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Click on different active elements: sun, cloud, pumping station, and the sewage treatment plant, in order to reactivate the entire water system. When the system is back up and Tux is in the shower, push the shower button for him.") credit: qsTr("Drawing by Stephane Cabaraux.") section: "sciences experiment" createdInVersion: 5000 } diff --git a/src/activities/wordsgame/ActivityInfo.qml b/src/activities/wordsgame/ActivityInfo.qml index bc28e4b22..477c6cf94 100644 --- a/src/activities/wordsgame/ActivityInfo.qml +++ b/src/activities/wordsgame/ActivityInfo.qml @@ -1,40 +1,39 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 Holger Kaelberer * * 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: "wordsgame/Wordsgame.qml" difficulty: 2 icon: "wordsgame/wordsgame.svg" author: "Holger Kaelberer <holger.k@elberer.de>" - demo: true //: Activity title title: qsTr("Falling Words") //: Help title description: qsTr("Type the falling words before they reach the ground") // intro: "Type the words on your keyboard before they reach the ground." //: Help goal goal: qsTr("Keyboard training") //: Help prerequisite prerequisite: qsTr("Keyboard manipulation") //: Help manual manual: qsTr("Type the complete word as it falls, before it reaches the ground") credit: "" section: "computer keyboard reading words" createdInVersion: 0 } diff --git a/src/core/ActivityBase.qml b/src/core/ActivityBase.qml index 50f956cd3..13281b33d 100644 --- a/src/core/ActivityBase.qml +++ b/src/core/ActivityBase.qml @@ -1,309 +1,301 @@ /* GCompris - ActivityBase.qml * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 GCompris 1.0 import "qrc:/gcompris/src/core/core.js" as Core /** * The base QML component for activities in GCompris. * @ingroup components * * Each activity should be derived from this component. It is responsible for * * * basic common key handling, * * unified audio handling, * * screen switching dynamics (from/to Menu/DialogHelp/etc.) * * The following common keys are handled so far: * * * @c Ctrl+q: Exit the application. * * @c Ctrl+b: Toggle the bar. * * @c Ctrl+f: Toggle fullscreen. * * @c Ctrl+m: Toggle audio effects. * * @c Ctrl+w: Exit the current activity and return to the menu. * * @c Ctrl+p: Make a screenshot. * * @c Back: Return to the home screen (corresponds to the 'Back' button on * Android). * * Cf. Template.qml for a sample skeleton activity. * * Cf. * [the wiki](https://gcompris.net/wiki/Qt_Quick_development_process#Adding_a_new_activity) * for further information about creating a new activity. * * @inherit QtQuick.Item */ Item { id: page /** * type:Item * Parent object. */ property Item main: parent; /** * type:Component * The top-level component containing the visible viewport of an activity. * * Put all you want to present the user into this container. Mostly * implemented using a Rectangle or Image component, itself * containing further graphical elements. You are pretty free of doing * whatever you want inside this component. * * Also common elements as Bar, Score, DialogHelp, etc. should be placed * inside this element. */ property Component pageComponent /** * type:QtObject * Reference to the menu activity. * * Populated automatically during activity-loading. */ property QtObject menu /** * type:QtObject * Reference to the ActivityInfo object of the activity. * * Populated automatically during activity-loading. */ property QtObject activityInfo /** * type:GCAudio * The global audio item for voices. * * Because of problems synchronizing multiple Audio objects between * global/menu/main and individual activities, activities should refrain * from implementing additional Audio elements. * * Instead append to this global object to play your voices after the * intro music. * @sa GCAudio audioVoices */ property GCAudio audioVoices /** * type:GCSfx * The global audio item for audio effects. * * Use it to play your effects. * @sa GCSfx audioEffects */ property GCSfx audioEffects /** * type:GCAudio * The global audio item for background music. * * @sa GCAudio backgroundMusic */ property GCAudio backgroundMusic /** * type:string * The resource folder for the current activity. The resources * of each activity needs to be stored with the same pattern. * "qrc:/gcompris/src/activities/" + activity name + "/resource/" * */ property string resourceUrl: (activityInfo && activityInfo.name) ? "qrc:/gcompris/src/activities/" + activityInfo.name.split('/')[0] + "/resource/": "" /** * type: bool * It tells whether the activity is a musical activity or not(if the activity contains it's own audio effects). * * If the activity is a musical activity, on starting it the background music pauses and when the activity is quit, background music resumes. * * Set it as true if the activity is musical. */ property bool isMusicalActivity: false property alias datasetLoader: datasetLoader property var levelFolder /** * type:Loading * The global loading object. * * Start it to signal heavy computation in case of GUI freezes. * @sa Loading */ property Loading loading /** * Emitted when the user wants to return to the Home/Menu screen. */ signal home /** * Emitted when the user wants to return several views back in the * page stack. */ signal back(Item to) /** * Emitted every time the activity has been started. * * Initialize your activity upon this signal. */ signal start /** * Emitted when the activity is about to stop * * Shutdown whatever you need to upon this signal. */ signal stop /** * Emitted when dialog @p dialog should be shown * * Emit this signal when you want to show another dialog, e.g. on * Bar.onHelpClicked * * @param dialog Dialog to show. */ signal displayDialog(Item dialog) /** * Emitted when multiple @p dialogs should be pushed on the page-stack * * Emit this signal when you want to stack >1 views. The last one will be * shown the intermediated ones will be kept on the page stack for later * pop() calls. * * @param dialogs Array of dialogs to push; */ signal displayDialogs(var dialogs) onBack: menu ? menu.back(to) : "" onHome: menu ? menu.home() : "" onDisplayDialog: menu ? menu.displayDialog(dialog) : "" onDisplayDialogs: menu ? menu.displayDialogs(dialogs) : "" Keys.forwardTo: activity.children Keys.onEscapePressed: home(); Keys.onPressed: { if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_Q) { // Ctrl+Q exit the application Core.quit(main); } else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_B) { // Ctrl+B toggle the bar ApplicationSettings.isBarHidden = !ApplicationSettings.isBarHidden; } else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_F) { // Ctrl+F toggle fullscreen ApplicationSettings.isFullscreen = !ApplicationSettings.isFullscreen } else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_M) { // Ctrl+M toggle sound // We mute / unmute both channels in sync ApplicationSettings.isAudioVoicesEnabled = !ApplicationSettings.isAudioVoicesEnabled ApplicationSettings.isAudioEffectsEnabled = ApplicationSettings.isAudioVoicesEnabled ApplicationSettings.isBackgroundMusicEnabled = ApplicationSettings.isAudioVoicesEnabled } else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_W) { // Ctrl+W exit the current activity home() } else if (event.modifiers === Qt.ControlModifier && event.key === Qt.Key_P) { // Ctrl+P Screenshot ApplicationInfo.screenshot("/tmp/" + activityInfo.name.split('/')[0] + ".png") } } Keys.onReleased: { if (event.key === Qt.Key_Back) { event.accepted = true home() } } Loader { id: activity sourceComponent: pageComponent anchors.fill: parent } - Loader { - id: demoPageLoader - source: ApplicationSettings.activationMode == 1 ? - "BuyMeOverlayInapp.qml" : "BuyMeOverlay.qml" - anchors.fill: parent - active: !activityInfo.demo && ApplicationSettings.isDemoMode - } - onLevelFolderChanged: { if(levelFolder === undefined || levelFolder.length === 0) { return } datasetLoader.data = [] var data = []; // sorting levelFolders in numeric manner levelFolder.sort(function(a, b) { return (parseInt(a) - parseInt(b)) }); for(var level in levelFolder /*todo maybe we don't need anymore levelFolder and we can use activityInfo.currentLevels*/) { var id = levelFolder[level]; data = data.concat(activityInfo.getDataset(id).data) } datasetLoader.data = data //datasetLoader.start() } // todo Maybe not needed anymore Loader { id: datasetLoader asynchronous: false property var dataFiles: [] property var currentFile property var data: [] signal start signal stop onStart: { var file = dataFiles.shift() currentFile = file source = file.file.toString() } onLoaded: { data = data.concat(item.data) if(dataFiles.length != 0) { start() } else { stop() } } onStop: { //print("stop", JSON.stringify(data)) source = "" // Core.shuffle(data) do we want to shuffle??? Should depend on the activity (if we want increasing levels) or teachers (random multiplication tables for example) } } } diff --git a/src/core/ActivityInfo.cpp b/src/core/ActivityInfo.cpp index 76998c63e..896a8f5b6 100644 --- a/src/core/ActivityInfo.cpp +++ b/src/core/ActivityInfo.cpp @@ -1,326 +1,315 @@ /* GCompris - ActivityInfo.cpp * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #include "ActivityInfo.h" #include #include #include #include #include "ApplicationSettings.h" ActivityInfo::ActivityInfo(QObject *parent): QObject(parent), m_difficulty(0), m_minimalDifficulty(0), m_maximalDifficulty(0), - m_demo(true), m_favorite(false), m_enabled(true), m_createdInVersion(0) { } QString ActivityInfo::name() const { return m_name; } void ActivityInfo::setName(const QString &name) { m_name = name; // Once we are given a name, we can get the favorite property // from the persistant configuration m_favorite = ApplicationSettings::getInstance()->isFavorite(m_name); setCurrentLevels(); emit nameChanged(); } QString ActivityInfo::section() const { return m_section; } void ActivityInfo::setSection(const QString §ion) { m_section = section; emit sectionChanged(); } quint32 ActivityInfo::difficulty() const { return m_difficulty; } void ActivityInfo::setDifficulty(const quint32 &difficulty) { m_difficulty = difficulty; emit difficultyChanged(); } quint32 ActivityInfo::minimalDifficulty() const { return m_minimalDifficulty; } void ActivityInfo::setMinimalDifficulty(const quint32 &minimalDifficulty) { m_minimalDifficulty = minimalDifficulty; emit minimalDifficultyChanged(); } quint32 ActivityInfo::maximalDifficulty() const { return m_maximalDifficulty; } void ActivityInfo::setMaximalDifficulty(const quint32 &maximalDifficulty) { m_maximalDifficulty = maximalDifficulty; emit maximalDifficultyChanged(); } QString ActivityInfo::icon() const { return m_icon; } void ActivityInfo::setIcon(const QString &icon) { m_icon = icon; emit iconChanged(); } QString ActivityInfo::author() const { return m_author; } void ActivityInfo::setAuthor(const QString &author) { m_author = author; emit authorChanged(); } -bool ActivityInfo::demo() const -{ - return m_demo; -} -void ActivityInfo::setDemo(const bool &demo) -{ - m_demo = demo; - emit demoChanged(); -} - QString ActivityInfo::title() const { return m_title; } void ActivityInfo::setTitle(const QString &title) { m_title = title; emit titleChanged(); } QString ActivityInfo::description() const { return m_description; } void ActivityInfo::setDescription(const QString &description) { m_description = description; emit descriptionChanged(); } QString ActivityInfo::goal() const { return m_goal; } void ActivityInfo::setGoal(const QString &goal) { m_goal = goal; emit goalChanged(); } QString ActivityInfo::prerequisite() const { return m_prerequisite; } void ActivityInfo::setPrerequisite(const QString &prerequisite) { m_prerequisite = prerequisite; emit prerequisiteChanged(); } QString ActivityInfo::manual() const { return m_manual; } void ActivityInfo::setManual(const QString &manual) { m_manual = manual; emit manualChanged(); } QString ActivityInfo::credit() const { return m_credit; } void ActivityInfo::setCredit(const QString &credit) { m_credit = credit; emit creditChanged(); } bool ActivityInfo::favorite() const { return m_favorite; } void ActivityInfo::setFavorite(const bool favorite) { m_favorite = favorite; ApplicationSettings::getInstance()->setFavorite(m_name, m_favorite); emit favoriteChanged(); } bool ActivityInfo::enabled() const { return m_enabled; } void ActivityInfo::setEnabled(const bool enabled) { m_enabled = enabled; emit enabledChanged(); } int ActivityInfo::createdInVersion() const { return m_createdInVersion; } void ActivityInfo::setCreatedInVersion(const int created) { m_createdInVersion = created; emit createdInVersionChanged(); } QStringList ActivityInfo::levels() const { return m_levels; } void ActivityInfo::setLevels(const QStringList &levels) { // levels only contains one element containing all the difficulties m_levels = levels.front().split(','); setCurrentLevels(); emit levelsChanged(); } void ActivityInfo::fillDatasets(QQmlEngine *engine) { quint32 levelMin = ApplicationSettings::getInstance()->filterLevelMin(); quint32 levelMax = ApplicationSettings::getInstance()->filterLevelMax(); for(const QString &level: m_levels) { QString url = QString("qrc:/gcompris/src/activities/%1/resource/%2/Data.qml").arg(m_name.split('/')[0]).arg(level); QQmlComponent componentRoot(engine, QUrl(url)); QObject *objectRoot = componentRoot.create(); if(objectRoot != nullptr) { Dataset *dataset = qobject_cast(objectRoot); if(levelMin > dataset->difficulty() || levelMax < dataset->difficulty()) { dataset->setEnabled(false); } m_datasets[level] = dataset; } else { qDebug() << "ERROR: failed to load " << m_name << " " << componentRoot.errors(); } } if(m_levels.empty()) { setMinimalDifficulty(m_difficulty); setMaximalDifficulty(m_difficulty); } else { computeMinMaxDifficulty(); } } QStringList ActivityInfo::currentLevels() const { return m_currentLevels; } void ActivityInfo::computeMinMaxDifficulty() { if(m_currentLevels.empty() || m_datasets.empty()) { return; } quint32 minimalDifficultyFound = 100; quint32 maximalDifficultyFound = 0; for(const QString &datasetName: m_currentLevels) { Dataset *data = m_datasets[datasetName]; if(minimalDifficultyFound > data->difficulty()) { minimalDifficultyFound = data->difficulty(); } if(maximalDifficultyFound < data->difficulty()) { maximalDifficultyFound = data->difficulty(); } } setMinimalDifficulty(minimalDifficultyFound); setMaximalDifficulty(maximalDifficultyFound); } void ActivityInfo::setCurrentLevels(const QStringList ¤tLevels) { m_currentLevels = currentLevels; computeMinMaxDifficulty(); emit currentLevelsChanged(); } void ActivityInfo::setCurrentLevels() { if(!m_name.isEmpty()) { // by default, activate all existing levels if(!m_levels.empty() && ApplicationSettings::getInstance()->currentLevels(m_name).empty()) { ApplicationSettings::getInstance()->setCurrentLevels(m_name, m_levels); } m_currentLevels = ApplicationSettings::getInstance()->currentLevels(m_name); } computeMinMaxDifficulty(); } void ActivityInfo::enableDatasetsBetweenDifficulties(quint32 levelMin, quint32 levelMax) { QStringList newLevels; for(auto it = m_datasets.begin(); it != m_datasets.end(); ++ it) { Dataset *dataset = it.value(); if(levelMin <= dataset->difficulty() && dataset->difficulty() <= levelMax) { newLevels << it.key(); dataset->setEnabled(true); } else { dataset->setEnabled(false); } } setCurrentLevels(newLevels); ApplicationSettings::getInstance()->setCurrentLevels(m_name, m_currentLevels, false); } Dataset *ActivityInfo::getDataset(const QString& name) const { return m_datasets[name]; } diff --git a/src/core/ActivityInfo.h b/src/core/ActivityInfo.h index 65e6570cd..75101b42c 100644 --- a/src/core/ActivityInfo.h +++ b/src/core/ActivityInfo.h @@ -1,257 +1,248 @@ /* GCompris - ActivityInfo.h * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #ifndef ACTIVITYINFO_H #define ACTIVITYINFO_H #include #include #include #include #include "Dataset.h" /** * @class ActivityInfo * @short A QML component holding meta information about an activity. * @ingroup components * * Each GCompris activity has to provide some meta data about itself in form * of an ActivityInfo definition. This data will be used to register it in the * ActivityInfoTree, and populate the full screen help dialog. * * @sa DialogHelp */ class ActivityInfo : public QObject { Q_OBJECT /** * Name of the main activity QML file. * * Example: "activity/Activity.qml" */ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) /** * Section(s) this activity belongs to. * * An activity can belong to one or multiple activity sections * (separated by whitespace) out of: * computer, discovery, experiment, fun, math, puzzle, * reading, strategy. */ Q_PROPERTY(QString section READ section WRITE setSection NOTIFY sectionChanged) /** * Difficulty of the activity. * * A difficulty level from 1 (easiest) to 6 (most difficult). */ Q_PROPERTY(quint32 difficulty READ difficulty WRITE setDifficulty NOTIFY difficultyChanged) /** * Minimal difficulty of the activity dataset. * * A difficulty level from 1 (easiest) to 6 (most difficult). */ Q_PROPERTY(quint32 minimalDifficulty READ minimalDifficulty WRITE setMinimalDifficulty NOTIFY minimalDifficultyChanged) /** * Maximal difficulty of the activity dataset. * * A difficulty level from 1 (easiest) to 6 (most difficult). */ Q_PROPERTY(quint32 maximalDifficulty READ maximalDifficulty WRITE setMaximalDifficulty NOTIFY maximalDifficultyChanged) /** * Relative path to the icon of the activity. * * Example: "activity/activity.svg" */ Q_PROPERTY(QString icon READ icon WRITE setIcon NOTIFY iconChanged) /** * Author of the activity. */ Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged) - /** - * Whether the activity is part of the demo version of GCompris. - */ - Q_PROPERTY(bool demo READ demo WRITE setDemo NOTIFY demoChanged) - /** * Title of the activity. */ Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) /** * Description of the activity. */ Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged) /** * Goal that this activity wants to achieve. */ Q_PROPERTY(QString goal READ goal WRITE setGoal NOTIFY goalChanged) /** * Prerequisite for using this activity. */ Q_PROPERTY(QString prerequisite READ prerequisite WRITE setPrerequisite NOTIFY prerequisiteChanged) /** * Manual describing the activity's usage. */ Q_PROPERTY(QString manual READ manual WRITE setManual NOTIFY manualChanged) /** * Credits to third parties. */ Q_PROPERTY(QString credit READ credit WRITE setCredit NOTIFY creditChanged) Q_PROPERTY(bool favorite READ favorite WRITE setFavorite NOTIFY favoriteChanged) /** * This activity is enabled. */ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) /** * Version in which this activity has been created */ Q_PROPERTY(int createdInVersion READ createdInVersion WRITE setCreatedInVersion NOTIFY createdInVersionChanged) /** * Contains a list of string defining the folder names for the different datasets. */ Q_PROPERTY(QStringList levels READ levels WRITE setLevels NOTIFY levelsChanged) /** * Current datasets used for the activity (it is among the 'levels' list) */ Q_PROPERTY(QStringList currentLevels READ currentLevels WRITE setCurrentLevels NOTIFY currentLevelsChanged) public: /// @cond INTERNAL_DOCS explicit ActivityInfo(QObject *parent = 0); QString name() const; void setName(const QString &); QString section() const; void setSection(const QString &); quint32 difficulty() const; void setDifficulty(const quint32 &); quint32 minimalDifficulty() const; void setMinimalDifficulty(const quint32 &); quint32 maximalDifficulty() const; void setMaximalDifficulty(const quint32 &); QString icon() const; void setIcon(const QString &); QString author() const; void setAuthor(const QString &); - bool demo() const; - void setDemo(const bool &); QString title() const; void setTitle(const QString &); QString description() const; void setDescription(const QString &); QString goal() const; void setGoal(const QString &); QString prerequisite() const; void setPrerequisite(const QString &); QString manual() const; void setManual(const QString &); QString credit() const; void setCredit(const QString &); bool favorite() const; void setFavorite(const bool); bool enabled() const; void setEnabled(const bool); int createdInVersion() const; void setCreatedInVersion(const int); QStringList levels() const; void setLevels(const QStringList&); QStringList currentLevels() const; void setCurrentLevels(const QStringList&); QQmlListProperty datasets(); void fillDatasets(QQmlEngine *engine); void enableDatasetsBetweenDifficulties(quint32 levelMin, quint32 levelMax); Q_INVOKABLE Dataset *getDataset(const QString& name) const; signals: void nameChanged(); void sectionChanged(); void difficultyChanged(); void minimalDifficultyChanged(); void maximalDifficultyChanged(); void iconChanged(); void authorChanged(); - void demoChanged(); void titleChanged(); void descriptionChanged(); void goalChanged(); void prerequisiteChanged(); void manualChanged(); void creditChanged(); void favoriteChanged(); void enabledChanged(); void createdInVersionChanged(); void levelsChanged(); void currentLevelsChanged(); void datasetsChanged(); /// @endcond private: QString m_name; QString m_section; quint32 m_difficulty; quint32 m_minimalDifficulty; quint32 m_maximalDifficulty; QString m_icon; QString m_author; - bool m_demo; QString m_title; QString m_description; QString m_goal; QString m_prerequisite; QString m_manual; QString m_credit; bool m_favorite; bool m_enabled; int m_createdInVersion; QStringList m_levels; QStringList m_currentLevels; /* The key is the name of the dataset */ QMap m_datasets; /* * Set current level once we have the name and the levels */ void setCurrentLevels(); /* * Compute minimal and maximal difficulty depending on the current levels. */ void computeMinMaxDifficulty(); }; #endif // ACTIVITYINFO_H diff --git a/src/core/ActivityInfoTree.cpp b/src/core/ActivityInfoTree.cpp index 873280d67..00561fb80 100644 --- a/src/core/ActivityInfoTree.cpp +++ b/src/core/ActivityInfoTree.cpp @@ -1,352 +1,334 @@ /* GCompris - ActivityInfoTree.cpp * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #include "ActivityInfoTree.h" #include "ApplicationInfo.h" #include #include #include #include #include #include #include ActivityInfoTree::ActivityInfoTree(QObject *parent) : QObject(parent), m_rootMenu(nullptr), m_currentActivity(nullptr) { } void ActivityInfoTree::setRootMenu(ActivityInfo *rootMenu) { m_rootMenu = rootMenu; } ActivityInfo *ActivityInfoTree::getRootMenu() const { return m_rootMenu; } QQmlListProperty ActivityInfoTree::menuTree() { return {this, nullptr, &menuTreeCount, &menuTreeAt}; } int ActivityInfoTree::menuTreeCount(QQmlListProperty *property) { ActivityInfoTree *obj = qobject_cast(property->object); if(obj != nullptr) return obj->m_menuTree.count(); return 0; } ActivityInfo *ActivityInfoTree::menuTreeAt(QQmlListProperty *property, int index) { ActivityInfoTree *obj = qobject_cast(property->object); if(obj != nullptr) return obj->m_menuTree.at(index); return nullptr; } ActivityInfo *ActivityInfoTree::menuTree(int index) const { return m_menuTree.at(index); } void ActivityInfoTree::setCurrentActivity(ActivityInfo *currentActivity) { m_currentActivity = currentActivity; emit currentActivityChanged(); } ActivityInfo *ActivityInfoTree::getCurrentActivity() const { return m_currentActivity; } void ActivityInfoTree::menuTreeAppend(ActivityInfo *menu) { m_menuTreeFull.append(menu); } void ActivityInfoTree::menuTreeAppend(QQmlEngine *engine, const QDir &menuDir, const QString &menuFile) { QQmlComponent component(engine, QUrl::fromLocalFile(menuDir.absolutePath() + '/' + menuFile)); QObject *object = component.create(); if(component.isReady()) { if(QQmlProperty::read(object, "section").toString() == "/") { menuTreeAppend(qobject_cast(object)); } } else { qDebug() << menuFile << ": Failed to load"; } } void ActivityInfoTree::sortByDifficulty(bool emitChanged) { std::sort(m_menuTree.begin(), m_menuTree.end(), SortByDifficulty()); if (emitChanged) Q_EMIT menuTreeChanged(); } void ActivityInfoTree::sortByName(bool emitChanged) { std::sort(m_menuTree.begin(), m_menuTree.end(), SortByName()); if (emitChanged) Q_EMIT menuTreeChanged(); } // Filter the current activity list by the given tag // the tag 'all' means no filter // the tag 'favorite' means only marked as favorite // The level is also filtered based on the global property void ActivityInfoTree::filterByTag(const QString &tag, const QString &category, bool emitChanged) { m_menuTree.clear(); // https://www.kdab.com/goodbye-q_foreach/, for loops on QList may cause detach const auto constMenuTreeFull = m_menuTreeFull; for(const auto &activity: constMenuTreeFull) { // filter on category if given else on tag if(((!category.isEmpty() && activity->section().indexOf(category) != -1) || (category.isEmpty() && activity->section().indexOf(tag) != -1) || tag == "all" || (tag == "favorite" && activity->favorite())) && (activity->maximalDifficulty() >= ApplicationSettings::getInstance()->filterLevelMin() && activity->minimalDifficulty() <= ApplicationSettings::getInstance()->filterLevelMax())) { m_menuTree.push_back(activity); } } sortByDifficulty(); if (emitChanged) Q_EMIT menuTreeChanged(); } void ActivityInfoTree::filterByDifficulty(quint32 levelMin, quint32 levelMax) { //todo fix here the difficulty filtering auto it = std::remove_if(m_menuTree.begin(), m_menuTree.end(), [&](const ActivityInfo* activity) { return activity->minimalDifficulty() < levelMin || activity->maximalDifficulty() > levelMax; }); m_menuTree.erase(it, m_menuTree.end()); } -void ActivityInfoTree::filterLockedActivities(bool emitChanged) -{ - // If we have the full version or if we show all the activities, we don't need to do anything - if(!ApplicationSettings::getInstance()->isDemoMode() || ApplicationSettings::getInstance()->showLockedActivities()) - return; - - // Remove non free activities if needed. We need to already have a menuTree filled! - auto it = std::remove_if(m_menuTree.begin(), m_menuTree.end(), - [](const ActivityInfo* activity) { return !activity->demo(); }); - m_menuTree.erase(it, m_menuTree.end()); - if (emitChanged) - Q_EMIT menuTreeChanged(); -} - void ActivityInfoTree::filterEnabledActivities(bool emitChanged) { auto it = std::remove_if(m_menuTree.begin(), m_menuTree.end(), [](const ActivityInfo* activity) { return !activity->enabled(); }); m_menuTree.erase(it, m_menuTree.end()); if (emitChanged) Q_EMIT menuTreeChanged(); } void ActivityInfoTree::filterCreatedWithinVersions(int firstVersion, int lastVersion, bool emitChanged) { m_menuTree.clear(); const auto constMenuTreeFull = m_menuTreeFull; for(const auto &activity: constMenuTreeFull) { if(firstVersion < activity->createdInVersion() && activity->createdInVersion() <= lastVersion) { m_menuTree.push_back(activity); } } if (emitChanged) Q_EMIT menuTreeChanged(); } void ActivityInfoTree::exportAsSQL() { QTextStream cout(stdout); ApplicationSettings::getInstance()->setFilterLevelMin(1); ApplicationSettings::getInstance()->setFilterLevelMax(6); filterByTag("all"); cout << "CREATE TABLE activities (" << "id INT UNIQUE, " << "name TEXT," << "section TEXT," << "author TEXT," << "difficulty INT," << "icon TEXT," << "title TEXT," << "description TEXT," << "prerequisite TEXT," << "goal TEXT," << "manual TEXT," << - "credit TEXT," << - "demo INT);" << endl; + "credit TEXT);" << endl; cout << "DELETE FROM activities" << endl; int i(0); const auto constMenuTree = m_menuTree; for(const auto &activity: constMenuTree) { cout << "INSERT INTO activities VALUES(" << i++ << ", " << "'" << activity->name() << "', " << "'" << activity->section() << "', " << "'" << activity->author() << "', " << activity->difficulty() << ", " << "'" << activity->icon() << "', " << "\"" << activity->title() << "\", " << "\"" << activity->description() << "\", " << "\"" << activity->prerequisite() << "\", " << "\"" << activity->goal().toHtmlEscaped() << "\", " << "\"" << activity->manual().toHtmlEscaped() << "\", " << - "\"" << activity->credit() << "\", " << - static_cast(activity->demo()) << + "\"" << activity->credit() << ");" << endl; } } QObject *ActivityInfoTree::menuTreeProvider(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(scriptEngine) ActivityInfoTree *menuTree = new ActivityInfoTree(nullptr); QQmlComponent componentRoot(engine, QUrl("qrc:/gcompris/src/activities/menu/ActivityInfo.qml")); QObject *objectRoot = componentRoot.create(); menuTree->setRootMenu(qobject_cast(objectRoot)); QFile file(":/gcompris/src/activities/activities_out.txt"); if(!file.open(QFile::ReadOnly)) { qDebug() << "Failed to load the activity list"; } QTextStream in(&file); while (!in.atEnd()) { QString line = in.readLine(); if(!line.startsWith(QLatin1String("#"))) { QString url = QString("qrc:/gcompris/src/activities/%1/ActivityInfo.qml").arg(line); if(!QResource::registerResource( ApplicationInfo::getFilePath(line + ".rcc"))) qDebug() << "Failed to load the resource file " << line + ".rcc"; QQmlComponent componentRoot(engine, QUrl(url)); QObject *objectRoot = componentRoot.create(); if(objectRoot != nullptr) { ActivityInfo* activityInfo = qobject_cast(objectRoot); activityInfo->fillDatasets(engine); menuTree->menuTreeAppend(activityInfo); } else { qDebug() << "ERROR: failed to load " << line << " " << componentRoot.errors(); } } } file.close(); menuTree->filterByTag("favorite"); - menuTree->filterLockedActivities(); menuTree->filterEnabledActivities(); return menuTree; } void ActivityInfoTree::registerResources() { if(!QResource::registerResource(ApplicationInfo::getFilePath("core.rcc"))) qDebug() << "Failed to load the resource file " << ApplicationInfo::getFilePath("core.rcc"); if(!QResource::registerResource(ApplicationInfo::getFilePath("menu.rcc"))) qDebug() << "Failed to load the resource file menu.rcc"; if(!QResource::registerResource(ApplicationInfo::getFilePath("activities.rcc"))) qDebug() << "Failed to load the resource file activities.rcc"; if(QResource::registerResource(ApplicationSettings::getInstance()->cachePath() + "/data2/" + QString("full-%1.rcc").arg(COMPRESSED_AUDIO))) qDebug() << "Registered the pre-download " << QString("full-%1.rcc").arg(COMPRESSED_AUDIO); } void ActivityInfoTree::filterBySearch(const QString& text) { m_menuTree.clear(); if(!text.trimmed().isEmpty()) { // perform search on each word entered in the searchField const QStringList wordsList = text.split(' ', QString::SkipEmptyParts); for(const QString &searchTerm: wordsList) { const QString trimmedText = searchTerm.trimmed(); const auto &constMenuTreeFull = m_menuTreeFull; for(const auto &activity: constMenuTreeFull) { if(activity->title().contains(trimmedText, Qt::CaseInsensitive) || activity->name().contains(trimmedText, Qt::CaseInsensitive) || activity->description().contains(trimmedText, Qt::CaseInsensitive)) { // add the activity only if it's not added if(m_menuTree.indexOf(activity) == -1) m_menuTree.push_back(activity); } } } } else m_menuTree = m_menuTreeFull; filterEnabledActivities(false); - filterLockedActivities(false); filterByDifficulty(ApplicationSettings::getInstance()->filterLevelMin(), ApplicationSettings::getInstance()->filterLevelMax()); sortByDifficulty(false); Q_EMIT menuTreeChanged(); } void ActivityInfoTree::minMaxFiltersChanged(quint32 levelMin, quint32 levelMax, bool emit) { for(ActivityInfo *activity: m_menuTreeFull) { activity->enableDatasetsBetweenDifficulties(levelMin, levelMax); } ApplicationSettings::getInstance()->sync(); } QVariantList ActivityInfoTree::allCharacters() { QSet keyboardChars; const auto constMenuTreeFull = m_menuTreeFull; for(const auto &tree: constMenuTreeFull) { const QString &title = tree->title(); for(const QChar &letter: title) { if(!letter.isSpace() && !letter.isPunct()) { keyboardChars.insert(letter.toLower()); } } } for(const QChar &letters: keyboardChars) { m_keyboardCharacters.push_back(letters); } std::sort(m_keyboardCharacters.begin(), m_keyboardCharacters.end()); return m_keyboardCharacters; } diff --git a/src/core/ActivityInfoTree.h b/src/core/ActivityInfoTree.h index 65ca921b1..d5958da04 100644 --- a/src/core/ActivityInfoTree.h +++ b/src/core/ActivityInfoTree.h @@ -1,100 +1,99 @@ /* GCompris - ActivityInfoTree.h * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #ifndef ACTIVITYINFOTREE_H #define ACTIVITYINFOTREE_H #include "ActivityInfo.h" #include #include class ActivityInfoTree : public QObject { Q_OBJECT Q_PROPERTY(ActivityInfo* rootMenu READ getRootMenu CONSTANT) Q_PROPERTY(QQmlListProperty menuTree READ menuTree NOTIFY menuTreeChanged) Q_PROPERTY(ActivityInfo* currentActivity READ getCurrentActivity WRITE setCurrentActivity NOTIFY currentActivityChanged) Q_PROPERTY(QVariantList characters READ allCharacters CONSTANT) public: explicit ActivityInfoTree(QObject *parent = 0); QQmlListProperty menuTree(); ActivityInfo *getRootMenu() const; void setRootMenu(ActivityInfo *rootMenu); ActivityInfo *menuTree(int) const; void setCurrentActivity(ActivityInfo *currentActivity); ActivityInfo *getCurrentActivity() const; void menuTreeAppend(ActivityInfo *menu); void menuTreeAppend(QQmlEngine *engine, const QDir &menuDir, const QString &menuFile); void sortByDifficulty(bool emitChanged = true); void sortByName(bool emitChanged = true); QVariantList allCharacters(); protected Q_SLOTS: Q_INVOKABLE void filterByTag(const QString &tag, const QString &category = "", bool emitChanged = true); - Q_INVOKABLE void filterLockedActivities(bool emitChanged = true); Q_INVOKABLE void filterEnabledActivities(bool emitChanged = true); // create a tree from the whole list of activities with the activities created between the two versions Q_INVOKABLE void filterCreatedWithinVersions(int firstVersion, int lastVersion, bool emitChanged = true); Q_INVOKABLE void filterBySearch(const QString& text); Q_INVOKABLE void filterByDifficulty(quint32 levelMin, quint32 levelMax); Q_INVOKABLE void minMaxFiltersChanged(quint32 levelMin, quint32 levelMax, bool emitChanged = true); signals: void menuTreeChanged(); void currentActivityChanged(); void allCharactersChanged(); private: // this is the full activity list, it never changes QList m_menuTreeFull; // represents the Menu view and can be filtered QList m_menuTree; ActivityInfo *m_rootMenu; ActivityInfo *m_currentActivity; QVariantList m_keyboardCharacters; static int menuTreeCount(QQmlListProperty *property); static ActivityInfo *menuTreeAt(QQmlListProperty *property, int index); struct SortByDifficulty { bool operator()(const ActivityInfo *a, const ActivityInfo *b) const { return a->minimalDifficulty() < b->minimalDifficulty(); } }; struct SortByName { bool operator()(const ActivityInfo *a, const ActivityInfo *b) const { return a->name() < b->name(); } }; public: static void registerResources(); static QObject *menuTreeProvider(QQmlEngine *engine, QJSEngine *scriptEngine); void exportAsSQL(); }; #endif // ACTIVITYINFOTREE_H diff --git a/src/core/ApplicationAndroid.cpp b/src/core/ApplicationAndroid.cpp index e9c513798..dbcfab487 100644 --- a/src/core/ApplicationAndroid.cpp +++ b/src/core/ApplicationAndroid.cpp @@ -1,126 +1,89 @@ /* GCompris - ApplicationAndroid.cpp * * Copyright (C) 2014-2015 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #include "ApplicationSettings.h" #include "ApplicationInfo.h" #include #include #include -void ApplicationSettings::setDemoMode(const bool newDemoMode) -{ - if(!newDemoMode) { - // Call Google play store - QAndroidJniObject::callStaticMethod("net/gcompris/GComprisActivity", - "buyGCompris"); - } else { - // Going back to demo mode, should never happens except for testing - ApplicationSettings::getInstance()->bought(false); - } -} - -void ApplicationSettings::checkPayment() { -#if defined(WITH_ACTIVATION_CODE) - QAndroidJniObject::callStaticMethod("net/gcompris/GComprisActivity", - "checkPayment"); -#endif -} - -uint ApplicationSettings::checkActivationCode(const QString &code) { - // Not used in inapp mode. - return 0; -} - -static void bought(JNIEnv *, jclass /*clazz*/, jboolean b) -{ - ApplicationSettings::getInstance()->bought(b); -} - -static JNINativeMethod methods[] = { - {"bought", "(Z)V", (void *)bought} -}; - bool ApplicationInfo::requestAudioFocus() const { qDebug() << "requestAudioFocus"; return QAndroidJniObject::callStaticMethod("net/gcompris/GComprisActivity", "requestAudioFocus"); } void ApplicationInfo::abandonAudioFocus() const { QAndroidJniObject::callStaticMethod("net/gcompris/GComprisActivity", "abandonAudioFocus"); } jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { JNIEnv *env; if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_4) != JNI_OK) return JNI_FALSE; - jclass clazz = env->FindClass("net/gcompris/GComprisActivity"); - if (env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])) < 0) - return JNI_FALSE; - return JNI_VERSION_1_4; } void ApplicationInfo::setRequestedOrientation(int orientation) { QAndroidJniObject activity = QtAndroid::androidActivity(); activity.callMethod("setRequestedOrientation", "(I)V", orientation); } int ApplicationInfo::getRequestedOrientation() { QAndroidJniObject activity = QtAndroid::androidActivity(); jint orientation = activity.callMethod("getRequestedOrientation"); return orientation; } void ApplicationInfo::setKeepScreenOn(bool value) { QAndroidJniObject activity = QtAndroid::androidActivity(); activity.callMethod("setKeepScreenOn", "(Z)V", value); } int ApplicationInfo::localeCompare(const QString& a, const QString& b, const QString& locale) const { QString _locale = locale.isEmpty() ? \ ApplicationSettings::getInstance()->locale() \ : locale; if (_locale == GC_DEFAULT_LOCALE) _locale = QLocale::system().name(); // QCollator on Android uses only the posix backend as of Qt 5.5.1, // which is not capable of doing locale aware comparison. // cf. https://bugreports.qt.io/browse/QTBUG-43637 // Therefore use native Collation via jni: jint res = QtAndroid::androidActivity().callMethod( "localeCompare", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I", QAndroidJniObject::fromString(a).object(), QAndroidJniObject::fromString(b).object(), QAndroidJniObject::fromString(_locale).object()); return res; } diff --git a/src/core/ApplicationSettings.cpp b/src/core/ApplicationSettings.cpp index f1b233177..f880cc7e7 100644 --- a/src/core/ApplicationSettings.cpp +++ b/src/core/ApplicationSettings.cpp @@ -1,565 +1,516 @@ /* GCompris - ApplicationSettings.cpp * * Copyright (C) 2014-2016 Johnny Jazeix * * Authors: * Johnny Jazeix * * 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 . */ #include "ApplicationSettings.h" #include "ApplicationInfo.h" #include "DownloadManager.h" #include #include #include #include #include #include #include #include #define GC_DEFAULT_FONT QLatin1String("Andika-R.otf") #define GC_DEFAULT_FONT_CAPITALIZATION 0 // Font.MixedCase #define GC_DEFAULT_FONT_LETTER_SPACING 0 static const char *GENERAL_GROUP_KEY = "General"; static const char *ADMIN_GROUP_KEY = "Admin"; static const char *INTERNAL_GROUP_KEY = "Internal"; static const char *FAVORITE_GROUP_KEY = "Favorite"; static const char *LEVELS_GROUP_KEY = "Levels"; static const char *FULLSCREEN_KEY = "fullscreen"; static const char *PREVIOUS_HEIGHT_KEY = "previousHeight"; static const char *PREVIOUS_WIDTH_KEY = "previousWidth"; -static const char *SHOW_LOCKED_ACTIVITIES_KEY = "showLockedActivities"; static const char *ENABLE_AUDIO_VOICES_KEY = "enableAudioVoices"; static const char *ENABLE_AUDIO_EFFECTS_KEY = "enableAudioEffects"; static const char *ENABLE_BACKGROUND_MUSIC_KEY = "enableBackgroundMusic"; static const char *VIRTUALKEYBOARD_KEY = "virtualKeyboard"; static const char *LOCALE_KEY = "locale"; static const char *FONT_KEY = "font"; static const char *IS_CURRENT_FONT_EMBEDDED = "isCurrentFontEmbedded"; static const char *ENABLE_AUTOMATIC_DOWNLOADS = "enableAutomaticDownloads"; static const char *FILTERED_BACKGROUND_MUSIC_KEY = "filteredBackgroundMusic"; static const char *BACKGROUND_MUSIC_VOLUME_KEY = "backgroundMusicVolume"; static const char *AUDIO_EFFECTS_VOLUME_KEY = "audioEffectsVolume"; static const char *DOWNLOAD_SERVER_URL_KEY = "downloadServerUrl"; static const char *CACHE_PATH_KEY = "cachePath"; static const char *USERDATA_PATH_KEY = "userDataPath"; static const char *RENDERER_KEY = "renderer"; static const char *EXE_COUNT_KEY = "exeCount"; static const char *LAST_GC_VERSION_RAN = "lastGCVersionRan"; static const char *FILTER_LEVEL_MIN = "filterLevelMin"; static const char *FILTER_LEVEL_MAX = "filterLevelMax"; static const char *BASE_FONT_SIZE_KEY = "baseFontSize"; static const char *FONT_CAPITALIZATION = "fontCapitalization"; static const char *FONT_LETTER_SPACING = "fontLetterSpacing"; static const char *DEFAULT_CURSOR = "defaultCursor"; static const char *NO_CURSOR = "noCursor"; -static const char *DEMO_KEY = "demo"; -static const char *CODE_KEY = "key"; static const char *KIOSK_KEY = "kiosk"; static const char *SECTION_VISIBLE = "sectionVisible"; static const char *WORDSET = "wordset"; static const char *PROGRESS_KEY = "progress"; static const char *DEFAULT_DOWNLOAD_SERVER = "https://cdn.kde.org/gcompris"; ApplicationSettings *ApplicationSettings::m_instance = nullptr; ApplicationSettings::ApplicationSettings(const QString &configPath, QObject *parent): QObject(parent), m_baseFontSizeMin(-7), m_baseFontSizeMax(7), m_fontLetterSpacingMin(0.0), m_fontLetterSpacingMax(8.0), m_config(configPath, QSettings::IniFormat) { const QRect &screenSize = QGuiApplication::screens().at(0)->availableGeometry(); // initialize from settings file or default // general group m_config.beginGroup(GENERAL_GROUP_KEY); m_isAudioEffectsEnabled = m_config.value(ENABLE_AUDIO_EFFECTS_KEY, true).toBool(); m_isBackgroundMusicEnabled = m_config.value(ENABLE_BACKGROUND_MUSIC_KEY, true).toBool(); m_isFullscreen = m_config.value(FULLSCREEN_KEY, true).toBool(); m_previousHeight = m_config.value(PREVIOUS_HEIGHT_KEY, screenSize.height()).toUInt(); m_previousWidth = m_config.value(PREVIOUS_WIDTH_KEY, screenSize.width()).toUInt(); m_isAudioVoicesEnabled = m_config.value(ENABLE_AUDIO_VOICES_KEY, true).toBool(); m_isVirtualKeyboard = m_config.value(VIRTUALKEYBOARD_KEY, ApplicationInfo::getInstance()->isMobile()).toBool(); m_locale = m_config.value(LOCALE_KEY, GC_DEFAULT_LOCALE).toString(); m_font = m_config.value(FONT_KEY, GC_DEFAULT_FONT).toString(); if(m_font == QLatin1String("Andika-R.ttf")) m_font = "Andika-R.otf"; m_fontCapitalization = m_config.value(FONT_CAPITALIZATION, GC_DEFAULT_FONT_CAPITALIZATION).toUInt(); m_fontLetterSpacing = m_config.value(FONT_LETTER_SPACING, GC_DEFAULT_FONT_LETTER_SPACING).toReal(); m_isEmbeddedFont = m_config.value(IS_CURRENT_FONT_EMBEDDED, true).toBool(); m_filteredBackgroundMusic = m_config.value(FILTERED_BACKGROUND_MUSIC_KEY, ApplicationInfo::getInstance()->getBackgroundMusicFromRcc()).toStringList(); m_backgroundMusicVolume = m_config.value(BACKGROUND_MUSIC_VOLUME_KEY, 0.2).toReal(); m_audioEffectsVolume = m_config.value(AUDIO_EFFECTS_VOLUME_KEY, 0.7).toReal(); - // Init the activation mode - if(QLatin1String(ACTIVATION_MODE) == "no") - m_activationMode = 0; - else if(QLatin1String(ACTIVATION_MODE) == "inapp") - m_activationMode = 1; - else if(QLatin1String(ACTIVATION_MODE) == "internal") - m_activationMode = 2; - else - qFatal("Unknown activation mode"); - - // Set the demo mode - if(QLatin1String(ACTIVATION_MODE) != "no") - m_isDemoMode = m_config.value(DEMO_KEY, true).toBool(); - else - m_isDemoMode = false; - m_codeKey = m_config.value(CODE_KEY, "").toString(); - #if defined(WITH_KIOSK_MODE) m_isKioskMode = m_config.value(KIOSK_KEY, true).toBool(); #else m_isKioskMode = m_config.value(KIOSK_KEY, false).toBool(); #endif - // Option only useful if we are in demo mode (else all the activities are available and unlocked) - // By default, all the activities are displayed (even locked ones) - m_showLockedActivities = m_config.value(SHOW_LOCKED_ACTIVITIES_KEY, m_isDemoMode).toBool(); m_sectionVisible = m_config.value(SECTION_VISIBLE, true).toBool(); m_wordset = m_config.value(WORDSET, "").toString(); m_isAutomaticDownloadsEnabled = m_config.value(ENABLE_AUTOMATIC_DOWNLOADS, !ApplicationInfo::getInstance()->isMobile() && ApplicationInfo::isDownloadAllowed()).toBool(); m_filterLevelMin = m_config.value(FILTER_LEVEL_MIN, 1).toUInt(); m_filterLevelMax = m_config.value(FILTER_LEVEL_MAX, 6).toUInt(); m_defaultCursor = m_config.value(DEFAULT_CURSOR, false).toBool(); m_noCursor = m_config.value(NO_CURSOR, false).toBool(); m_baseFontSize = m_config.value(BASE_FONT_SIZE_KEY, 0).toInt(); m_config.sync(); // make sure all defaults are written back m_config.endGroup(); // admin group m_config.beginGroup(ADMIN_GROUP_KEY); m_downloadServerUrl = m_config.value(DOWNLOAD_SERVER_URL_KEY, QLatin1String(DEFAULT_DOWNLOAD_SERVER)).toString(); if(m_downloadServerUrl == "http://gcompris.net") { setDownloadServerUrl(DEFAULT_DOWNLOAD_SERVER); } m_cachePath = m_config.value(CACHE_PATH_KEY, QStandardPaths::writableLocation(QStandardPaths::CacheLocation)).toString(); m_userDataPath = m_config.value(USERDATA_PATH_KEY, QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1String("/GCompris")).toString(); m_renderer = m_config.value(RENDERER_KEY, GRAPHICAL_RENDERER).toString(); m_config.endGroup(); // internal group m_config.beginGroup(INTERNAL_GROUP_KEY); m_exeCount = m_config.value(EXE_COUNT_KEY, 0).toUInt(); m_lastGCVersionRan = m_config.value(LAST_GC_VERSION_RAN, 0).toUInt(); m_config.endGroup(); // no group m_isBarHidden = false; - connect(this, &ApplicationSettings::showLockedActivitiesChanged, this, &ApplicationSettings::notifyShowLockedActivitiesChanged); connect(this, &ApplicationSettings::audioVoicesEnabledChanged, this, &ApplicationSettings::notifyAudioVoicesEnabledChanged); connect(this, &ApplicationSettings::audioEffectsEnabledChanged, this, &ApplicationSettings::notifyAudioEffectsEnabledChanged); connect(this, &ApplicationSettings::backgroundMusicEnabledChanged, this, &ApplicationSettings::notifyBackgroundMusicEnabledChanged); connect(this, &ApplicationSettings::filteredBackgroundMusicChanged, this, &ApplicationSettings::notifyFilteredBackgroundMusicChanged); connect(this, &ApplicationSettings::fullscreenChanged, this, &ApplicationSettings::notifyFullscreenChanged); connect(this, &ApplicationSettings::previousHeightChanged, this, &ApplicationSettings::notifyPreviousHeightChanged); connect(this, &ApplicationSettings::previousWidthChanged, this, &ApplicationSettings::notifyPreviousWidthChanged); connect(this, &ApplicationSettings::localeChanged, this, &ApplicationSettings::notifyLocaleChanged); connect(this, &ApplicationSettings::fontChanged, this, &ApplicationSettings::notifyFontChanged); connect(this, &ApplicationSettings::virtualKeyboardChanged, this, &ApplicationSettings::notifyVirtualKeyboardChanged); connect(this, &ApplicationSettings::automaticDownloadsEnabledChanged, this, &ApplicationSettings::notifyAutomaticDownloadsEnabledChanged); connect(this, &ApplicationSettings::filterLevelMinChanged, this, &ApplicationSettings::notifyFilterLevelMinChanged); connect(this, &ApplicationSettings::filterLevelMaxChanged, this, &ApplicationSettings::notifyFilterLevelMaxChanged); connect(this, &ApplicationSettings::sectionVisibleChanged, this, &ApplicationSettings::notifySectionVisibleChanged); connect(this, &ApplicationSettings::wordsetChanged, this, &ApplicationSettings::notifyWordsetChanged); - connect(this, &ApplicationSettings::demoModeChanged, this, &ApplicationSettings::notifyDemoModeChanged); - connect(this, &ApplicationSettings::codeKeyChanged, this, &ApplicationSettings::notifyCodeKeyChanged); connect(this, &ApplicationSettings::kioskModeChanged, this, &ApplicationSettings::notifyKioskModeChanged); connect(this, &ApplicationSettings::downloadServerUrlChanged, this, &ApplicationSettings::notifyDownloadServerUrlChanged); connect(this, &ApplicationSettings::cachePathChanged, this, &ApplicationSettings::notifyCachePathChanged); connect(this, &ApplicationSettings::userDataPathChanged, this, &ApplicationSettings::notifyUserDataPathChanged); connect(this, &ApplicationSettings::rendererChanged, this, &ApplicationSettings::notifyRendererChanged); connect(this, &ApplicationSettings::exeCountChanged, this, &ApplicationSettings::notifyExeCountChanged); connect(this, &ApplicationSettings::barHiddenChanged, this, &ApplicationSettings::notifyBarHiddenChanged); connect(this, &ApplicationSettings::lastGCVersionRanChanged, this, &ApplicationSettings::notifyLastGCVersionRanChanged); connect(this, &ApplicationSettings::backgroundMusicVolumeChanged, this, &ApplicationSettings::notifyBackgroundMusicVolumeChanged); connect(this, &ApplicationSettings::audioEffectsVolumeChanged, this, &ApplicationSettings::notifyAudioEffectsVolumeChanged); } ApplicationSettings::~ApplicationSettings() { // make sure settings file is up2date: // general group m_config.beginGroup(GENERAL_GROUP_KEY); - m_config.setValue(SHOW_LOCKED_ACTIVITIES_KEY, m_showLockedActivities); m_config.setValue(ENABLE_AUDIO_VOICES_KEY, m_isAudioVoicesEnabled); m_config.setValue(ENABLE_BACKGROUND_MUSIC_KEY, m_isBackgroundMusicEnabled); m_config.setValue(FILTERED_BACKGROUND_MUSIC_KEY, m_filteredBackgroundMusic); m_config.setValue(BACKGROUND_MUSIC_VOLUME_KEY, m_backgroundMusicVolume); m_config.setValue(AUDIO_EFFECTS_VOLUME_KEY, m_audioEffectsVolume); m_config.setValue(LOCALE_KEY, m_locale); m_config.setValue(FONT_KEY, m_font); m_config.setValue(IS_CURRENT_FONT_EMBEDDED, m_isEmbeddedFont); m_config.setValue(FULLSCREEN_KEY, m_isFullscreen); m_config.setValue(PREVIOUS_HEIGHT_KEY, m_previousHeight); m_config.setValue(PREVIOUS_WIDTH_KEY, m_previousWidth); m_config.setValue(VIRTUALKEYBOARD_KEY, m_isVirtualKeyboard); m_config.setValue(ENABLE_AUTOMATIC_DOWNLOADS, m_isAutomaticDownloadsEnabled); m_config.setValue(FILTER_LEVEL_MIN, m_filterLevelMin); m_config.setValue(FILTER_LEVEL_MAX, m_filterLevelMax); - m_config.setValue(DEMO_KEY, m_isDemoMode); - m_config.setValue(CODE_KEY, m_codeKey); m_config.setValue(KIOSK_KEY, m_isKioskMode); m_config.setValue(SECTION_VISIBLE, m_sectionVisible); m_config.setValue(WORDSET, m_wordset); m_config.setValue(DEFAULT_CURSOR, m_defaultCursor); m_config.setValue(NO_CURSOR, m_noCursor); m_config.setValue(BASE_FONT_SIZE_KEY, m_baseFontSize); m_config.setValue(FONT_CAPITALIZATION, m_fontCapitalization); m_config.setValue(FONT_LETTER_SPACING, m_fontLetterSpacing); m_config.endGroup(); // admin group m_config.beginGroup(ADMIN_GROUP_KEY); m_config.setValue(DOWNLOAD_SERVER_URL_KEY, m_downloadServerUrl); m_config.setValue(CACHE_PATH_KEY, m_cachePath); m_config.setValue(USERDATA_PATH_KEY, m_userDataPath); m_config.setValue(RENDERER_KEY, m_renderer); m_config.endGroup(); // internal group m_config.beginGroup(INTERNAL_GROUP_KEY); m_config.setValue(EXE_COUNT_KEY, m_exeCount); m_config.setValue(LAST_GC_VERSION_RAN, m_lastGCVersionRan); m_config.endGroup(); m_config.sync(); m_instance = nullptr; } -void ApplicationSettings::notifyShowLockedActivitiesChanged() -{ - updateValueInConfig(GENERAL_GROUP_KEY, SHOW_LOCKED_ACTIVITIES_KEY, m_showLockedActivities); - qDebug() << "notifyShowLockedActivitiesChanged: " << m_showLockedActivities; -} - void ApplicationSettings::notifyAudioVoicesEnabledChanged() { updateValueInConfig(GENERAL_GROUP_KEY, ENABLE_AUDIO_VOICES_KEY, m_isAudioVoicesEnabled); qDebug() << "notifyAudioVoices: " << m_isAudioVoicesEnabled; } void ApplicationSettings::notifyAudioEffectsEnabledChanged() { updateValueInConfig(GENERAL_GROUP_KEY, ENABLE_AUDIO_EFFECTS_KEY, m_isAudioEffectsEnabled); qDebug() << "notifyAudioEffects: " << m_isAudioEffectsEnabled; } void ApplicationSettings::notifyBackgroundMusicEnabledChanged() { updateValueInConfig(GENERAL_GROUP_KEY, ENABLE_BACKGROUND_MUSIC_KEY, m_isBackgroundMusicEnabled); qDebug() << "notifyBackgroundMusic: " << m_isBackgroundMusicEnabled; } void ApplicationSettings::notifyFilteredBackgroundMusicChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FILTERED_BACKGROUND_MUSIC_KEY, m_filteredBackgroundMusic); qDebug()<<"filteredBackgroundMusic: " << m_filteredBackgroundMusic; } void ApplicationSettings::notifyBackgroundMusicVolumeChanged() { updateValueInConfig(GENERAL_GROUP_KEY, BACKGROUND_MUSIC_VOLUME_KEY, m_backgroundMusicVolume); qDebug()<<"backgroundMusicVolume: " << m_backgroundMusicVolume; } void ApplicationSettings::notifyAudioEffectsVolumeChanged() { updateValueInConfig(GENERAL_GROUP_KEY, AUDIO_EFFECTS_VOLUME_KEY, m_audioEffectsVolume); qDebug()<<"audioEffectsVolume: " << m_audioEffectsVolume; } void ApplicationSettings::notifyLocaleChanged() { updateValueInConfig(GENERAL_GROUP_KEY, LOCALE_KEY, m_locale); qDebug() << "new locale: " << m_locale; } void ApplicationSettings::notifyFontChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FONT_KEY, m_font); qDebug() << "new font: " << m_font; } void ApplicationSettings::notifyEmbeddedFontChanged() { updateValueInConfig(GENERAL_GROUP_KEY, IS_CURRENT_FONT_EMBEDDED, m_isEmbeddedFont); qDebug() << "new font is embedded: " << m_isEmbeddedFont; } void ApplicationSettings::notifyFontCapitalizationChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FONT_CAPITALIZATION, m_fontCapitalization); qDebug() << "new fontCapitalization: " << m_fontCapitalization; } void ApplicationSettings::notifyFontLetterSpacingChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FONT_LETTER_SPACING, m_fontLetterSpacing); qDebug() << "new fontLetterSpacing: " << m_fontLetterSpacing; } void ApplicationSettings::notifyFullscreenChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FULLSCREEN_KEY, m_isFullscreen); qDebug() << "fullscreen set to: " << m_isFullscreen; } void ApplicationSettings::notifyPreviousHeightChanged() { updateValueInConfig(GENERAL_GROUP_KEY, PREVIOUS_HEIGHT_KEY, m_previousHeight); qDebug() << "previous height set to: " << m_previousHeight; } void ApplicationSettings::notifyPreviousWidthChanged() { updateValueInConfig(GENERAL_GROUP_KEY, PREVIOUS_WIDTH_KEY, m_previousWidth); qDebug() << "previous width set to: " << m_previousWidth; } void ApplicationSettings::notifyVirtualKeyboardChanged() { updateValueInConfig(GENERAL_GROUP_KEY, VIRTUALKEYBOARD_KEY, m_isVirtualKeyboard); qDebug() << "virtualkeyboard set to: " << m_isVirtualKeyboard; } bool ApplicationSettings::isAutomaticDownloadsEnabled() const { return m_isAutomaticDownloadsEnabled && ApplicationInfo::isDownloadAllowed(); } void ApplicationSettings::setIsAutomaticDownloadsEnabled(const bool newIsAutomaticDownloadsEnabled) { if(ApplicationInfo::isDownloadAllowed()) { m_isAutomaticDownloadsEnabled = newIsAutomaticDownloadsEnabled; emit automaticDownloadsEnabledChanged(); } } void ApplicationSettings::notifyAutomaticDownloadsEnabledChanged() { updateValueInConfig(GENERAL_GROUP_KEY, ENABLE_AUTOMATIC_DOWNLOADS, m_isAutomaticDownloadsEnabled); qDebug() << "enableAutomaticDownloads set to: " << m_isAutomaticDownloadsEnabled; } void ApplicationSettings::notifyFilterLevelMinChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FILTER_LEVEL_MIN, m_filterLevelMin); qDebug() << "filterLevelMin set to: " << m_filterLevelMin; } void ApplicationSettings::notifyFilterLevelMaxChanged() { updateValueInConfig(GENERAL_GROUP_KEY, FILTER_LEVEL_MAX, m_filterLevelMax); qDebug() << "filterLevelMax set to: " << m_filterLevelMax; } -void ApplicationSettings::notifyDemoModeChanged() -{ - updateValueInConfig(GENERAL_GROUP_KEY, DEMO_KEY, m_isDemoMode); - qDebug() << "notifyDemoMode: " << m_isDemoMode; -} - -void ApplicationSettings::notifyCodeKeyChanged() -{ - checkPayment(); - if(!m_isDemoMode) - updateValueInConfig(GENERAL_GROUP_KEY, CODE_KEY, m_codeKey); - qDebug() << "notifyCodeKey: " << m_codeKey; -} - void ApplicationSettings::notifyKioskModeChanged() { updateValueInConfig(GENERAL_GROUP_KEY, KIOSK_KEY, m_isKioskMode); qDebug() << "notifyKioskMode: " << m_isKioskMode; } void ApplicationSettings::notifySectionVisibleChanged() { updateValueInConfig(GENERAL_GROUP_KEY, SECTION_VISIBLE, m_sectionVisible); qDebug() << "notifySectionVisible: " << m_sectionVisible; } void ApplicationSettings::notifyWordsetChanged() { if(!m_wordset.isEmpty() && DownloadManager::getInstance()->haveLocalResource(m_wordset) && !DownloadManager::getInstance()->isDataRegistered("words")) { // words.rcc is there -> register old file first // then try to update in the background DownloadManager::getInstance()->updateResource(m_wordset); } updateValueInConfig(GENERAL_GROUP_KEY, WORDSET, m_wordset); qDebug() << "notifyWordset: " << m_wordset; } void ApplicationSettings::notifyDownloadServerUrlChanged() { updateValueInConfig(ADMIN_GROUP_KEY, DOWNLOAD_SERVER_URL_KEY, m_downloadServerUrl); qDebug() << "downloadServerUrl set to: " << m_downloadServerUrl; } void ApplicationSettings::notifyCachePathChanged() { updateValueInConfig(ADMIN_GROUP_KEY, CACHE_PATH_KEY, m_cachePath); qDebug() << "cachePath set to: " << m_cachePath; } void ApplicationSettings::notifyUserDataPathChanged() { updateValueInConfig(ADMIN_GROUP_KEY, USERDATA_PATH_KEY, m_userDataPath); qDebug() << "userDataPath set to: " << m_userDataPath; } void ApplicationSettings::notifyRendererChanged() { updateValueInConfig(ADMIN_GROUP_KEY, RENDERER_KEY, m_renderer); qDebug() << "renderer set to: " << m_renderer; } void ApplicationSettings::notifyExeCountChanged() { updateValueInConfig(INTERNAL_GROUP_KEY, EXE_COUNT_KEY, m_exeCount); qDebug() << "exeCount set to: " << m_exeCount; } void ApplicationSettings::notifyLastGCVersionRanChanged() { updateValueInConfig(INTERNAL_GROUP_KEY, LAST_GC_VERSION_RAN, m_lastGCVersionRan); qDebug() << "lastVersionRan set to: " << m_lastGCVersionRan; } void ApplicationSettings::notifyBarHiddenChanged() { qDebug() << "is bar hidden: " << m_isBarHidden; } void ApplicationSettings::saveBaseFontSize() { updateValueInConfig(GENERAL_GROUP_KEY, BASE_FONT_SIZE_KEY, m_baseFontSize); } void ApplicationSettings::saveActivityConfiguration(const QString &activity, const QVariantMap &data) { qDebug() << "save configuration for:" << activity; QMapIterator i(data); while (i.hasNext()) { i.next(); updateValueInConfig(activity, i.key(), i.value(), false); } m_config.sync(); } QVariantMap ApplicationSettings::loadActivityConfiguration(const QString &activity) { qDebug() << "load configuration for:" << activity; m_config.beginGroup(activity); QStringList keys = m_config.childKeys(); QVariantMap data; for(const QString &key : keys) { data[key] = m_config.value(key); } m_config.endGroup(); return data; } void ApplicationSettings::setFavorite(const QString &activity, bool favorite) { updateValueInConfig(FAVORITE_GROUP_KEY, activity, favorite); } bool ApplicationSettings::isFavorite(const QString &activity) { m_config.beginGroup(FAVORITE_GROUP_KEY); bool favorite = m_config.value(activity, false).toBool(); m_config.endGroup(); return favorite; } void ApplicationSettings::setCurrentLevels(const QString &activity, const QStringList &level, bool sync) { updateValueInConfig(LEVELS_GROUP_KEY, activity, level, sync); } QStringList ApplicationSettings::currentLevels(const QString &activity) { m_config.beginGroup(LEVELS_GROUP_KEY); QStringList level = m_config.value(activity, QStringList()).toStringList(); m_config.endGroup(); return level; } template void ApplicationSettings::updateValueInConfig(const QString& group, const QString& key, const T& value, bool sync) { m_config.beginGroup(group); m_config.setValue(key, value); m_config.endGroup(); if(sync) { m_config.sync(); } } void ApplicationSettings::sync() { m_config.sync(); } int ApplicationSettings::loadActivityProgress(const QString &activity) { int progress = 0; m_config.beginGroup(activity); progress = m_config.value(PROGRESS_KEY, 0).toInt(); m_config.endGroup(); qDebug() << "loaded progress for activity" << activity << ":" << progress; return progress; } void ApplicationSettings::saveActivityProgress(const QString &activity, int progress) { updateValueInConfig(activity, PROGRESS_KEY, progress); } bool ApplicationSettings::useExternalWordset() { return !m_wordset.isEmpty() && DownloadManager::getInstance()->isDataRegistered("words"); } QObject *ApplicationSettings::applicationSettingsProvider(QQmlEngine *engine, QJSEngine *scriptEngine) { Q_UNUSED(engine) Q_UNUSED(scriptEngine) ApplicationSettings* appSettings = getInstance(); return appSettings; } diff --git a/src/core/ApplicationSettings.h b/src/core/ApplicationSettings.h index f821d77d7..0f48e0b9c 100644 --- a/src/core/ApplicationSettings.h +++ b/src/core/ApplicationSettings.h @@ -1,718 +1,644 @@ /* GCompris - ApplicationSettings.h * * Copyright (C) 2014 Johnny Jazeix * * Authors: * Johnny Jazeix * * 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 . */ #ifndef APPLICATIONSETTINGS_H #define APPLICATIONSETTINGS_H #include #include #include #include #include #include #include #define GC_DEFAULT_LOCALE "system" /** * @class ApplicationSettings * @short Singleton that contains GCompris' persistent settings. * @ingroup infrastructure * * Settings are persisted using QSettings, which stores them in platform * specific locations. * * The settings are subdivided in different groups of settings. * * [General] settings are mostly changeable by users in the DialogConfig * dialog. * * [Admin] and [Internal] settings are not changeable by the * user and used for internal purposes. Should only be changed if you really know * what you are doing. * * The [Favorite] group is auto-generated from the favorite activities * selected by a user. * * The [Levels] group is auto-generated from the levels chosen by * a user (if the activity provides multiple datasets). * * Besides these global settings there is one group for each activity that * stores persistent settings. * * Settings defaults are defined in the source code. * * @sa DialogActivityConfig */ class ApplicationSettings : public QObject { Q_OBJECT /* General group */ - /** - * Whether to show locked activities. - * False if in Demo mode, true otherwise. - */ - Q_PROPERTY(bool showLockedActivities READ showLockedActivities WRITE setShowLockedActivities NOTIFY showLockedActivitiesChanged) - /** * Whether audio voices/speech should be enabled. */ Q_PROPERTY(bool isAudioVoicesEnabled READ isAudioVoicesEnabled WRITE setIsAudioVoicesEnabled NOTIFY audioVoicesEnabledChanged) /** * Whether audio effects should be enabled. */ Q_PROPERTY(bool isAudioEffectsEnabled READ isAudioEffectsEnabled WRITE setIsAudioEffectsEnabled NOTIFY audioEffectsEnabledChanged) /** Whether background music should be enabled. */ Q_PROPERTY(bool isBackgroundMusicEnabled READ isBackgroundMusicEnabled WRITE setIsBackgroundMusicEnabled NOTIFY backgroundMusicEnabledChanged) /** * Whether GCompris should run in fullscreen mode. */ Q_PROPERTY(bool isFullscreen READ isFullscreen WRITE setFullscreen NOTIFY fullscreenChanged) /** * Window Height on Application's Startup */ Q_PROPERTY(quint32 previousHeight READ previousHeight WRITE setPreviousHeight NOTIFY previousHeightChanged) /** * Window Width on Application's Startup */ Q_PROPERTY(quint32 previousWidth READ previousWidth WRITE setPreviousWidth NOTIFY previousWidthChanged) /** * Whether on-screen keyboard should be enabled per default in activities * that use it. */ Q_PROPERTY(bool isVirtualKeyboard READ isVirtualKeyboard WRITE setVirtualKeyboard NOTIFY virtualKeyboardChanged) /** * Locale string for currently active language. */ Q_PROPERTY(QString locale READ locale WRITE setLocale NOTIFY localeChanged) /** * Currently selected font. */ Q_PROPERTY(QString font READ font WRITE setFont NOTIFY fontChanged) /** * Whether currently active font is a shipped font (or a system font). * * Updated automatically. * @sa font */ Q_PROPERTY(bool isEmbeddedFont READ isEmbeddedFont WRITE setIsEmbeddedFont NOTIFY embeddedFontChanged) /** * Font Capitalization * * Force all texts to be rendered in UpperCase, LowerCase or MixedCase (default) * @sa font */ Q_PROPERTY(quint32 fontCapitalization READ fontCapitalization WRITE setFontCapitalization NOTIFY fontCapitalizationChanged) /** * Font letter spacing * * Change the letter spacing of all the texts * @sa font */ Q_PROPERTY(qreal fontLetterSpacing READ fontLetterSpacing WRITE setFontLetterSpacing NOTIFY fontLetterSpacingChanged) /** * Minimum allowed value for font spacing letter. * * Constant value: +0.0 */ Q_PROPERTY(qreal fontLetterSpacingMin READ fontLetterSpacingMin CONSTANT) /** * Maximum allowed value for font spacing letter. * * Constant value: +8.0 */ Q_PROPERTY(qreal fontLetterSpacingMax READ fontLetterSpacingMax CONSTANT) /** * Whether downloads/updates of resource files should be done automatically, * without user-interaction. * * Note, that on Android GCompris currently can't distinguish Wifi * from mobile data connections (cf. Qt ticket #30394). */ Q_PROPERTY(bool isAutomaticDownloadsEnabled READ isAutomaticDownloadsEnabled WRITE setIsAutomaticDownloadsEnabled NOTIFY automaticDownloadsEnabledChanged) /** * Minimum value for difficulty level filter. */ Q_PROPERTY(quint32 filterLevelMin READ filterLevelMin WRITE setFilterLevelMin NOTIFY filterLevelMinChanged) /** * Maximum value for difficulty level filter. */ Q_PROPERTY(quint32 filterLevelMax READ filterLevelMax WRITE setFilterLevelMax NOTIFY filterLevelMaxChanged) - /** - * Whether in demo mode. - */ - Q_PROPERTY(bool isDemoMode READ isDemoMode WRITE setDemoMode NOTIFY demoModeChanged) - - /** - * Activation code key. - */ - Q_PROPERTY(QString codeKey READ codeKey WRITE setCodeKey NOTIFY codeKeyChanged) - - /** - * Activation mode. - */ - Q_PROPERTY(quint32 activationMode READ activationMode CONSTANT) - /** * Whether kiosk mode is currently active. */ Q_PROPERTY(bool isKioskMode READ isKioskMode WRITE setKioskMode NOTIFY kioskModeChanged) /** * Whether the section selection row is visible in the menu view. */ Q_PROPERTY(bool sectionVisible READ sectionVisible WRITE setSectionVisible NOTIFY sectionVisibleChanged) /** * The name of the default wordset to use. If empty then the internal sample wordset is used. */ Q_PROPERTY(QString wordset READ wordset WRITE setWordset NOTIFY wordsetChanged) /** * Current base font-size used for font scaling. * * This setting is the basis for application-wide font-scaling. A value * of 0 means to use the font-size as set by the application. Other values * between @ref baseFontSizeMin and @ref baseFontSizeMax enforce * font-scaling. * * @sa GCText.fontSize baseFontSizeMin baseFontSizeMax */ Q_PROPERTY(int baseFontSize READ baseFontSize WRITE setBaseFontSize NOTIFY baseFontSizeChanged) /** * Stores the background music volume set by the user. */ Q_PROPERTY(qreal backgroundMusicVolume READ backgroundMusicVolume WRITE setBackgroundMusicVolume NOTIFY backgroundMusicVolumeChanged) /** * Stores the audio effects volume set by the user. */ Q_PROPERTY(qreal audioEffectsVolume READ audioEffectsVolume WRITE setAudioEffectsVolume NOTIFY audioEffectsVolumeChanged) /** * Minimum allowed value for font-scaling. * * Constant value: -7 */ Q_PROPERTY(int baseFontSizeMin READ baseFontSizeMin CONSTANT) /** * Maximum allowed value for font-scaling. * * Constant value: +7 */ Q_PROPERTY(int baseFontSizeMax READ baseFontSizeMax CONSTANT) // admin group /** * Base-URL for resource downloads. * * @sa DownloadManager */ Q_PROPERTY(QString downloadServerUrl READ downloadServerUrl WRITE setDownloadServerUrl NOTIFY downloadServerUrlChanged) /** * Path where resources are downloaded and stored. * * @sa DownloadManager */ Q_PROPERTY(QString cachePath READ cachePath WRITE setCachePath NOTIFY cachePathChanged) /** * Return the platform specific path for storing data shared between apps * * On Android: /storage/emulated/0/GCompris (>= Android 4.2), * /storage/sdcard0/GCompris (< Android 4.2) * On Linux: $HOME/local/share/GCompris */ Q_PROPERTY(QString userDataPath READ userDataPath WRITE setUserDataPath NOTIFY userDataPathChanged) /** * Define the renderer used. * Either openGL or software renderer (only for Qt >= 5.8) */ Q_PROPERTY(QString renderer READ renderer WRITE setRenderer NOTIFY rendererChanged) /** * Stores the filtered background music playlist by the user. */ Q_PROPERTY(QStringList filteredBackgroundMusic READ filteredBackgroundMusic WRITE setFilteredBackgroundMusic NOTIFY filteredBackgroundMusicChanged) // internal group Q_PROPERTY(quint32 exeCount READ exeCount WRITE setExeCount NOTIFY exeCountChanged) // keep last version ran. If different than ApplicationInfo.GCVersionCode(), it means a new version is running Q_PROPERTY(int lastGCVersionRan READ lastGCVersionRan WRITE setLastGCVersionRan NOTIFY lastGCVersionRanChanged) // no group Q_PROPERTY(bool isBarHidden READ isBarHidden WRITE setBarHidden NOTIFY barHiddenChanged) public: /// @cond INTERNAL_DOCS explicit ApplicationSettings(const QString &configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/gcompris/" + GCOMPRIS_APPLICATION_NAME + ".conf", QObject *parent = 0); virtual ~ApplicationSettings(); // It is not recommended to create a singleton of Qml Singleton registered // object but we could not found a better way to let us access ApplicationInfo // on the C++ side. All our test shows that it works. static ApplicationSettings *getInstance() { if(!m_instance) { m_instance = new ApplicationSettings(); } return m_instance; } static QObject *applicationSettingsProvider(QQmlEngine *engine, QJSEngine *scriptEngine); - bool showLockedActivities() const { return m_showLockedActivities; } - void setShowLockedActivities(const bool newMode) { - m_showLockedActivities = newMode; - emit showLockedActivitiesChanged(); - } - bool isAudioVoicesEnabled() const { return m_isAudioVoicesEnabled; } void setIsAudioVoicesEnabled(const bool newMode) { m_isAudioVoicesEnabled = newMode; emit audioVoicesEnabledChanged(); } bool isAudioEffectsEnabled() const { return m_isAudioEffectsEnabled; } void setIsAudioEffectsEnabled(const bool newMode) { m_isAudioEffectsEnabled = newMode; emit audioEffectsEnabledChanged(); } bool isBackgroundMusicEnabled() const { return m_isBackgroundMusicEnabled; } void setIsBackgroundMusicEnabled(const bool newMode) { m_isBackgroundMusicEnabled = newMode; emit backgroundMusicEnabledChanged(); } bool isFullscreen() const { return m_isFullscreen; } void setFullscreen(const bool newMode) { if(m_isFullscreen != newMode) { m_isFullscreen = newMode; emit fullscreenChanged(); } } quint32 previousHeight() const { return m_previousHeight; } void setPreviousHeight(quint32 height) { if(m_previousHeight != height) { m_previousHeight = height; emit previousHeightChanged(); } } quint32 previousWidth() const { return m_previousWidth; } void setPreviousWidth(quint32 width) { if(m_previousWidth != width) { m_previousWidth = width; emit previousWidthChanged(); } } bool isVirtualKeyboard() const { return m_isVirtualKeyboard; } void setVirtualKeyboard(const bool newMode) { m_isVirtualKeyboard = newMode; emit virtualKeyboardChanged(); } QString locale() const { return m_locale; } void setLocale(const QString &newLocale) { m_locale = newLocale; emit localeChanged(); } QString font() const { return m_font; } void setFont(const QString &newFont) { m_font = newFont; emit fontChanged(); } bool isEmbeddedFont() const { return m_isEmbeddedFont; } void setIsEmbeddedFont(const bool newIsEmbeddedFont) { m_isEmbeddedFont = newIsEmbeddedFont; emit embeddedFontChanged(); } quint32 fontCapitalization() const { return m_fontCapitalization; } void setFontCapitalization(quint32 newFontCapitalization) { m_fontCapitalization = newFontCapitalization; emit fontCapitalizationChanged(); } qreal fontLetterSpacing() const { return m_fontLetterSpacing; } void setFontLetterSpacing(qreal newFontLetterSpacing) { m_fontLetterSpacing = newFontLetterSpacing; emit fontLetterSpacingChanged(); } qreal fontLetterSpacingMin() const { return m_fontLetterSpacingMin; } qreal fontLetterSpacingMax() const { return m_fontLetterSpacingMax; } bool isAutomaticDownloadsEnabled() const; void setIsAutomaticDownloadsEnabled(const bool newIsAutomaticDownloadsEnabled); quint32 filterLevelMin() const { return m_filterLevelMin; } void setFilterLevelMin(const quint32 newFilterLevelMin) { m_filterLevelMin = newFilterLevelMin; emit filterLevelMinChanged(); } quint32 filterLevelMax() const { return m_filterLevelMax; } void setFilterLevelMax(const quint32 newFilterLevelMax) { m_filterLevelMax = newFilterLevelMax; emit filterLevelMaxChanged(); } - bool isDemoMode() const { return m_isDemoMode; } - void setDemoMode(const bool newMode); - - QString codeKey() const { return m_codeKey; } - void setCodeKey(const QString &newCodeKey) { - m_codeKey = newCodeKey; - emit codeKeyChanged(); - } - - /** - * @brief activationMode - * @return 0: no, 1: inapp, 2: internal - */ - quint32 activationMode() const { return m_activationMode; } - bool isKioskMode() const { return m_isKioskMode; } void setKioskMode(const bool newMode) { m_isKioskMode = newMode; emit kioskModeChanged(); } - /** - * Check validity of the activation code - * @param code An activation code to check - * @returns 0 if the code is not valid or we don't know yet - * 1 if the code is valid but out of date - * 2 if the code is valid and under 2 years - */ - Q_INVOKABLE uint checkActivationCode(const QString &code); - - /** - * Check Payment API - * Call a payment system to sync our demoMode state with it - */ - void checkPayment(); - // Called by the payment system - void bought(const bool isBought) { - if(m_isDemoMode != !isBought) { - m_isDemoMode = !isBought; - emit demoModeChanged(); - } - } - bool sectionVisible() const { return m_sectionVisible; } void setSectionVisible(const bool newMode) { qDebug() << "c++ setSectionVisible=" << newMode; m_sectionVisible = newMode; emit sectionVisibleChanged(); } QString wordset() const { return m_wordset; } void setWordset(const QString &newWordset) { m_wordset = newWordset; emit wordsetChanged(); } QString downloadServerUrl() const { return m_downloadServerUrl; } void setDownloadServerUrl(const QString &newDownloadServerUrl) { m_downloadServerUrl = newDownloadServerUrl; emit downloadServerUrlChanged(); } QString cachePath() const { return m_cachePath; } void setCachePath(const QString &newCachePath) { m_cachePath = newCachePath; emit cachePathChanged(); } QString userDataPath() const { return m_userDataPath; } void setUserDataPath(const QString &newUserDataPath) { m_userDataPath = newUserDataPath; emit userDataPathChanged(); } quint32 exeCount() const { return m_exeCount; } void setExeCount(const quint32 newExeCount) { m_exeCount = newExeCount; emit exeCountChanged(); } bool isBarHidden() const { return m_isBarHidden; } void setBarHidden(const bool newBarHidden) { m_isBarHidden = newBarHidden; emit barHiddenChanged(); } int baseFontSize() const { return m_baseFontSize; } void setBaseFontSize(const int newBaseFontSize) { m_baseFontSize = qMax(qMin(newBaseFontSize, baseFontSizeMax()), baseFontSizeMin()); emit baseFontSizeChanged(); } int baseFontSizeMin() const { return m_baseFontSizeMin; } int baseFontSizeMax() const { return m_baseFontSizeMax; } qreal backgroundMusicVolume() const { return m_backgroundMusicVolume; } void setBackgroundMusicVolume(const qreal newBackgroundMusicVolume) { m_backgroundMusicVolume = newBackgroundMusicVolume; emit backgroundMusicVolumeChanged(); } qreal audioEffectsVolume() const { return m_audioEffectsVolume; } void setAudioEffectsVolume(const qreal newAudioEffectsVolume) { m_audioEffectsVolume = newAudioEffectsVolume; emit audioEffectsVolumeChanged(); } int lastGCVersionRan() const { return m_lastGCVersionRan; } void setLastGCVersionRan(const int newLastGCVersionRan) { m_lastGCVersionRan = newLastGCVersionRan; emit lastGCVersionRanChanged(); } QString renderer() const { return m_renderer; } void setRenderer(const QString &newRenderer) { m_renderer = newRenderer; emit rendererChanged(); } QStringList filteredBackgroundMusic() const { return m_filteredBackgroundMusic; } void setFilteredBackgroundMusic(const QStringList &newFilteredBackgroundMusic) { m_filteredBackgroundMusic = newFilteredBackgroundMusic; emit filteredBackgroundMusicChanged(); } /** * Check if we use the external wordset for activity based on lang_api * @returns true if wordset is loaded * false if wordset is not loaded */ Q_INVOKABLE bool useExternalWordset(); protected slots: - Q_INVOKABLE void notifyShowLockedActivitiesChanged(); Q_INVOKABLE void notifyAudioVoicesEnabledChanged(); Q_INVOKABLE void notifyAudioEffectsEnabledChanged(); Q_INVOKABLE void notifyBackgroundMusicEnabledChanged(); Q_INVOKABLE void notifyFullscreenChanged(); Q_INVOKABLE void notifyPreviousHeightChanged(); Q_INVOKABLE void notifyPreviousWidthChanged(); Q_INVOKABLE void notifyVirtualKeyboardChanged(); Q_INVOKABLE void notifyLocaleChanged(); Q_INVOKABLE void notifyFontChanged(); Q_INVOKABLE void notifyFontCapitalizationChanged(); Q_INVOKABLE void notifyFontLetterSpacingChanged(); Q_INVOKABLE void notifyEmbeddedFontChanged(); Q_INVOKABLE void notifyAutomaticDownloadsEnabledChanged(); Q_INVOKABLE void notifyFilterLevelMinChanged(); Q_INVOKABLE void notifyFilterLevelMaxChanged(); - Q_INVOKABLE void notifyDemoModeChanged(); - Q_INVOKABLE void notifyCodeKeyChanged(); Q_INVOKABLE void notifyKioskModeChanged(); Q_INVOKABLE void notifySectionVisibleChanged(); Q_INVOKABLE void notifyWordsetChanged(); Q_INVOKABLE void notifyFilteredBackgroundMusicChanged(); Q_INVOKABLE void notifyBackgroundMusicVolumeChanged(); Q_INVOKABLE void notifyAudioEffectsVolumeChanged(); Q_INVOKABLE void notifyDownloadServerUrlChanged(); Q_INVOKABLE void notifyCachePathChanged(); Q_INVOKABLE void notifyUserDataPathChanged(); Q_INVOKABLE void notifyExeCountChanged(); Q_INVOKABLE void notifyLastGCVersionRanChanged(); Q_INVOKABLE void notifyRendererChanged(); Q_INVOKABLE void notifyBarHiddenChanged(); public slots: Q_INVOKABLE bool isFavorite(const QString &activity); Q_INVOKABLE void setFavorite(const QString &activity, bool favorite); Q_INVOKABLE void setCurrentLevels(const QString &activity, const QStringList &level, bool sync = true); Q_INVOKABLE QStringList currentLevels(const QString &activity); Q_INVOKABLE void saveBaseFontSize(); /// @endcond /** * Stores per-activity configuration @p data for @p activity. * * @param activity Name of the activity that wants to persist settings. * @param data Map of configuration data so save. */ Q_INVOKABLE void saveActivityConfiguration(const QString &activity, const QVariantMap &data); /** * Loads per-activity configuration data for @p activity. * * @param activity Name of the activity that wants to persist settings. * @returns Map of configuration items. */ Q_INVOKABLE QVariantMap loadActivityConfiguration(const QString &activity); /** * Loads per-activity progress using the default "progress" key. * * @param activity Name of the activity to load progress for. * @returns Last started level of the activity, 0 if none saved. */ Q_INVOKABLE int loadActivityProgress(const QString &activity); /** * Saves per-activity progress using the default "progress" key. * * @param activity Name of the activity that wants to persist settings. * @param progress Last started level to save as progress value. */ Q_INVOKABLE void saveActivityProgress(const QString &activity, int progress); /** * Synchronize the changes done in the application in the configuration file. */ Q_INVOKABLE void sync(); signals: - void showLockedActivitiesChanged(); void audioVoicesEnabledChanged(); void audioEffectsEnabledChanged(); void backgroundMusicEnabledChanged(); void fullscreenChanged(); void previousHeightChanged(); void previousWidthChanged(); void virtualKeyboardChanged(); void localeChanged(); void fontChanged(); void fontCapitalizationChanged(); void fontLetterSpacingChanged(); void embeddedFontChanged(); void automaticDownloadsEnabledChanged(); void filterLevelMinChanged(); void filterLevelMaxChanged(); - void demoModeChanged(); - void codeKeyChanged(); void kioskModeChanged(); void sectionVisibleChanged(); void wordsetChanged(); void baseFontSizeChanged(); void filteredBackgroundMusicChanged(); void backgroundMusicVolumeChanged(); void audioEffectsVolumeChanged(); void downloadServerUrlChanged(); void cachePathChanged(); void userDataPathChanged(); void exeCountChanged(); void lastGCVersionRanChanged(); void rendererChanged(); void barHiddenChanged(); protected: static ApplicationSettings *m_instance; private: // Update in configuration the couple {key, value} in the group. template void updateValueInConfig(const QString& group, const QString& key, const T& value, bool sync = true); - bool m_showLockedActivities; bool m_isAudioVoicesEnabled; bool m_isAudioEffectsEnabled; bool m_isBackgroundMusicEnabled; bool m_isFullscreen; quint32 m_previousHeight; quint32 m_previousWidth; bool m_isVirtualKeyboard; bool m_isAutomaticDownloadsEnabled; bool m_isEmbeddedFont; quint32 m_fontCapitalization; qreal m_fontLetterSpacing; quint32 m_filterLevelMin; quint32 m_filterLevelMax; bool m_defaultCursor; bool m_noCursor; QString m_locale; QString m_font; - bool m_isDemoMode; - QString m_codeKey; - quint32 m_activationMode; bool m_isKioskMode; bool m_sectionVisible; QString m_wordset; QStringList m_filteredBackgroundMusic; qreal m_backgroundMusicVolume; qreal m_audioEffectsVolume; int m_baseFontSize; const int m_baseFontSizeMin; const int m_baseFontSizeMax; const qreal m_fontLetterSpacingMin; const qreal m_fontLetterSpacingMax; QString m_downloadServerUrl; QString m_cachePath; QString m_userDataPath; quint32 m_exeCount; int m_lastGCVersionRan; QString m_renderer; bool m_isBarHidden; QSettings m_config; }; #endif // APPLICATIONSETTINGS_H diff --git a/src/core/ApplicationSettingsDefault.cpp b/src/core/ApplicationSettingsDefault.cpp deleted file mode 100644 index 5a9d53d9b..000000000 --- a/src/core/ApplicationSettingsDefault.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* GCompris - ApplicationSettingsDefault.cpp - * - * Copyright (C) 2014 Bruno Coudoin - * - * Authors: - * Bruno Coudoin - * - * 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 . - */ - -#include "ApplicationSettings.h" -#include "config.h" -#include -void ApplicationSettings::setDemoMode(const bool newMode) { - m_isDemoMode = newMode; - emit demoModeChanged(); -} - -void ApplicationSettings::checkPayment() { - if(m_activationMode == 2) - setDemoMode(checkActivationCode(m_codeKey) < 2); -} - -uint ApplicationSettings::checkActivationCode(const QString &code) { - if(code.length() != 12) { - return 0; - } - bool ok; - uint year = code.midRef(4, 3).toUInt(&ok, 16); - uint month = code.midRef(7, 1).toUInt(&ok, 16); - uint crc = code.midRef(8, 4).toUInt(&ok, 16); - - uint expectedCrc = - code.midRef(0, 4).toUInt(&ok, 16) ^ - code.midRef(4, 4).toUInt(&ok, 16) ^ - 0xCECA; - - ok = (expectedCrc == crc && year < 2100 && month <= 12); - if(!ok) - // Bad crc, year or month - return 0; - - // Check date is under 2 years - ok = int(year * 100 + month + 200) >= atoi(BUILD_DATE); - return(ok ? 2 : 1); -} - diff --git a/src/core/BuyMeOverlay.qml b/src/core/BuyMeOverlay.qml deleted file mode 100644 index f1daa02a0..000000000 --- a/src/core/BuyMeOverlay.qml +++ /dev/null @@ -1,121 +0,0 @@ -/* GCompris - BuyMeOverlay.qml - * - * Copyright (C) 2014 Bruno Coudoin - * - * Authors: - * Bruno Coudoin - * - * 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 QtQuick.Controls 1.5 -import GCompris 1.0 - -Item { - - anchors { - fill: parent - bottomMargin: bar.height * 1.2 - } - Rectangle { - anchors.fill: parent - opacity: 0.5 - color: "grey" - } - /* Activation Instruction */ - Rectangle { - id: instruction - z: 99 - anchors { - horizontalCenter: parent.horizontalCenter - horizontalCenterOffset: - cancelButton.width / 2 - top: parent.top - topMargin: 40 - } - width: parent.width - cancelButton.width * 2 - height: parent.height/2 - radius: 10 - border.width: 2 - border.color: "black" - color: 'white' - - Row { - id: row - anchors { - fill: parent - margins: 10 - } - - Image { - id: lock - source: "qrc:/gcompris/src/activities/menu/resource/lock.svg" - sourceSize.width: 30 * ApplicationInfo.ratio - } - - GCText { - id: instructionTxt - fontSizeMode: Text.Fit - color: "black" - style: Text.Outline - styleColor: "white" - horizontalAlignment: Text.AlignHCenter - width: parent.width - lock.width - height: instruction.height - row.anchors.margins/2 - wrapMode: TextEdit.WordWrap - z: 2 - text: qsTr("This activity is only available in the full version of GCompris." + "
" + - "On https://gcompris.net " + - "you will find the instructions to obtain an activation code." + " " + - "Then go to the main configuration dialog to enter the code.") - } - } - } - - MultiPointTouchArea { - // Just to catch mouse events - anchors.fill: parent - } - - Keys.onEscapePressed: home() - Keys.onPressed: { - event.accepted = true - if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_Q) { - // Ctrl+Q exit the application - Core.quit(page); - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_B) { - // Ctrl+B toggle the bar - ApplicationSettings.isBarHidden = !ApplicationSettings.isBarHidden; - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_F) { - // Ctrl+F toggle fullscreen - ApplicationSettings.isFullscreen = !ApplicationSettings.isFullscreen - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_M) { - // Ctrl+M toggle sound - ApplicationSettings.isAudioEffectsEnabled = !ApplicationSettings.isAudioEffectsEnabled - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_W) { - // Ctrl+W exit the current activity - home() - } - } - - // The cancel button - GCButtonCancel { - id: cancelButton - onClose: home() - } -} diff --git a/src/core/BuyMeOverlayInapp.qml b/src/core/BuyMeOverlayInapp.qml deleted file mode 100644 index 5e57f44b2..000000000 --- a/src/core/BuyMeOverlayInapp.qml +++ /dev/null @@ -1,136 +0,0 @@ -/* GCompris - BuyMeOverlayInapp.qml - * - * Copyright (C) 2014 Bruno Coudoin - * - * Authors: - * Bruno Coudoin - * - * 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 QtQuick.Controls 1.5 -import GCompris 1.0 - -Item { - - anchors { - fill: parent - bottomMargin: bar.height * 1.2 - } - Rectangle { - anchors.fill: parent - opacity: 0.5 - color: "grey" - } - /* Activation Instruction */ - Rectangle { - id: instructionsArea - z: 99 - anchors { - horizontalCenter: parent.horizontalCenter - horizontalCenterOffset: - cancelButton.width / 2 - top: parent.top - topMargin: 40 - } - width: parent.width - cancelButton.width * 2 - height: Math.max(instructionTxt.height, lock.height) + 2*row.anchors.margins - radius: 10 - border.width: 2 - border.color: "black" - color: 'white' - - Row { - id: row - anchors { - fill: parent - margins: 10 - } - - Image { - id: lock - source: "qrc:/gcompris/src/activities/menu/resource/lock.svg" - sourceSize.width: 30 * ApplicationInfo.ratio - } - - GCText { - id: instructionTxt - fontSize: mediumSize - color: "black" - style: Text.Outline - styleColor: "white" - horizontalAlignment: Text.AlignHCenter - width: parent.width - lock.width - wrapMode: TextEdit.WordWrap - z: 2 - text: qsTr("This activity is only available in the full version of GCompris.") - } - } - - Button { - width: instructionsArea.width * 0.9 - height: 60 * ApplicationInfo.ratio - anchors { - horizontalCenter: parent.horizontalCenter - top: instructionsArea.bottom - topMargin: 10 - } - text: qsTr("Buy the full version").toUpperCase() - style: GCButtonStyle { - theme: "highContrast" - } - - onClicked: { - if(ApplicationSettings.isDemoMode) - ApplicationSettings.isDemoMode = false - } - } - } - - MultiPointTouchArea { - // Just to catch mouse events - anchors.fill: parent - } - - Keys.onEscapePressed: home() - Keys.onPressed: { - event.accepted = true - if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_Q) { - // Ctrl+Q exit the application - Core.quit(page); - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_B) { - // Ctrl+B toggle the bar - ApplicationSettings.isBarHidden = !ApplicationSettings.isBarHidden; - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_F) { - // Ctrl+F toggle fullscreen - ApplicationSettings.isFullscreen = !ApplicationSettings.isFullscreen - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_M) { - // Ctrl+M toggle sound - ApplicationSettings.isAudioEffectsEnabled = !ApplicationSettings.isAudioEffectsEnabled - } else if (event.modifiers === Qt.ControlModifier && - event.key === Qt.Key_W) { - // Ctrl+W exit the current activity - home() - } - } - - // The cancel button - GCButtonCancel { - id: cancelButton - onClose: home() - } -} diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index aaa001807..270d4caf6 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,362 +1,362 @@ include(qt_helper) configure_file(config.h.in "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) if(WITH_KIOSK_MODE) add_definitions(-DWITH_KIOSK_MODE) endif() if(SAILFISHOS) add_definitions(-DSAILFISHOS) endif() if(ANDROID) # needed since ECM 5.45 (https://bugs.kde.org/show_bug.cgi?id=394042) include_directories(SYSTEM "${CMAKE_SYSROOT}/usr/include" ) endif() set(gcompris_SRCS ActivityInfo.cpp ActivityInfo.h ActivityInfoTree.cpp ActivityInfoTree.h ApplicationInfo.cpp ApplicationInfo.h ApplicationSettings.cpp ApplicationSettings.h File.cpp File.h Dataset.cpp Dataset.h Directory.cpp Directory.h DownloadManager.cpp DownloadManager.h GComprisPlugin.cpp GComprisPlugin.h main.cpp config.h.in synth/ADSRenvelope.cpp synth/ADSRenvelope.h synth/GSynth.cpp synth/GSynth.h synth/linearSynthesis.cpp synth/linearSynthesis.h synth/modulation.cpp synth/modulation.h synth/generator.cpp synth/generator.h synth/preset.h synth/preset.cpp synth/waveform.cpp synth/waveform.h ) if(ANDROID) list(APPEND gcompris_SRCS ApplicationAndroid.cpp) else() - list(APPEND gcompris_SRCS ApplicationSettingsDefault.cpp ApplicationInfoDefault.cpp) + list(APPEND gcompris_SRCS ApplicationInfoDefault.cpp) endif() # Resources set(GCOMPRIS_RESOURCES "${PROJECT_SOURCE_DIR}/installer") if(CMAKE_HOST_WIN32) set(gcompris_icon GCompris.ico) set(gcompris_RES ${GCOMPRIS_RESOURCES}/${gcompris_icon} GCompris.rc ) elseif(CMAKE_HOST_APPLE) set(gcompris_icon GCompris.icns) set(gcompris_RES ${GCOMPRIS_RESOURCES}/${gcompris_icon}) set_source_files_properties(${gcompris_RES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") endif() set(used_qt_modules Qt5::Qml Qt5::Quick Qt5::Gui Qt5::Multimedia Qt5::Core Qt5::Svg Qt5::Xml Qt5::XmlPatterns Qt5::Sensors) if(ANDROID) add_library(${GCOMPRIS_EXECUTABLE_NAME} SHARED ${gcompris_SRCS}) set(used_qt_modules ${used_qt_modules} Qt5::AndroidExtras) elseif(CMAKE_HOST_APPLE) add_executable(${GCOMPRIS_EXECUTABLE_NAME} MACOSX_BUNDLE ${gcompris_SRCS} ${gcompris_RES}) elseif(CMAKE_HOST_WIN32) add_executable(${GCOMPRIS_EXECUTABLE_NAME} WIN32 ${gcompris_SRCS} ${gcompris_RES}) elseif(SAILFISHOS) add_executable(${GCOMPRIS_EXECUTABLE_NAME} ${gcompris_SRCS} ${gcompris_RES}) set(used_qt_modules ${used_qt_modules} Qt5::Widgets) else() add_executable(${GCOMPRIS_EXECUTABLE_NAME} ${gcompris_SRCS} ${gcompris_RES}) endif() # only build the lib for testing purpose if(BUILD_TESTING) add_library(gcompris_core SHARED ${gcompris_SRCS}) target_link_libraries(gcompris_core ${used_qt_modules}) endif() target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} ${used_qt_modules}) GCOMPRIS_ADD_RCC(core *.qml *.js resource/*.${COMPRESSED_AUDIO} resource/*.gif resource/*.png resource/*.svg resource/bonus/* resource/sounds/* resource/fonts/*.* resource/fonts/*/*.* qmldir COPYING) # Installation # ============ install(TARGETS ${GCOMPRIS_EXECUTABLE_NAME} ARCHIVE DESTINATION bin RUNTIME DESTINATION bin LIBRARY DESTINATION lib BUNDLE DESTINATION .) if(BUILD_STANDALONE) # Qt plugins to install set(_qt_plugins "") if(NOT SAILFISHOS) list(APPEND _qt_plugins Qt5::QJpegPlugin) endif() if(APPLE) list(APPEND _qt_plugins Qt5::QTgaPlugin Qt5::QTiffPlugin Qt5::QCocoaIntegrationPlugin) elseif(WIN32) list(APPEND _qt_plugins Qt5::QWindowsIntegrationPlugin Qt5::QWindowsAudioPlugin Qt5::AudioCaptureServicePlugin Qt5::DSServicePlugin) elseif(UNIX AND NOT ANDROID AND NOT SAILFISHOS) list(APPEND _qt_plugins Qt5::QXcbIntegrationPlugin Qt5::QXcbEglIntegrationPlugin Qt5::QXcbGlxIntegrationPlugin Qt5::QAlsaPlugin Qt5::QPulseAudioPlugin) endif() list(APPEND _qt_plugins Qt5::genericSensorPlugin Qt5::QtSensorGesturePlugin Qt5::QShakeSensorGesturePlugin) # Qml plugins to install if(WIN32) set(_lib_prefix "") else() set(_lib_prefix "lib") endif() set(_qt_plugins2 imageformats/${_lib_prefix}qsvg) if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT SAILFISHOS) list(APPEND _qt_plugins2 mediaservice/${_lib_prefix}gstaudiodecoder mediaservice/${_lib_prefix}gstcamerabin mediaservice/${_lib_prefix}gstmediacapture mediaservice/${_lib_prefix}gstmediaplayer) elseif(APPLE) list(APPEND _qt_plugins2 audio/${_lib_prefix}qtaudio_coreaudio mediaservice/${_lib_prefix}qavfmediaplayer mediaservice/${_lib_prefix}qtmedia_audioengine mediaservice/${_lib_prefix}qavfcamera) endif() set(_qml_plugins QtGraphicalEffects/${_lib_prefix}qtgraphicaleffectsplugin QtGraphicalEffects/private/${_lib_prefix}qtgraphicaleffectsprivate QtQuick/Window.2/${_lib_prefix}windowplugin QtQuick/Particles.2/${_lib_prefix}particlesplugin QtQuick.2/${_lib_prefix}qtquick2plugin QtMultimedia/${_lib_prefix}declarative_multimedia QtSensors/${_lib_prefix}declarative_sensors) if(NOT SAILFISHOS) list(APPEND _qml_plugins QtQuick/Controls/${_lib_prefix}qtquickcontrolsplugin QtQuick/Layouts/${_lib_prefix}qquicklayoutsplugin) endif() set(GCOMPRIS_OTHER_LIBS) if(APPLE) set(_app gcompris-qt.app) set(_qtconf_destdir ${_app}/Contents/Resources) set(_qt_plugins_destdir ${_app}/Contents/plugins) set(_qt_qml_destdir ${_app}/Contents/qml) set(GCOMPRIS_BUNDLE "\${CMAKE_INSTALL_PREFIX}/${_app}") set_target_properties(gcompris-qt PROPERTIES MACOSX_BUNDLE_INFO_STRING "GCompris, Educational game for children 2 to 10" MACOSX_BUNDLE_ICON_FILE "${gcompris_icon}" MACOSX_BUNDLE_GUI_IDENTIFIER "net.gcompris" MACOSX_BUNDLE_LONG_VERSION_STRING "${GCOMPRIS_MAJOR_VERSION}.${GCOMPRIS_MINOR_VERSION}.${GCOMPRIS_PATCH_VERSION}" MACOSX_BUNDLE_BUNDLE_NAME "gcompris-qt" MACOSX_BUNDLE_SHORT_VERSION_STRING "${GCOMPRIS_VERSION}" MACOSX_BUNDLE_BUNDLE_VERSION "${GCOMPRIS_VERSION}" MACOSX_BUNDLE_COPYRIGHT "GPL License, Copyright 2000-2019 Timothee Giet and Others.") set_source_files_properties(${GCOMPRIS_RESOURCES}/${gcompris_icon} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") else() set(_qtconf_destdir bin) set(_qt_plugins_destdir bin/plugins) set(_qt_qml_destdir bin/qml) if(CMAKE_HOST_WIN32) set(GCOMPRIS_BUNDLE "\${CMAKE_INSTALL_PREFIX}/bin/${GCOMPRIS_EXECUTABLE_NAME}.exe") else() set(GCOMPRIS_BUNDLE "\${CMAKE_INSTALL_PREFIX}/bin/${GCOMPRIS_EXECUTABLE_NAME}") endif() endif() # install qt.conf file install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qt.conf DESTINATION ${_qtconf_destdir}) # install qt plugins foreach(_plugin ${_qt_plugins}) installQtPlugin(${_plugin} ${_qt_plugins_destdir} _lib) list(APPEND GCOMPRIS_OTHER_LIBS ${_lib}) endforeach() foreach(_plugin ${_qt_plugins2}) if(APPLE) installQtPlugin2(${_plugin} ${_qt_plugins_destdir}/../Plugins _lib) else() installQtPlugin2(${_plugin} ${_qt_plugins_destdir} _lib) endif() list(APPEND GCOMPRIS_OTHER_LIBS ${_lib}) endforeach() # install qml plugins foreach(_plugin ${_qml_plugins}) installQmlPlugin(${_plugin} ${_qt_qml_destdir} _lib) list(APPEND GCOMPRIS_OTHER_LIBS ${_lib}) endforeach() ## install QtGraphicalEffects (which is not a lib but only qml files) # BUT, actually there are some libs in it, and this does not work on APPLE. Moved to _qml_plugins instead # #set(_qml_subdir QtGraphicalEffects) #getQtQmlPath(_qt_qml_path) #install(DIRECTORY ${_qt_qml_path}/QtGraphicalEffects DESTINATION ${_qt_qml_destdir}) # Fix for Linux 'make package' that fails to link with libicu; also package OpenSSL libs from system if(UNIX AND NOT APPLE AND NOT SAILFISHOS AND NOT ANDROID) add_library( libicudata SHARED IMPORTED ) file(GLOB LIBICUDATA_SO "${Qt5_DIR}/../../libicudata.so.[0-9][0-9]") if("${LIBICUDATA_SO}" STREQUAL "") file(GLOB LIBICUDATA_SO "/usr/lib/*/libicudata.so.[0-9][0-9]") endif() set_target_properties( libicudata PROPERTIES IMPORTED_LOCATION ${LIBICUDATA_SO} ) add_library( libicui18n SHARED IMPORTED ) file(GLOB LIBICUI18N_SO "${Qt5_DIR}/../../libicui18n.so.[0-9][0-9]") if("${LIBICUI18N_SO}" STREQUAL "") file(GLOB LIBICUI18N_SO "/usr/lib/*/libicui18n.so.[0-9][0-9]") endif() set_target_properties( libicui18n PROPERTIES IMPORTED_LOCATION ${LIBICUI18N_SO} ) add_library( libicuuc SHARED IMPORTED ) file(GLOB LIBICUUC_SO "${Qt5_DIR}/../../libicuuc.so.[0-9][0-9]") if("${LIBICUUC_SO}" STREQUAL "") file(GLOB LIBICUUC_SO "/usr/lib/*/libicuuc.so.[0-9][0-9]") endif() set_target_properties( libicuuc PROPERTIES IMPORTED_LOCATION ${LIBICUUC_SO} ) target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} libicudata libicui18n libicuuc) # package installed OpenSSL libraries install(FILES "${OPENSSL_SSL_LIBRARY}" DESTINATION bin) install(FILES "${OPENSSL_CRYPTO_LIBRARY}" DESTINATION bin) install(FILES "${OPENSSL_SSL_LIBRARY}.10" DESTINATION bin) install(FILES "${OPENSSL_CRYPTO_LIBRARY}.10" DESTINATION bin) install(FILES "${OPENSSL_SSL_LIBRARY}.1.0.2k" DESTINATION bin) install(FILES "${OPENSSL_CRYPTO_LIBRARY}.1.0.2k" DESTINATION bin) target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} OpenSSL::SSL OpenSSL::Crypto) endif() #Add OpenSSL support on Windows builds if(WIN32) if(MINGW) if(CMAKE_SIZEOF_VOID_P EQUAL 8) #64bit set(OPENSSL_DLL_SUFFIX "-x64") endif() install(FILES "${Qt5_DIR}/../../../bin/libcrypto-1_1${OPENSSL_DLL_SUFFIX}.dll" DESTINATION bin) install(FILES "${Qt5_DIR}/../../../bin/libssl-1_1${OPENSSL_DLL_SUFFIX}.dll" DESTINATION bin) else() # appveyor install(FILES "${OPENSSL_INCLUDE_DIR}/../libeay32.dll" DESTINATION bin) install(FILES "${OPENSSL_INCLUDE_DIR}/../libssl32.dll" DESTINATION bin) install(FILES "${OPENSSL_INCLUDE_DIR}/../ssleay32.dll" DESTINATION bin) endif() target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} OpenSSL::SSL OpenSSL::Crypto) endif() endif() # Hack: do not fixup Qt and Qml plugins on Windows because fixup_bundle takes ages (cmake bug ?) -> Johnny : we need this even if it takes time because some required dependencies are pulled here #if(WIN32) set(GCOMPRIS_OTHER_LIBS "") endif() # install fixup_bundle script to resolve and fixup runtime dependencies if(BUILD_STANDALONE AND NOT ANDROID) configure_file(${CMAKE_SOURCE_DIR}/cmake/FixBundle.cmake.in FixBundle.cmake) install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) # install a startup script for linux bundle if(UNIX AND NOT APPLE AND NOT SAILFISHOS) install(PROGRAMS ../../tools/gcompris-qt.sh DESTINATION bin) endif() endif() if(WIN32 AND NOT MINGW) # install libEGL.dll, libGLESv2.dll, d3dcompiler_47.dll from Qt installation. Not sure if there is a clean way to get them... # Qt5_Dir is like C:/Qt/Qt5.5.1/5.5/mingw492_32/lib/cmake/Qt5 install(FILES ${Qt5_DIR}/../../../bin/libEGL.dll DESTINATION bin) install(FILES ${Qt5_DIR}/../../../bin/libGLESv2.dll DESTINATION bin) install(FILES ${Qt5_DIR}/../../../bin/d3dcompiler_47.dll DESTINATION bin) target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} ${Qt5_DIR}/../../libEGL.lib) target_link_libraries(${GCOMPRIS_EXECUTABLE_NAME} ${Qt5_DIR}/../../libGLESv2.lib) install(FILES ${Qt5_DIR}/../../../bin/opengl32sw.dll DESTINATION bin) # CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS contains visual c++ libraries install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION bin) endif() # Packaging # ========= set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GCompris is a high quality educational software suite, including a large number of activities for children aged 2 to 10.") set(CPACK_PACKAGE_VERSION_MAJOR ${GCOMPRIS_MAJOR_VERSION}) set(CPACK_PACKAGE_VERSION_MINOR ${GCOMPRIS_MINOR_VERSION}) set(CPACK_PACKAGE_VERSION_PATCH ${GCOMPRIS_PATCH_VERSION}) set(CPACK_PACKAGE_VERSION ${GCOMPRIS_VERSION}) set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING") set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README") if(WIN32) set(CPACK_PACKAGE_INSTALL_DIRECTORY "${GCOMPRIS_EXECUTABLE_NAME}-Qt") set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${GCOMPRIS_EXECUTABLE_NAME}-Qt") set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/installer\\\\gcompris-header.bmp") set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/installer\\\\GCompris-install.ico") set(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/installer\\\\GCompris-uninstall.ico") set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "${PROJECT_SOURCE_DIR}/installer\\\\welcome-page.bmp") set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "${PROJECT_SOURCE_DIR}/installer\\\\welcome-page.bmp") set(CPACK_NSIS_EXECUTABLES_DIRECTORY "bin") set(CPACK_PACKAGE_EXECUTABLES "${GCOMPRIS_EXECUTABLE_NAME};GCompris") set(CPACK_CREATE_DESKTOP_LINKS "${GCOMPRIS_EXECUTABLE_NAME};GCompris") set(CPACK_NSIS_MODIFY_PATH "ON") set(CPACK_NSIS_URL_INFO_ABOUT "https:\\\\\\\\gcompris.net") set(CPACK_NSIS_DISPLAY_NAME "GCompris Educational Software") set(CPACK_NSIS_WELCOME_TITLE_3LINES "ON") set(CPACK_NSIS_MUI_FINISHPAGE_RUN "${GCOMPRIS_EXECUTABLE_NAME}") set(CPACK_PACKAGE_VENDOR "GCompris team") # Create shortcuts in menu to be able to launch in software or opengl mode list(APPEND CPACK_NSIS_CREATE_ICONS_EXTRA " CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\GCompris (Safe Mode).lnk' '$INSTDIR\\\\bin\\\\${GCOMPRIS_EXECUTABLE_NAME}.exe' '--software-renderer'") list(APPEND CPACK_NSIS_CREATE_ICONS_EXTRA " CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\GCompris.lnk' '$INSTDIR\\\\bin\\\\${GCOMPRIS_EXECUTABLE_NAME}.exe' '--opengl-renderer'") string(REPLACE ";" "\n" CPACK_NSIS_CREATE_ICONS_EXTRA "${CPACK_NSIS_CREATE_ICONS_EXTRA}") else() set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/GCompris64.png") endif() if(APPLE) set(CPACK_GENERATOR "DragNDrop") set(CPACK_DMG_DS_STORE "${GCOMPRIS_RESOURCES}/dmg_DS_Store") set(CPACK_DMG_BACKGROUND_IMAGE "${GCOMPRIS_RESOURCES}/dmg_background.png") elseif(WIN32) set(CPACK_GENERATOR "NSIS") elseif(SAILFISHOS) configure_file(${PROJECT_SOURCE_DIR}/platforms/sailfishOS/harbour-gcompris-qt.spec.cmake ${CMAKE_BINARY_DIR}/harbour-gcompris-qt.spec @ONLY) install(FILES ${PROJECT_SOURCE_DIR}/platforms/sailfishOS/harbour-gcompris-qt.desktop DESTINATION share/applications) install(FILES ${PROJECT_SOURCE_DIR}/platforms/sailfishOS/harbour-gcompris-qt.png DESTINATION share/icons/hicolor/86x86/apps) set(CPACK_RPM_PACKAGE_SUMMARY "gcompris-qt") # BUILD_ARCH is either armv7hl or i486 set(CPACK_RPM_PACKAGE_ARCHITECTURE "${BUILD_ARCH}") set(CPACK_RPM_PACKAGE_NAME "${GCOMPRIS_EXECUTABLE_NAME}") set(CPACK_RPM_PACKAGE_VERSION "${GCOMPRIS_VERSION}") set(CPACK_RPM_PACKAGE_LICENSED "GPLv3") set(CPACK_RPM_PACKAGE_URL "https://www.gcompris.org") set(CPACK_RPM_PACKAGE_DESCRIPTION "GCompris is a high quality educational software suite comprising of numerous activities for children aged 2 to 10.") set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_BINARY_DIR}/harbour-gcompris-qt.spec") set(CMAKE_INSTALL_PREFIX "/usr") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") set(CPACK_GENERATOR "RPM") else() set(CPACK_GENERATOR "STGZ") endif() include(CPack) diff --git a/src/core/ChangeLog.qml b/src/core/ChangeLog.qml index b66112b99..7d151905c 100644 --- a/src/core/ChangeLog.qml +++ b/src/core/ChangeLog.qml @@ -1,105 +1,104 @@ /* GCompris - ChangeLog.qml * * Copyright (C) 2016 Johnny Jazeix * * Authors: * Johnny Jazeix * * 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 GCompris 1.0 /** * Container object with a list of all the changes by version. * @ingroup infrastructure * */ QtObject { /** * type: list * List of changelog objects. * * A changelog object consists of the properties @c versionCode * and an optional @c content (which changes have been added in this version). * The activities added in this version are retrieved from the ActivityInfoTree and directly displayed. * */ property var changelog: [ { "versionCode": 9700, "content": [qsTr("New sub-categories to organize activities"), qsTr("Translation added for Macedonian."), qsTr("New activities Programming Maze and Baby Tangram"), qsTr("New background music and volume settings."), qsTr("New speed setting in several activities."), qsTr("New option in chess to display captured pieces."), qsTr("New images in Colors, Advanced colors and Target game."), qsTr("New voices for US English."), qsTr("Many little fixes and improvements.")] }, { "versionCode": 9600, "content": [qsTr("Translation updated for multiple languages (Breton, Brazilian Portuguese, Finnish...)."), qsTr("Add Russian dataset for Click on letter activity."), qsTr("Lang activity now available in Dutch.")] }, { "versionCode": 9500, "content": [qsTr("Merge Norwegian counties Nord-Trøndelag and Sør-Trøndelag into Trøndelag in geo-country activity."), qsTr("Fix in braille activities where the cells start at 1, not 0."), qsTr("Translation added for Basque, Hungarian and Malayalam."), qsTr("Loading/saving of creations (Baby Wordprocessor, Balance Box and Piano Composition).")] }, { "versionCode": 9100, "content": [qsTr("Many little fixes and improvements."), qsTr("Translations added for Scottish Gaelic.")] }, { "versionCode": 9000, "content": [qsTr("License page added in configuration."), qsTr("Multiple changes on layouts to improve the ergonomy.")] }, { "versionCode": 8000, "content": [qsTr("Lang activity now available in Polish, Swedish and Ukrainian.")] }, { "versionCode": 7000, "content": [qsTr("Search feature.")] }, { "versionCode": 6000, "content": [qsTr("A Changelog.")] }, { "versionCode": 5200, "content": [qsTr("Many little fixes."), qsTr("Lang activity now available in French.")] }, { "versionCode": 5000, "content": [qsTr("Adding a loading overlay to let the user know that some actions are taking place (loading an activity for example) and can take some seconds."), qsTr("Translations added for: Catalan (Valencian), Chinese Traditional, Finnish (92% translated), Russian (98% translated), Slovak (92% translated), Turkish.")] }, { "versionCode": 4000, "content": [qsTr("Translations added for: Slovenian, German, Galician.")] } ] function isNewerVersion(previousVersion, newVersion) { return newVersion > previousVersion } function getLogBetween(previousVersion, newVersion) { var filtered = changelog.filter(function filter(obj) { return isNewerVersion(previousVersion, obj['versionCode']) }); var output = ""; // Retrieve all the activities created between the two versions ActivityInfoTree.filterCreatedWithinVersions(previousVersion, newVersion); var activities = ActivityInfoTree.menuTree; // display for each version an optional text ("content") then the new activities filtered.map(function filter(obj) { obj['versionCode']; var version = (obj['versionCode'] / 10000).toFixed(2); output += "" + qsTr("Version %1:").arg(version) + ""; output += "
    "; // display free text if exist for(var i = 0; i < obj['content'].length; i++) output += "
  • " + obj['content'][i] + "
  • "; // display the activity titles for(var i in activities) { var activity = activities[i]; if(activity.createdInVersion == obj['versionCode'] && activity.enabled) { output += "
  • " + activity.title + "
  • "; } } output += "
"; }); // restore menu context ActivityInfoTree.filterByTag("favorite") - ActivityInfoTree.filterLockedActivities() ActivityInfoTree.filterEnabledActivities() return output } } diff --git a/src/core/config.h.in b/src/core/config.h.in index 8bd2fe3b7..3df59f67e 100644 --- a/src/core/config.h.in +++ b/src/core/config.h.in @@ -1,52 +1,50 @@ /* GCompris - config.h * * Copyright (C) 2015 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #ifndef GCOMPRIS_CONFIG_H #define GCOMPRIS_CONFIG_H #include /* Version number of package (string) */ #define VERSION "@GCOMPRIS_VERSION@" /* Version number of package (integer) */ #define VERSION_CODE @GCOMPRIS_VERSION_CODE@ /* Folder where rccs and translations are installed */ #ifdef Q_OS_MACX #define GCOMPRIS_DATA_FOLDER "../Resources" #elif Q_OS_IOS #define GCOMPRIS_DATA_FOLDER "." #else #define GCOMPRIS_DATA_FOLDER "../@_data_dest_dir@" #endif /* GCompris for android, gcompris-qt for others */ #define GCOMPRIS_APPLICATION_NAME "@GCOMPRIS_EXECUTABLE_NAME@" /* Compressed audio format */ #define COMPRESSED_AUDIO "@COMPRESSED_AUDIO@" /* Download Allowed */ #define DOWNLOAD_ALLOWED "@WITH_DOWNLOAD@" /* Date at which GCompris has been built */ #define BUILD_DATE "@BUILD_DATE@" -/* Type of activation system */ -#define ACTIVATION_MODE "@ACTIVATION_MODE@" /* Defines the renderer backend: Qt software renderer (requires Qt 5.8), openGL or default one */ #define GRAPHICAL_RENDERER "@GRAPHICAL_RENDERER@" #endif // GCOMPRIS_CONFIG_H diff --git a/src/core/main.cpp b/src/core/main.cpp index 8b3f4e52e..2f8bfc0b9 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1,296 +1,292 @@ /* GCompris - main.cpp * * Copyright (C) 2014 Bruno Coudoin * * Authors: * Bruno Coudoin * * 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 . */ #include #include #include #include #include #include #include #include #include #include #include #include "GComprisPlugin.h" #include "ApplicationInfo.h" #include "ActivityInfoTree.h" #include "DownloadManager.h" bool loadAndroidTranslation(QTranslator &translator, const QString &locale) { QFile file("assets:/share/GCompris/gcompris_" + locale + ".qm"); file.open(QIODevice::ReadOnly); QDataStream in(&file); uchar *data = (uchar*)malloc(file.size()); if(!file.exists()) qDebug() << "file assets:/share/GCompris/gcompris_" << locale << ".qm does not exist"; in.readRawData((char*)data, file.size()); if(!translator.load(data, file.size())) { qDebug() << "Unable to load translation for locale " << locale << ", use en_US by default"; free(data); return false; } // Do not free data, it is still needed by translator return true; } // Return the locale QString loadTranslation(QSettings &config, QTranslator &translator) { QString locale; // Get locale locale = config.value("General/locale", GC_DEFAULT_LOCALE).toString(); if(locale == GC_DEFAULT_LOCALE) locale = QString(QLocale::system().name() + ".UTF-8"); if(locale == "C.UTF-8" || locale == "en_US.UTF-8") return "en_US"; // Load translation // Remove .UTF8 locale.remove(".UTF-8"); #if defined(Q_OS_ANDROID) if(!loadAndroidTranslation(translator, locale)) loadAndroidTranslation(translator, ApplicationInfo::localeShort(locale)); #else #if (defined(Q_OS_LINUX) || defined(Q_OS_UNIX)) // only useful for translators: load from $application_dir/../share/... if exists as it is where kde scripts install translations if(translator.load("gcompris_qt.qm", QString("%1/../share/locale/%2/LC_MESSAGES").arg(QCoreApplication::applicationDirPath(), locale))) { qDebug() << "load translation for locale " << locale << " in " << QString("%1/../share/locale/%2/LC_MESSAGES").arg(QCoreApplication::applicationDirPath(), locale); } else if(translator.load("gcompris_qt.qm", QString("%1/../share/locale/%2/LC_MESSAGES").arg(QCoreApplication::applicationDirPath(), locale.split('_')[0]))) { qDebug() << "load translation for locale " << locale << " in " << QString("%1/../share/locale/%2/LC_MESSAGES").arg(QCoreApplication::applicationDirPath(), locale.split('_')[0]); } else #endif if(!translator.load("gcompris_" + locale, QString("%1/%2/translations").arg(QCoreApplication::applicationDirPath(), GCOMPRIS_DATA_FOLDER))) { qDebug() << "Unable to load translation for locale " << locale << ", use en_US by default"; } #endif return locale; } int main(int argc, char *argv[]) { // Disable it because we already support HDPI display natively qunsetenv("QT_DEVICE_PIXEL_RATIO"); QApplication app(argc, argv); app.setOrganizationName("KDE"); app.setApplicationName(GCOMPRIS_APPLICATION_NAME); app.setOrganizationDomain("kde.org"); app.setApplicationVersion(ApplicationInfo::GCVersion()); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) // Set desktop file name, as the built-in (orgDomain + appName) is not // the one we use (because appName is gcompris-qt, not gcompris) QGuiApplication::setDesktopFileName("org.kde.gcompris"); #endif //add a variable to disable default fullscreen on Mac, see below.. #if defined(Q_OS_MAC) // Sandboxing on MacOSX as documented in: // https://doc.qt.io/qt-5/osx-deployment.html QDir dir(QGuiApplication::applicationDirPath()); dir.cdUp(); dir.cd("Plugins"); QGuiApplication::setLibraryPaths(QStringList(dir.absolutePath())); #endif // Local scope for config QSettings config(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/gcompris/" + GCOMPRIS_APPLICATION_NAME + ".conf", QSettings::IniFormat); // Load translations QTranslator translator; loadTranslation(config, translator); // Apply translation app.installTranslator(&translator); QCommandLineParser parser; parser.setApplicationDescription("GCompris is an educational software for children 2 to 10"); parser.addHelpOption(); parser.addVersionOption(); QCommandLineOption exportActivitiesAsSQL("export-activities-as-sql", "Export activities as SQL"); parser.addOption(exportActivitiesAsSQL); QCommandLineOption clDefaultCursor(QStringList() << "c" << "cursor", QObject::tr("Run GCompris with the default system cursor.")); parser.addOption(clDefaultCursor); QCommandLineOption clNoCursor(QStringList() << "C" << "nocursor", QObject::tr("Run GCompris without cursor (touch screen mode).")); parser.addOption(clNoCursor); QCommandLineOption clFullscreen(QStringList() << "f" << "fullscreen", QObject::tr("Run GCompris in fullscreen mode.")); parser.addOption(clFullscreen); QCommandLineOption clWindow(QStringList() << "w" << "window", QObject::tr("Run GCompris in window mode.")); parser.addOption(clWindow); QCommandLineOption clSound(QStringList() << "s" << "sound", QObject::tr("Run GCompris with sound enabled.")); parser.addOption(clSound); QCommandLineOption clMute(QStringList() << "m" << "mute", QObject::tr("Run GCompris without sound.")); parser.addOption(clMute); QCommandLineOption clWithoutKioskMode(QStringList() << "disable-kioskmode", QObject::tr("Disable the kiosk mode (default).")); parser.addOption(clWithoutKioskMode); QCommandLineOption clWithKioskMode(QStringList() << "enable-kioskmode", QObject::tr("Enable the kiosk mode.")); parser.addOption(clWithKioskMode); QCommandLineOption clSoftwareRenderer(QStringList() << "software-renderer", QObject::tr("Use software renderer instead of openGL (slower but should run with any graphical card, needs Qt 5.8 minimum).")); parser.addOption(clSoftwareRenderer); QCommandLineOption clOpenGLRenderer(QStringList() << "opengl-renderer", QObject::tr("Use openGL renderer instead of software (faster but crash potentially depending on your graphical card).")); parser.addOption(clOpenGLRenderer); parser.process(app); GComprisPlugin plugin; plugin.registerTypes("GCompris"); ActivityInfoTree::registerResources(); // Tell media players to stop playing, it's GCompris time ApplicationInfo::getInstance()->requestAudioFocus(); - // Must be done after ApplicationSettings is constructed because we get an - // async callback from the payment system - ApplicationSettings::getInstance()->checkPayment(); - // Disable default fullscreen launch on Mac as it's a bit broken, window is behind desktop bars #if defined(Q_OS_MAC) bool isFullscreen = false; #else // for other platforms, fullscreen is the default value bool isFullscreen = true; #endif { isFullscreen = config.value("General/fullscreen", isFullscreen).toBool(); // Set the cursor image bool defaultCursor = config.value("General/defaultCursor", false).toBool(); if(!defaultCursor && !parser.isSet(clDefaultCursor)) QGuiApplication::setOverrideCursor( QCursor(QPixmap(":/gcompris/src/core/resource/cursor.svg"), 0, 0)); // Hide the cursor bool noCursor = config.value("General/noCursor", false).toBool(); if(noCursor || parser.isSet(clNoCursor)) QGuiApplication::setOverrideCursor(QCursor(Qt::BlankCursor)); } // Update execution counter ApplicationSettings::getInstance()->setExeCount(ApplicationSettings::getInstance()->exeCount() + 1); if(parser.isSet(clFullscreen)) { isFullscreen = true; } if(parser.isSet(clWindow)) { isFullscreen = false; } if(parser.isSet(clMute)) { ApplicationSettings::getInstance()->setIsAudioEffectsEnabled(false); ApplicationSettings::getInstance()->setIsAudioVoicesEnabled(false); } if(parser.isSet(clSound)) { ApplicationSettings::getInstance()->setIsAudioEffectsEnabled(true); ApplicationSettings::getInstance()->setIsAudioVoicesEnabled(true); } if(parser.isSet(clWithoutKioskMode)) { ApplicationSettings::getInstance()->setKioskMode(false); } if(parser.isSet(clWithKioskMode)) { ApplicationSettings::getInstance()->setKioskMode(true); } if(parser.isSet(clSoftwareRenderer)) { ApplicationSettings::getInstance()->setRenderer(QStringLiteral("software")); } if(parser.isSet(clOpenGLRenderer)) { ApplicationSettings::getInstance()->setRenderer(QStringLiteral("opengl")); } // Set the renderer used const QString &renderer = ApplicationSettings::getInstance()->renderer(); ApplicationInfo::getInstance()->setUseOpenGL(renderer != QLatin1String("software")); #if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) if(renderer == QLatin1String("software")) QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); else if(renderer == QLatin1String("opengl")) QQuickWindow::setSceneGraphBackend(QSGRendererInterface::OpenGL); #endif QQmlApplicationEngine engine(QUrl("qrc:/gcompris/src/core/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::quit, DownloadManager::getInstance(), &DownloadManager::shutdown); // add import path for shipped qml modules: #ifdef SAILFISHOS engine.addImportPath(QStringLiteral("%1/../share/%2/lib/qml") .arg(QCoreApplication::applicationDirPath()).arg(GCOMPRIS_APPLICATION_NAME)); #else engine.addImportPath(QStringLiteral("%1/../lib/qml") .arg(QCoreApplication::applicationDirPath())); #endif ApplicationInfo::getInstance()->setBox2DInstalled(engine); if(parser.isSet(exportActivitiesAsSQL)) { ActivityInfoTree *menuTree(qobject_cast(ActivityInfoTree::menuTreeProvider(&engine, nullptr))); menuTree->exportAsSQL(); exit(0); } QObject *topLevel = engine.rootObjects().value(0); QQuickWindow *window = qobject_cast(topLevel); if (window == nullptr) { qWarning("Error: Your root item has to be a Window."); return -1; } ApplicationInfo::setWindow(window); window->setIcon(QIcon(QPixmap(QString::fromUtf8(":/gcompris/src/core/resource/gcompris-icon.png")))); if(isFullscreen) { window->showFullScreen(); } else { window->show(); } return app.exec(); } diff --git a/tests/core/ActivityInfoTest.cpp b/tests/core/ActivityInfoTest.cpp index 9d15dedfb..51198a8e1 100644 --- a/tests/core/ActivityInfoTest.cpp +++ b/tests/core/ActivityInfoTest.cpp @@ -1,116 +1,113 @@ /* GCompris - ActivityInfoTest.cpp * * Copyright (C) 2018 Himanshu Vishwakarma * * Authors: * Himanshu Vishwakarma * * 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 . */ #include #include #include "ApplicationSettingsMock.h" #include "src/core/ActivityInfo.h" #define ACTIVITY_INFO_TEST_ATTRIBUTE(attributeName, accessorName, attributeType) \ { \ QFETCH(attributeType, attributeName); \ QSignalSpy spy(&activityinfo, &ActivityInfo::attributeName ## Changed); \ QVERIFY(spy.isValid()); \ QVERIFY(spy.count() == 0); \ activityinfo.set ## accessorName(attributeName); \ QVERIFY(spy.count() == 1); \ QCOMPARE(activityinfo.attributeName(), attributeName); \ } class CoreActivityInfoTest : public QObject { Q_OBJECT private slots: void ActivityInfoTest(); void ActivityInfoTest_data(); }; void CoreActivityInfoTest::ActivityInfoTest_data() { QTest::addColumn("name"); QTest::addColumn("section"); QTest::addColumn("difficulty"); QTest::addColumn("minimalDifficulty"); QTest::addColumn("maximalDifficulty"); QTest::addColumn("icon"); QTest::addColumn("author"); - QTest::addColumn("demo"); QTest::addColumn("title"); QTest::addColumn("description"); QTest::addColumn("goal"); QTest::addColumn("prerequisite"); QTest::addColumn("manual"); QTest::addColumn("credit"); QTest::addColumn("favorite"); QTest::addColumn("enabled"); QTest::addColumn("createdInVersion"); - QTest::newRow("ActivityInfo") << "Name" << "section" << (quint32)3 << (quint32)2 << (quint32)4 << "icon" << "author" << true << "title" << "description" << "goal" << "prerequisite" << "manual" << "credit" << false << false << 2; - QTest::newRow("UnknownInfo") << "Unknown" << "Unknown" << (quint32)5 << (quint32)1 << (quint32)6 << "Unknown" << "Unknown" << false << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << true << true << 10; - QTest::newRow("Empty") << "" << "" << (quint32)0 << (quint32)1 << (quint32)2 << "" << "" << false << "" << "" << "" << "" << "" << "" << true << true << 0; + QTest::newRow("ActivityInfo") << "Name" << "section" << (quint32)3 << (quint32)2 << (quint32)4 << "icon" << "author" << "title" << "description" << "goal" << "prerequisite" << "manual" << "credit" << false << false << 2; + QTest::newRow("UnknownInfo") << "Unknown" << "Unknown" << (quint32)5 << (quint32)1 << (quint32)6 << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << "Unknown" << true << true << 10; + QTest::newRow("Empty") << "" << "" << (quint32)0 << (quint32)1 << (quint32)2 << "" << "" << "" << "" << "" << "" << "" << "" << true << true << 0; } void CoreActivityInfoTest::ActivityInfoTest() { ActivityInfo activityinfo; // called here to set the static instance object to the mock one ApplicationSettingsMock::getInstance(); QVERIFY(activityinfo.name().isEmpty()); QVERIFY(activityinfo.section().isEmpty()); QVERIFY(activityinfo.icon().isEmpty()); QVERIFY(activityinfo.author().isEmpty()); - QVERIFY(activityinfo.demo()); QVERIFY(activityinfo.title().isEmpty()); QVERIFY(activityinfo.description().isEmpty()); QVERIFY(activityinfo.goal().isEmpty()); QVERIFY(activityinfo.prerequisite().isEmpty()); QVERIFY(activityinfo.manual().isEmpty()); QVERIFY(activityinfo.credit().isEmpty()); QVERIFY(!activityinfo.favorite()); QVERIFY(activityinfo.enabled()); QCOMPARE(activityinfo.createdInVersion(), 0); ACTIVITY_INFO_TEST_ATTRIBUTE(name, Name, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(section, Section, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(difficulty, Difficulty, quint32); ACTIVITY_INFO_TEST_ATTRIBUTE(minimalDifficulty, MinimalDifficulty, quint32); ACTIVITY_INFO_TEST_ATTRIBUTE(maximalDifficulty, MaximalDifficulty, quint32); ACTIVITY_INFO_TEST_ATTRIBUTE(icon, Icon, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(author, Author, QString); - ACTIVITY_INFO_TEST_ATTRIBUTE(demo, Demo, bool); ACTIVITY_INFO_TEST_ATTRIBUTE(title, Title, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(description, Description, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(goal, Goal, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(prerequisite, Prerequisite, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(manual, Manual, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(credit, Credit, QString); ACTIVITY_INFO_TEST_ATTRIBUTE(favorite, Favorite, bool); ACTIVITY_INFO_TEST_ATTRIBUTE(enabled, Enabled, bool); ACTIVITY_INFO_TEST_ATTRIBUTE(createdInVersion, CreatedInVersion, int); delete ApplicationSettingsMock::getInstance(); } QTEST_MAIN(CoreActivityInfoTest) #include "ActivityInfoTest.moc" diff --git a/tests/core/ApplicationSettingsTest.cpp b/tests/core/ApplicationSettingsTest.cpp index 21ff84e88..325d2a8f3 100644 --- a/tests/core/ApplicationSettingsTest.cpp +++ b/tests/core/ApplicationSettingsTest.cpp @@ -1,195 +1,189 @@ /* GCompris - ApplicationSettingsTest.cpp * * Copyright (C) 2018 Himanshu Vishwakarma * * Authors: * Himanshu Vishwakarma * * 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 . */ #include #include #include #include "src/core/ApplicationSettings.h" #include "ApplicationSettingsMock.h" #define APPLICATION_SETTINGS_TEST_ATTRIBUTE(attributeType, attributeName, accessorName, accessorNameChanged) \ { \ QFETCH(attributeType, attributeName); \ QSignalSpy spy(&applicationSettingsMock, &ApplicationSettings::accessorNameChanged); \ QVERIFY(spy.isValid()); \ QVERIFY(spy.count() == 0); \ applicationSettingsMock.accessorName(attributeName); \ QVERIFY(spy.count() == 1); \ QCOMPARE(applicationSettingsMock.attributeName(), attributeName); \ } class CoreApplicationSettingsTest : public QObject { Q_OBJECT private slots: void cleanup(); void ApplicationSettingsInitializationTest(); void ApplicationSettingsTest(); void ApplicationSettingsTest_data(); void ActivitySettingsTest(); }; void CoreApplicationSettingsTest::ApplicationSettingsInitializationTest() { ApplicationSettingsMock applicationSettings; QCOMPARE(applicationSettings.baseFontSizeMin(), -7); QCOMPARE(applicationSettings.baseFontSizeMax(), 7); QCOMPARE(applicationSettings.fontLetterSpacingMin(), (qreal)0.0); QCOMPARE(applicationSettings.fontLetterSpacingMax(), (qreal)8.0); } void CoreApplicationSettingsTest::ApplicationSettingsTest_data() { - QTest::addColumn("showLockedActivities"); QTest::addColumn("isAudioVoicesEnabled"); QTest::addColumn("isAudioEffectsEnabled"); QTest::addColumn("isBackgroundMusicEnabled"); QTest::addColumn("previousHeight"); QTest::addColumn("previousWidth"); QTest::addColumn("isVirtualKeyboard"); QTest::addColumn("locale"); QTest::addColumn("font"); QTest::addColumn("isEmbeddedFont"); QTest::addColumn("fontCapitalization"); QTest::addColumn("fontLetterSpacing"); QTest::addColumn("isAutomaticDownloadsEnabled"); QTest::addColumn("filterLevelMin"); QTest::addColumn("filterLevelMax"); - QTest::addColumn("isDemoMode"); - QTest::addColumn("codeKey"); QTest::addColumn("isKioskMode"); QTest::addColumn("sectionVisible"); QTest::addColumn("wordset"); QTest::addColumn("downloadServerUrl"); QTest::addColumn("cachePath"); QTest::addColumn("userDataPath"); QTest::addColumn("exeCount"); QTest::addColumn("isBarHidden"); QTest::addColumn("baseFontSize"); QTest::addColumn("lastGCVersionRan"); QTest::addColumn("isFullscreen"); QTest::addColumn("renderer"); QTest::addColumn("backgroundMusicVolume"); QTest::addColumn("audioEffectsVolume"); QTest::addColumn("filteredBackgroundMusic"); - QTest::newRow("dummySettings1") << true << true << true << true << (quint32)21 << (quint32)25 << true << "en_EN" << "font1" << true << (quint32)36 << (qreal)2.532 << true << (quint32)26 << (quint32)84 << true << "codeKey1" << true << true << "wordset1" << "downloadServerUrl1" << "cachePath1" << "userDataPath1" << (quint32)48 << true << 7 << 52 << false << "softwareRenderer" << (qreal)0.5 << (qreal)0.7 << (QStringList() << "music1"); - QTest::newRow("dummySettings2") << false << false << false << false << (quint32)20 << (quint32)32 << false << "en_US" << "font2" << false << (quint32)34 <<(qreal)2.3 << false << (quint32)24 << (quint32)80 << false << "codekey2" << false << false << "wordset2" << "downloadServerUrl2" << "cachePath2" << "userDataPath2" << (quint32)44 << false << 5 << 64 << false << "openglRenderer" << (qreal)1.0 << (qreal)0.0 << (QStringList() << "music2" << "music3"); + QTest::newRow("dummySettings1") << true << true << true << (quint32)21 << (quint32)25 << true << "en_EN" << "font1" << true << (quint32)36 << (qreal)2.532 << true << (quint32)26 << (quint32)84 << true << true << "wordset1" << "downloadServerUrl1" << "cachePath1" << "userDataPath1" << (quint32)48 << true << 7 << 52 << false << "softwareRenderer" << (qreal)0.5 << (qreal)0.7 << (QStringList() << "music1"); + QTest::newRow("dummySettings2") << false << false << false << (quint32)20 << (quint32)32 << false << "en_US" << "font2" << false << (quint32)34 <<(qreal)2.3 << false << (quint32)24 << (quint32)80 << false << false << "wordset2" << "downloadServerUrl2" << "cachePath2" << "userDataPath2" << (quint32)44 << false << 5 << 64 << false << "openglRenderer" << (qreal)1.0 << (qreal)0.0 << (QStringList() << "music2" << "music3"); } void CoreApplicationSettingsTest::ApplicationSettingsTest() { ApplicationSettingsMock applicationSettingsMock; ApplicationSettingsMock::getInstance(); - APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, showLockedActivities, setShowLockedActivities, showLockedActivitiesChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isAudioVoicesEnabled, setIsAudioVoicesEnabled, audioVoicesEnabledChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isAudioEffectsEnabled, setIsAudioEffectsEnabled, audioEffectsEnabledChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isBackgroundMusicEnabled, setIsBackgroundMusicEnabled, backgroundMusicEnabledChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, previousHeight, setPreviousHeight, previousHeightChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, previousWidth, setPreviousWidth, previousWidthChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isVirtualKeyboard, setVirtualKeyboard, virtualKeyboardChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, locale, setLocale, localeChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, font, setFont, fontChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isEmbeddedFont, setIsEmbeddedFont, embeddedFontChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, fontCapitalization, setFontCapitalization, fontCapitalizationChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(qreal, fontLetterSpacing, setFontLetterSpacing, fontLetterSpacingChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isAutomaticDownloadsEnabled, setIsAutomaticDownloadsEnabled, automaticDownloadsEnabledChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, filterLevelMin, setFilterLevelMin, filterLevelMinChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, filterLevelMax, setFilterLevelMax, filterLevelMaxChanged); - APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isDemoMode, setDemoMode, demoModeChanged); - APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, codeKey, setCodeKey, codeKeyChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isKioskMode, setKioskMode, kioskModeChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, sectionVisible, setSectionVisible, sectionVisibleChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, wordset, setWordset, wordsetChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, downloadServerUrl, setDownloadServerUrl, downloadServerUrlChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, cachePath, setCachePath, cachePathChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, userDataPath, setUserDataPath, userDataPathChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(quint32, exeCount, setExeCount, exeCountChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isBarHidden, setBarHidden, barHiddenChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(int, baseFontSize, setBaseFontSize, baseFontSizeChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(int, lastGCVersionRan, setLastGCVersionRan, lastGCVersionRanChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(bool, isFullscreen, setFullscreen, fullscreenChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QString, renderer, setRenderer, rendererChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(qreal, backgroundMusicVolume, setBackgroundMusicVolume, backgroundMusicVolumeChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(qreal, audioEffectsVolume, setAudioEffectsVolume, audioEffectsVolumeChanged); APPLICATION_SETTINGS_TEST_ATTRIBUTE(QStringList, filteredBackgroundMusic, setFilteredBackgroundMusic, filteredBackgroundMusicChanged); delete ApplicationSettingsMock::getInstance(); } void CoreApplicationSettingsTest::ActivitySettingsTest() { ApplicationSettingsMock applicationSettingsMock; ApplicationSettingsMock::getInstance(); // Creating a dummyActivity QString dummyActivity = QStringLiteral("DummyActivity"); // By Default the DummyActivity is not favorite QVERIFY(!applicationSettingsMock.isFavorite(dummyActivity)); // Setting Up the DummyActivity as Favorite applicationSettingsMock.setFavorite(dummyActivity, true); QVERIFY(applicationSettingsMock.isFavorite(dummyActivity)); // setting Up the DummyActivity as Not favorite applicationSettingsMock.setFavorite(dummyActivity, false); QVERIFY(!applicationSettingsMock.isFavorite(dummyActivity)); // By Default the activity progress is zero QCOMPARE(applicationSettingsMock.loadActivityProgress(dummyActivity), 0); // Saving the Activity Progress applicationSettingsMock.saveActivityProgress(dummyActivity, 3); QCOMPARE(applicationSettingsMock.loadActivityProgress(dummyActivity), 3); applicationSettingsMock.saveActivityProgress(dummyActivity, 10); QCOMPARE(applicationSettingsMock.loadActivityProgress(dummyActivity), 10); applicationSettingsMock.saveActivityProgress(dummyActivity, 0); QCOMPARE(applicationSettingsMock.loadActivityProgress(dummyActivity), 0); // Test current level getter/setter QCOMPARE(applicationSettingsMock.currentLevels(dummyActivity), {}); applicationSettingsMock.setCurrentLevels(dummyActivity, {"3"}); QCOMPARE(applicationSettingsMock.currentLevels(dummyActivity), {"3"}); // By Default the activity QVariantMap configuration; configuration.insert(QStringLiteral("DummyKey1"), QStringLiteral("DummyValue1")); configuration.insert(QStringLiteral("DummyKey2"), QStringLiteral("DummyValue2")); configuration.insert(QStringLiteral("DummyKey3"), QStringLiteral("DummyValue3")); configuration.insert(QStringLiteral("DummyKey4"), QStringLiteral("DummyValue4")); applicationSettingsMock.saveActivityConfiguration(dummyActivity, configuration); QVariantMap newConfiguration = applicationSettingsMock.loadActivityConfiguration(dummyActivity); QCOMPARE(newConfiguration.value(QStringLiteral("DummyKey1")), configuration.value(QStringLiteral("DummyKey1"))); QCOMPARE(newConfiguration.value(QStringLiteral("DummyKey2")), configuration.value(QStringLiteral("DummyKey2"))); QCOMPARE(newConfiguration.value(QStringLiteral("DummyKey3")), configuration.value(QStringLiteral("DummyKey3"))); QCOMPARE(newConfiguration.value(QStringLiteral("DummyKey4")), configuration.value(QStringLiteral("DummyKey4"))); delete ApplicationSettingsMock::getInstance(); } void CoreApplicationSettingsTest::cleanup() { QFile::remove("./dummy_application_settings.conf"); } QTEST_MAIN(CoreApplicationSettingsTest) #include "ApplicationSettingsTest.moc" diff --git a/tools/gencode.py b/tools/gencode.py deleted file mode 100755 index 33a4d6406..000000000 --- a/tools/gencode.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/python -# -# GCompris - gencode.py -# -# Copyright (C) 2016 Bruno Coudoin -# -# 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 . - -# Generate code for today -import random -from datetime import datetime - -user = int(random.random() * 0xFFFF) -date = (datetime.now().year << 4) | datetime.now().month -crc = user ^ date ^ 0xCECA -print "%04X-%04X-%04X" %(user, date, crc) -