updated keyboard of Qt GUI
This commit is contained in:
parent
370df33a6c
commit
b56523fadf
@ -121,7 +121,7 @@ ApplicationWindow
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: 16
|
||||
color: "gray"
|
||||
text: {getShiftedText(parent.parent.objectName, index) + "<br><br>"}
|
||||
text: {getShiftedUpText(parent.parent.objectName, index) + "<br><br>"}
|
||||
textFormat: Text.RichText
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
@ -132,6 +132,14 @@ ApplicationWindow
|
||||
textFormat: Text.RichText
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: 16
|
||||
color: "gray"
|
||||
text: {"<br><br><br>" + getShiftedDownText(parent.parent.objectName, index)}
|
||||
textFormat: Text.RichText
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
MouseArea {
|
||||
//get row/column
|
||||
onClicked: _calculator.buttonClicked(parent.parent.objectName + "," + index)
|
||||
@ -155,18 +163,30 @@ ApplicationWindow
|
||||
return "<b>" + keys[row][col] + "</b>"
|
||||
}
|
||||
|
||||
function getShiftedText(row, col) {
|
||||
function getShiftedUpText(row, col) {
|
||||
var shifted_keys = [
|
||||
["Shift", "1/x", " √<span style=\"text-decoration: overline\">x</span> ", "CL<i>x</i>"],
|
||||
["y<sup>x</sup> ", "ln(x)", "log(x)", ""],
|
||||
["🔃", "e<sup>x</sup>", "10<sup>x</sup>", ""],
|
||||
["", "", "", ""],
|
||||
["y<sup>x</sup> ", "ln(x)", "log(x)", "π"],
|
||||
["R▼", "e<sup>x</sup>", "10<sup>x</sup>", ""],
|
||||
["sin", "cos", "tan", "►rad"],
|
||||
["off", "STO", "RCL", "LAST<i>x</i>"]
|
||||
]
|
||||
|
||||
return "<small>" + shifted_keys[row][col] + "</small>"
|
||||
}
|
||||
|
||||
function getShiftedDownText(row, col) {
|
||||
var shifted_keys = [
|
||||
["", "", "", ""],
|
||||
["", "", "", ""],
|
||||
["R▲", "", "", ""],
|
||||
["", "", "tan<sup>−1</sup>", "►deg"],
|
||||
["", "", "", ""]
|
||||
]
|
||||
|
||||
return "<small>" + shifted_keys[row][col] + "</small>"
|
||||
}
|
||||
|
||||
function getBackgroundColor(row, col) {
|
||||
var background_color = [
|
||||
["white", "white", "white", "#ff9494"],
|
||||
|
Loading…
Reference in New Issue
Block a user