2
import Ubuntu.Components 0.1
6
height: grid.height+units.gu(4)
10
columns: Math.floor(parent.width / units.gu(46))
14
topMargin: units.gu(2)
15
horizontalCenter: parent.horizontalCenter
24
onClicked: formulaPush('(', '(', 'group')
29
onClicked: formulaPush(')', ')', 'group')
35
formulaView.addCurrentToMemory();
43
formulaView.addCurrentToMemory();
49
onClicked: formulaPush('7', '7', 'number')
54
onClicked: formulaPush('8', '8', 'number')
59
onClicked: formulaPush('9', '9', 'number')
64
onClicked: formulaPush('÷', '/', 'operation')
69
onClicked: formulaPush('4', '4', 'number')
74
onClicked: formulaPush('5', '5', 'number')
79
onClicked: formulaPush('6', '6', 'number')
84
onClicked: formulaPush('×', '*', 'operation')
89
onClicked: formulaPush('1', '1', 'number')
94
onClicked: formulaPush('2', '2', 'number')
99
onClicked: formulaPush('3', '3', 'number')
104
onClicked: formulaPush('+', '+', 'operation')
109
onClicked: formulaPush('0', '0', 'number')
114
onClicked: formulaPush('.', '.', 'real')
119
onClicked: formulaPop()
120
onPressAndHold: formulaReset()
125
onClicked: formulaPush('−', '-', 'operation')
135
onClicked: formulaPush('sin', 'sin', 'function')
140
onClicked: formulaPush('cos', 'cos', 'function')
145
onClicked: formulaPush('tan', 'tan', 'function')
151
if (angularUnit === 'RAD') {
154
else if (angularUnit === 'DEG') {
155
angularUnit = 'GRAD';
157
else if (angularUnit === 'GRAD') {
166
onClicked: formulaPush('asin', 'asin', 'function')
171
onClicked: formulaPush('acos', 'acos', 'function')
176
onClicked: formulaPush('atan', 'atan', 'function')
182
onClicked: formulaPush('ln', 'ln', 'function')
187
onClicked: formulaPush('√', '√', 'function')
192
onClicked: formulaPush('π', 'π', 'const')
197
onClicked: formulaPush('e', 'E', 'const')
202
onClicked: formulaPush('log', 'log', 'function')
207
onClicked: formulaPush('%', '%', 'operation')
212
onClicked: formulaPush('!', '!', 'operation')
217
onClicked: formulaPush('^', '^', 'operation')