Skip to content

Commit

Permalink
Added symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
mireq committed Oct 19, 2014
1 parent 8e538eb commit a46bc65
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 1 deletion.
8 changes: 8 additions & 0 deletions examples/notepad/keyboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ Item {
id: symbols
anchors.fill: parent
onStandardModeSwitched: keyboard.mode = standard
onSymbolsModeSwitched: keyboard.mode = symbols2
}

Symbols2 {
id: symbols2
anchors.fill: parent
onStandardModeSwitched: keyboard.mode = standard
onSymbolsModeSwitched: keyboard.mode = symbols
}
}

Expand Down
9 changes: 9 additions & 0 deletions qml/keyboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ Item {
anchors.fill: parent
anchors.topMargin: 11
onStandardModeSwitched: keyboard.mode = standard
onSymbolsModeSwitched: keyboard.mode = symbols2
}

Symbols2 {
id: symbols2
anchors.fill: parent
anchors.topMargin: 11
onStandardModeSwitched: keyboard.mode = standard
onSymbolsModeSwitched: keyboard.mode = symbols
}
}

Expand Down
37 changes: 36 additions & 1 deletion qml/modes/Symbols.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ import ".."

Mode {
signal standardModeSwitched
signal symbolsModeSwitched

Btn { col: 0; row: 0; label: "Q"; onTriggered: standardModeSwitched() }
Btn { col: 0; row: 0; label: "1"; symbols: ["1"] }
Btn { col: 2; row: 0; label: "2"; symbols: ["2"] }
Btn { col: 4; row: 0; label: "3"; symbols: ["3"] }
Btn { col: 6; row: 0; label: "4"; symbols: ["4"] }
Btn { col: 8; row: 0; label: "5"; symbols: ["5"] }
Btn { col: 10; row: 0; label: "6"; symbols: ["6"] }
Btn { col: 12; row: 0; label: "7"; symbols: ["7"] }
Btn { col: 14; row: 0; label: "8"; symbols: ["8"] }
Btn { col: 16; row: 0; label: "9"; symbols: ["9"] }
Btn { col: 18; row: 0; label: "0"; symbols: ["0"] }

Btn { col: 0; row: 2; label: "-"; symbols: ["-"] }
Btn { col: 2; row: 2; label: "/"; symbols: ["/"] }
Btn { col: 4; row: 2; label: ":"; symbols: [":"] }
Btn { col: 6; row: 2; label: ";"; symbols: [";"] }
Btn { col: 8; row: 2; label: "("; symbols: ["("] }
Btn { col: 10; row: 2; label: ")"; symbols: [")"] }
Btn { col: 12; row: 2; label: ""; symbols: [""] }
Btn { col: 14; row: 2; label: "&"; symbols: ["&"] }
Btn { col: 16; row: 2; label: "@"; symbols: ["@"] }
Btn { col: 18; row: 2; label: ""; hasPreview: false; symbols: ["\x7f"] }

Btn { col: 0; row: 4; GridLayout.colSpan: 4; label: "#<"; hasPreview: false; onTriggered: symbolsModeSwitched(); }
Btn { col: 4; row: 4; label: "\""; symbols: ["\""] }
Btn { col: 6; row: 4; label: "'"; symbols: ["'"] }
Btn { col: 8; row: 4; label: "."; symbols: ["."] }
Btn { col: 10; row: 4; label: ","; symbols: [","] }
Btn { col: 12; row: 4; label: "?"; symbols: ["?"] }
Btn { col: 14; row: 4; label: "!"; symbols: ["!"] }
Btn { col: 16; row: 4; label: "*"; symbols: ["*"] }
Btn { col: 18; row: 4; label: "%"; symbols: ["%"] }

Btn { col: 0; row: 6; GridLayout.colSpan: 5; label: "ABC"; onTriggered: standardModeSwitched(); hasPreview: false }
Btn { col: 5; row: 6; GridLayout.colSpan: 10; label: "Space"; hasPreview: false; symbols: " " }
Btn { col: 15; row: 6; GridLayout.colSpan: 5; label: ""; hasPreview: false; symbols: "\n" }
}
44 changes: 44 additions & 0 deletions qml/modes/Symbols2.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import QtQuick 2.0
import QuickKeyboard 1.0
import ".."

Mode {
signal standardModeSwitched
signal symbolsModeSwitched

Btn { col: 0; row: 0; label: "~"; symbols: ["~"] }
Btn { col: 2; row: 0; label: "$"; symbols: ["$"] }
Btn { col: 4; row: 0; label: "£"; symbols: ["£"] }
Btn { col: 6; row: 0; label: "¥"; symbols: ["¥"] }
Btn { col: 8; row: 0; label: "§"; symbols: ["§"] }
Btn { col: 10; row: 0; label: "&"; symbols: ["&"] }
Btn { col: 12; row: 0; label: "@"; symbols: ["@"] }
Btn { col: 14; row: 0; label: "©"; symbols: ["©"] }
Btn { col: 16; row: 0; label: "®"; symbols: ["®"] }
Btn { col: 18; row: 0; label: "°"; symbols: ["°"] }

Btn { col: 0; row: 2; label: "="; symbols: ["="] }
Btn { col: 2; row: 2; label: "#"; symbols: ["#"] }
Btn { col: 4; row: 2; label: "|"; symbols: ["|"] }
Btn { col: 6; row: 2; label: "_"; symbols: ["_"] }
Btn { col: 8; row: 2; label: "+"; symbols: ["+"] }
Btn { col: 10; row: 2; label: "-"; symbols: ["-"] }
Btn { col: 12; row: 2; label: "/"; symbols: ["/"] }
Btn { col: 14; row: 2; label: "*"; symbols: ["*"] }
Btn { col: 16; row: 2; label: "%"; symbols: ["%"] }
Btn { col: 18; row: 2; label: ""; hasPreview: false; symbols: ["\x7f"] }

Btn { col: 0; row: 4; GridLayout.colSpan: 4; label: "12"; hasPreview: false; onTriggered: symbolsModeSwitched(); }
Btn { col: 4; row: 4; label: "("; symbols: ["("] }
Btn { col: 6; row: 4; label: ")"; symbols: [")"] }
Btn { col: 8; row: 4; label: "["; symbols: ["["] }
Btn { col: 10; row: 4; label: "]"; symbols: ["]"] }
Btn { col: 12; row: 4; label: "{"; symbols: ["{"] }
Btn { col: 14; row: 4; label: "}"; symbols: ["}"] }
Btn { col: 16; row: 4; label: "<"; symbols: ["<"] }
Btn { col: 18; row: 4; label: ">"; symbols: [">"] }

Btn { col: 0; row: 6; GridLayout.colSpan: 5; label: "ABC"; onTriggered: standardModeSwitched(); hasPreview: false }
Btn { col: 5; row: 6; GridLayout.colSpan: 10; label: "Space"; hasPreview: false; symbols: " " }
Btn { col: 15; row: 6; GridLayout.colSpan: 5; label: ""; hasPreview: false; symbols: "\n" }
}
1 change: 1 addition & 0 deletions src/plugin/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<file alias="quickkeyboard/BtnPreview.qml">../../qml/BtnPreview.qml</file>
<file alias="quickkeyboard/modes/Standard.qml">../../qml/modes/Standard.qml</file>
<file alias="quickkeyboard/modes/Symbols.qml">../../qml/modes/Symbols.qml</file>
<file alias="quickkeyboard/modes/Symbols2.qml">../../qml/modes/Symbols2.qml</file>
<file alias="gfx/quickkeyboard/bg.jpg">../../gfx/bg.jpg</file>
<file alias="gfx/quickkeyboard/keyboard_bg.png">../../gfx/keyboard_bg.png</file>
<file alias="gfx/quickkeyboard/panel_bg.png">../../gfx/panel_bg.png</file>
Expand Down

0 comments on commit a46bc65

Please sign in to comment.