2 * Copyright (C) 2016 The Qt Company Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 import QtQuick.Window 2.0
19 import QtQuick.Layouts 1.1
26 anchors.margins: root.height / 10
28 Layout.fillWidth: true
29 Layout.fillHeight: true
31 model: ['q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p']
34 Layout.preferredWidth: 2
35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 capital: shift.checked
42 Layout.fillWidth: true
43 Layout.fillHeight: true
45 Layout.preferredWidth: 1
46 Layout.fillWidth: true
50 model: ['a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l']
53 Layout.preferredWidth: 2
54 Layout.fillWidth: true
55 Layout.fillHeight: true
56 capital: shift.checked
60 Layout.preferredWidth: 1
61 Layout.fillWidth: true
65 Layout.fillWidth: true
66 Layout.fillHeight: true
69 image: './images/Keyboard_Shift.svg'
71 Layout.preferredWidth: 2
72 Layout.fillWidth: true
73 Layout.fillHeight: true
76 model: ['z', 'x', 'c', 'v', 'b', 'n', 'm', '@']
79 Layout.preferredWidth: 2
80 Layout.fillWidth: true
81 Layout.fillHeight: true
82 capital: shift.checked
86 image: './images/Keyboard_Back.svg'
87 Layout.preferredWidth: 2
88 Layout.fillWidth: true
89 Layout.fillHeight: true
91 if (!clearSelctedText()) {
92 var input = keyboard.target
93 if (input.cursorPosition > 0)
94 keyboard.target.remove(input.cursorPosition - 1, input.cursorPosition)
100 Layout.fillWidth: true
101 Layout.fillHeight: true
104 Layout.preferredWidth: 2
105 Layout.fillWidth: true
106 Layout.fillHeight: true
107 onClicked: root.toggleMode()
111 Layout.preferredWidth: 2
112 Layout.fillWidth: true
113 Layout.fillHeight: true
117 image: './images/Keyboard_Space.svg'
118 Layout.preferredWidth: 12
119 Layout.fillWidth: true
120 Layout.fillHeight: true
124 Layout.preferredWidth: 2
125 Layout.fillWidth: true
126 Layout.fillHeight: true
127 onClicked: root.toggleMode()
130 image: './images/Keyboard_Arrow.svg'
131 Layout.preferredWidth: 2
132 Layout.fillWidth: true
133 Layout.fillHeight: true