Warning, /education/gcompris/src/activities/braille_alphabets/FirstScreen.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - FirstScreen.qml 0002 * 0003 * SPDX-FileCopyrightText: 2014 Arkit Vora <arkitvora123@gmail.com> 0004 * 0005 * Authors: 0006 * Srishti Sethi <srishakatux@gmail.com> (GTK+ version) 0007 * Arkit Vora <arkitvora123@gmail.com> (Qt Quick port) 0008 * 0009 * SPDX-License-Identifier: GPL-3.0-or-later 0010 */ 0011 import QtQuick 2.12 0012 import GCompris 1.0 0013 import "../../core" 0014 import "braille_alphabets.js" as Activity 0015 0016 Image { 0017 id: first_screen 0018 anchors.fill: parent 0019 fillMode: Image.PreserveAspectCrop 0020 source: Activity.url + "intro_bg.svg" 0021 sourceSize.width: width 0022 sourceSize.height: height 0023 0024 GCText { 0025 id: heading 0026 text: qsTr("Braille: Unlocking the Code") 0027 fontSize: largeSize 0028 fontSizeMode: Text.Fit 0029 horizontalAlignment: Text.AlignHCenter 0030 font.weight: Font.DemiBold 0031 anchors.centerIn: parent.Center 0032 color: "#2a2a2a" 0033 width: parent.width 0034 height: parent.height * 0.10 0035 wrapMode: Text.WordWrap 0036 } 0037 0038 Image { 0039 id: introChar 0040 source: Activity.url + "braille_button.svg" 0041 sourceSize.height: Math.min(parent.height * 0.25, parent.width * 0.25) 0042 fillMode: Image.PreserveAspectFit 0043 anchors { 0044 left: parent.left 0045 leftMargin: 10 * ApplicationInfo.ratio 0046 verticalCenter: body_text1.verticalCenter 0047 } 0048 Behavior on scale { PropertyAnimation { duration: 100 } } 0049 MouseArea { 0050 anchors.fill: parent 0051 hoverEnabled: first_screen.visible 0052 enabled: first_screen.visible 0053 onClicked: { 0054 dialogMap.visible = true 0055 displayDialog(dialogMap) 0056 } 0057 onEntered: introChar.scale = 1.1 0058 onExited: introChar.scale = 1 0059 } 0060 } 0061 0062 GCText { 0063 id: body_text1 0064 z: 1 0065 text: qsTr('The braille system is a method that is used by blind people to read and write.') + '\n \n ' + 0066 qsTr('Each braille character, or cell, is made up of six dot positions, arranged in ' + 0067 'a rectangle containing two columns of three dots each. As seen on the left, each ' + 0068 'dot is referenced by a number from 1 to 6.') 0069 fontSize: regularSize 0070 fontSizeMode: Text.Fit 0071 font.weight: Font.DemiBold 0072 horizontalAlignment: Text.AlignJustify 0073 anchors { 0074 top: heading.bottom 0075 right: parent.right 0076 left: introChar.right 0077 margins: 10 * ApplicationInfo.ratio 0078 } 0079 color: "#2a2a2a" 0080 width: parent.width - introChar.width - 30 * ApplicationInfo.ratio 0081 height: parent.height * 0.4 0082 wrapMode: Text.WordWrap 0083 } 0084 0085 GCText { 0086 id: bottom_text 0087 z: 2 0088 text: qsTr("When you are ready, click on me and try reproducing braille characters.") 0089 fontSize: regularSize 0090 fontSizeMode: Text.Fit 0091 font.weight: Font.Bold 0092 horizontalAlignment: Text.AlignRight 0093 color: "#2a2a2a" 0094 wrapMode: Text.WordWrap 0095 anchors { 0096 top: body_text1.bottom 0097 left: parent.left 0098 margins: 10 * ApplicationInfo.ratio 0099 } 0100 height: parent.height * 0.25 0101 width: parent.width * 0.5 0102 } 0103 0104 Image { 0105 id: introTux 0106 z: 3 0107 source: Activity.url + "tux_braille.svg" 0108 fillMode: Image.PreserveAspectFit 0109 sourceSize.width: Math.min(parent.width * 0.2, parent.height * 0.2) 0110 anchors.centerIn: bgTux 0111 Behavior on scale { PropertyAnimation { duration: 100 } } 0112 0113 MouseArea { 0114 id: tux_click 0115 anchors.fill: parent 0116 hoverEnabled: true 0117 onClicked: first_screen.visible = false 0118 onEntered: introTux.scale = 1.1 0119 onExited: introTux.scale = 1 0120 } 0121 } 0122 0123 Rectangle { 0124 id: bgTux 0125 z: 0 0126 color: "#94c1d2" 0127 width: introTux.width * 1.5 0128 height: introTux.height * 1.1 0129 radius: bgTux.width * 0.5 0130 anchors { 0131 top: body_text1.bottom 0132 topMargin: 10 * ApplicationInfo.ratio 0133 left: bottom_text.right 0134 leftMargin: 10 * ApplicationInfo.ratio 0135 } 0136 } 0137 }