blob: fc5d26aa88ac913d98c45c301d44ea930f6ddbb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
import QtQuick 2.0
Item {
signal letterClicked(string letter)
signal go()
id: keyboard
states: [
State {
name: 'numpad'
PropertyChanges {
target: qwerty
visible: false
}
PropertyChanges {
target: numpad
visible: true
}
}
]
Column {
id: qwerty
anchors.fill: parent
spacing: 10
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "Q" }
Key { text: "W" }
Key { text: "E" }
Key { text: "R" }
Key { text: "T" }
Key { text: "Y" }
Key { text: "U" }
Key { text: "I" }
Key { text: "O" }
Key { text: "P" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "A" }
Key { text: "S" }
Key { text: "D" }
Key { text: "F" }
Key { text: "G" }
Key { text: "H" }
Key { text: "J" }
Key { text: "K" }
Key { text: "L" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "Z" }
Key { text: "X" }
Key { text: "C" }
Key { text: "V" }
Key { text: "B" }
Key { text: "N" }
Key { text: "M" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Button { text: "123"; width: 60
onPress: keyboard.state = 'numpad'
}
Button { text: "!@#"; width: 60 }
Key { text: " "; width: 300 }
Key { text: "." }
Key { text: "&" }
}
}
Column {
id: numpad
visible: false
anchors.fill: parent
spacing: 10
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "1" }
Key { text: "2" }
Key { text: "3" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "4" }
Key { text: "5" }
Key { text: "6" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Key { text: "7" }
Key { text: "8" }
Key { text: "9" }
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
Button {
text: "ABC"
width: 60
onPress: keyboard.state = ''
}
Key { text: "*" }
Key { text: "0" }
Key { text: "#" }
Button {
text: "Go"
width: 60
onPress: keyboard.go()
}
}
}
}
|