Warning, /plasma-bigscreen/calamares-bigscreen-branding/bigscreen/NavigationHelper.qml is written in an unsupported language. File is not indexed.
0001 /* === This file is part of Calamares - <https://calamares.io> === 0002 * 0003 * SPDX-FileCopyrightText: 2022 Aditya Mehra <aix.m@outlook.com> 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 * 0006 * Calamares is Free Software: see the License-Identifier above. 0007 * 0008 */ 0009 0010 import io.calamares.core 1.0 0011 import io.calamares.ui 1.0 0012 0013 import QtQuick 2.15 0014 import QtQuick.Controls 2.15 0015 import QtQuick.Window 2.14 0016 import QtQuick.Layouts 1.3 0017 0018 import org.kde.kirigami 2.7 as Kirigami 0019 0020 Item { 0021 anchors.fill: parent 0022 property var activeFocusedElement 0023 property var activePage 0024 0025 function switchTextByFocus(){ 0026 0027 if(activePage == "welcomePage") { 0028 switch(activeFocusedElement) { 0029 case "searchFieldFocusBox": 0030 return [qsTr('Remote: Press the "Select|OK" button to search a language'), qsTr('Keyboard: Press the "Enter" button to search a language')] 0031 case "tzContainer": 0032 return [qsTr('Remote: Press the "Select|OK" button to start selecting a language from the list'), qsTr('Keyboard: Press the "Enter" button to start selecting a language from the list')] 0033 case "timezoneNextBtn": 0034 return [qsTr('Remote: Press the "Select|OK" button to continue'), qsTr('Keyboard: Press the "Enter" button to continue')] 0035 case "tzListView": 0036 return [qsTr('Remote: Use "Up|Down" buttons to navigate, "Select|OK" button to select highlighted language'), qsTr('Keyboard: Use "Up|Down" buttons to navigate, "Enter" button to select highlighted language')] 0037 case "timezoneSkipButton": 0038 return [qsTr('Remote: Press the "Select|OK" button to skip language setup and continue'), qsTr('Keyboard: Press the "Enter" button to skip language setup and continue')] 0039 } 0040 } 0041 0042 if(activePage == "localPage") { 0043 switch(activeFocusedElement) { 0044 case "localStackContainer": 0045 return [qsTr('Remote: Press the "Select|OK" button to start selecting a region and zone from the list'), qsTr('Keyboard: Press the "Enter" button to start selecting a region and zone from the list')] 0046 case "listOneButton": 0047 case "listTwoButton": 0048 return [qsTr('Remote: Press the "Select|OK" button to select tab'), qsTr('Keyboard: Press the "Enter" button to select tab')] 0049 case "list": 0050 case "list2": 0051 return [qsTr('Remote: Use "Up|Down" buttons to navigate, "Select|OK" button to select highlighted entry'), qsTr('Keyboard: Use "Up|Down" buttons to navigate, "Enter" button to select highlighted entry')] 0052 case "nextButtonNavBar": 0053 return [qsTr('Remote: Press the "Select|OK" button to continue'), qsTr('Keyboard: Press the "Enter" button to continue')] 0054 case "quitButtonNavBar": 0055 return [qsTr('Remote: Press the "Select|OK" button to quit setup'), qsTr('Keyboard: Press the "Enter" button to quit setup')] 0056 case "backButtonNavBar": 0057 return [qsTr('Remote: Press the "Select|OK" button to return to previous step'), qsTr('Keyboard: Press the "Enter" button to return to previous step')] 0058 } 0059 } 0060 0061 if(activePage == "keyboardPage") { 0062 switch(activeFocusedElement) { 0063 case "keyboardModelChooseComboBox": 0064 return [qsTr('Remote: Press the "Select|OK" button to start selecting a keyboard model from the list'), qsTr('Keyboard: Press the "Enter" button to start selecting a keyboard model from the list')] 0065 case "localStackContainer": 0066 return [qsTr('Remote: Press the "Select|OK" button to start selecting a keyboard layout and variant from the list'), qsTr('Keyboard: Press the "Enter" button to start selecting a keyboard layout and variant from the list')] 0067 case "listOneButton": 0068 case "listTwoButton": 0069 return [qsTr('Remote: Press the "Select|OK" button to select tab'), qsTr('Keyboard: Press the "Enter" button to select tab')] 0070 case "list": 0071 case "list2": 0072 return [qsTr('Remote: Use "Up|Down" buttons to navigate, "Select|OK" button to select highlighted entry'), qsTr('Keyboard: Use "Up|Down" buttons to navigate, "Enter" button to select highlighted entry')] 0073 case "nextButtonNavBar": 0074 return [qsTr('Remote: Press the "Select|OK" button to continue'), qsTr('Keyboard: Press the "Enter" button to continue')] 0075 case "quitButtonNavBar": 0076 return [qsTr('Remote: Press the "Select|OK" button to quit setup'), qsTr('Keyboard: Press the "Enter" button to quit setup')] 0077 case "backButtonNavBar": 0078 return [qsTr('Remote: Press the "Select|OK" button to return to previous step'), qsTr('Keyboard: Press the "Enter" button to return to previous step')] 0079 case "textInputArea": 0080 return [qsTr('Remote: Press the "Select|OK" button to test keyboard input'), qsTr('Keyboard: Press the "Enter" button to test keyboard input')] 0081 } 0082 } 0083 } 0084 0085 Item { 0086 width: parent.width 0087 height: parent.height * 0.80 0088 anchors.verticalCenter: parent.verticalCenter 0089 0090 ColumnLayout { 0091 anchors.fill: parent 0092 anchors.margins: Kirigami.Units.largeSpacing 0093 spacing: Kirigami.Units.largeSpacing 0094 0095 Rectangle { 0096 color: "#ff212121" 0097 Layout.fillWidth: true 0098 Layout.fillHeight: true 0099 radius: 4 0100 0101 ColumnLayout { 0102 anchors.fill: parent 0103 anchors.margins: Kirigami.Units.smallSpacing 0104 0105 Label { 0106 id: labelButtonInfo 0107 Layout.fillWidth: true 0108 Layout.fillHeight: true 0109 horizontalAlignment: Text.AlignHCenter 0110 verticalAlignment: Text.AlignVCenter 0111 font.weight: Font.Light 0112 minimumPixelSize: 2 0113 font.pixelSize: 25 0114 maximumLineCount: 5 0115 fontSizeMode: Text.Fit 0116 wrapMode: Text.WordWrap 0117 text: switchTextByFocus()[0] 0118 color: Kirigami.Theme.textColor 0119 } 0120 0121 Rectangle { 0122 Layout.fillWidth: true 0123 Layout.preferredHeight: Kirigami.Units.gridUnit * 3 0124 Layout.alignment: Qt.AlignHCenter | Qt.AlignHTop 0125 color: Kirigami.Theme.backgroundColor 0126 0127 Kirigami.Icon { 0128 anchors.fill: parent 0129 anchors.margins: Kirigami.Units.smallSpacing 0130 source: Qt.resolvedUrl("assets/remote-ok.svg") 0131 } 0132 } 0133 } 0134 } 0135 0136 Rectangle { 0137 color: "#ff212121" 0138 Layout.fillWidth: true 0139 Layout.preferredHeight: Kirigami.Units.gridUnit * 2 0140 radius: 4 0141 0142 Label { 0143 anchors.fill: parent 0144 horizontalAlignment: Text.AlignHCenter 0145 verticalAlignment: Text.AlignVCenter 0146 font.weight: Font.Light 0147 minimumPixelSize: 2 0148 font.pixelSize: 25 0149 maximumLineCount: 5 0150 fontSizeMode: Text.Fit 0151 wrapMode: Text.WordWrap 0152 text: "Navigation Helper" 0153 color: accentColor 0154 } 0155 } 0156 0157 Rectangle { 0158 color: "#ff212121" 0159 Layout.fillWidth: true 0160 Layout.fillHeight: true 0161 radius: 4 0162 0163 ColumnLayout { 0164 anchors.fill: parent 0165 anchors.margins: Kirigami.Units.smallSpacing 0166 0167 Rectangle { 0168 Layout.fillWidth: true 0169 Layout.preferredHeight: Kirigami.Units.gridUnit * 3 0170 Layout.alignment: Qt.AlignHCenter | Qt.AlignHTop 0171 color: Kirigami.Theme.backgroundColor 0172 0173 Kirigami.Icon { 0174 anchors.fill: parent 0175 anchors.margins: Kirigami.Units.smallSpacing 0176 source: Qt.resolvedUrl("assets/keyboard-ok.svg") 0177 } 0178 } 0179 0180 Label { 0181 id: labelButtonInfo2 0182 Layout.fillWidth: true 0183 Layout.fillHeight: true 0184 horizontalAlignment: Text.AlignHCenter 0185 verticalAlignment: Text.AlignVCenter 0186 font.weight: Font.Light 0187 minimumPixelSize: 2 0188 font.pixelSize: 25 0189 maximumLineCount: 5 0190 fontSizeMode: Text.Fit 0191 wrapMode: Text.WordWrap 0192 text: switchTextByFocus()[1] 0193 color: Kirigami.Theme.textColor 0194 } 0195 } 0196 } 0197 } 0198 } 0199 }