~iamsylvie/ubuntu-keyboard/ubuntu-keyboard

« back to all changes in this revision

Viewing changes to plugins/ja/qml/Keyboard_ja_email.qml

  • Committer: CI Train Bot
  • Author(s): Mitsuya Shibata
  • Date: 2016-02-22 11:04:18 UTC
  • mfrom: (402.2.16 japanese-keyboard-rebooted)
  • Revision ID: ci-train-bot@canonical.com-20160222110418-1hn0utyw7pj0gsqf
Implement Japanese keyboard layout Fixes: #1290031
Approved by: Ken VanDine

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2015 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.4
 
18
import "keys/"
 
19
import keys 1.0
 
20
 
 
21
KeyPad {
 
22
    anchors.fill: parent
 
23
 
 
24
    content: c1
 
25
 
 
26
    Column {
 
27
        id: c1
 
28
        anchors.fill: parent
 
29
        spacing: 0
 
30
 
 
31
        Row {
 
32
            anchors.horizontalCenter: parent.horizontalCenter;
 
33
            spacing: 0
 
34
 
 
35
            UndoKey { leftSide: true; width: panel.keyWidth; }
 
36
            FlickCharKey {
 
37
                label: layout.state == "kana" ? "あ" : "@ / : _";
 
38
                leaves: layout.state == "kana" ? ["あ", "い", "う", "え", "お"] : ["@", "/", ":", "_", "1"];
 
39
                annotation: layout.state == "kana" ? "" : "1";
 
40
            }
 
41
            FlickCharKey {
 
42
                label: layout.state == "kana" ? "か" : "ABC";
 
43
                leaves: layout.state == "kana" ? ["か", "き", "く", "け", "こ"] : ["a", "b", "c", "#", "2"];
 
44
                annotation: layout.state == "kana" ? "" : "2#";
 
45
            }
 
46
            FlickCharKey {
 
47
                label: layout.state == "kana" ? "さ" : "DEF";
 
48
                leaves: layout.state == "kana" ? ["さ", "し", "す", "せ", "そ"] : ["d", "e", "f", "$", "3"];
 
49
                annotation: layout.state == "kana" ? "" : "3$";
 
50
            }
 
51
            BackspaceKey { rightSide: true; width: panel.keyWidth; }
 
52
        }
 
53
 
 
54
        Row {
 
55
            anchors.horizontalCenter: parent.horizontalCenter;
 
56
            spacing: 0
 
57
 
 
58
            CursorKey { action: "left"; }
 
59
            FlickCharKey {
 
60
                label: layout.state == "kana" ? "た" : "GHI";
 
61
                leaves: layout.state == "kana" ? ["た", "ち", "つ", "て", "と"] : ["g", "h", "i", "(", "4"];
 
62
                annotation: layout.state == "kana" ? "" : "4(";
 
63
            }
 
64
            FlickCharKey {
 
65
                label: layout.state == "kana" ? "な" : "JKL";
 
66
                leaves: layout.state == "kana" ? ["な", "に", "ぬ", "ね", "の"] : ["j", "k", "l", "\"", "5"];
 
67
                annotation: layout.state == "kana" ? "" : "5\"";
 
68
            }
 
69
            FlickCharKey {
 
70
                label: layout.state == "kana" ? "は" : "MNO";
 
71
                leaves: layout.state == "kana" ? ["は", "ひ", "ふ", "へ", "ほ"] : ["m", "n", "o", ")", "6"];
 
72
                annotation: layout.state == "kana" ? "" : "6)";
 
73
            }
 
74
            CursorKey { action: "right"; }
 
75
        }
 
76
 
 
77
        Row {
 
78
            anchors.horizontalCenter: parent.horizontalCenter;
 
79
            spacing: 0
 
80
 
 
81
            LanguageKey    { id: languageMenuButton; height: panel.keyHeight; }
 
82
            FlickCharKey {
 
83
                label: layout.state == "kana" ? "ま" : "PQRS"
 
84
                leaves: layout.state == "kana" ? ["ま", "み", "む", "め", "も"] : ["p", "q", "r", "s", "7"]
 
85
                annotation: layout.state == "kana" ? "" : "7"
 
86
            }
 
87
            FlickCharKey {
 
88
                label: layout.state == "kana" ? "や" : "TUV"
 
89
                leaves: layout.state == "kana" ? ["や", "(", "ゆ", ")", "よ"] : ["t", "u", "v", "'", "8"]
 
90
                annotation: layout.state == "kana" ? "" : "8'"
 
91
            }
 
92
            FlickCharKey {
 
93
                label: layout.state == "kana" ? "ら" : "WXYZ"
 
94
                leaves: layout.state == "kana" ? ["ら", "り", "る", "れ", "ろ"] : ["w", "x", "y", "z", "9"]
 
95
                annotation: layout.state == "kana" ? "" : "9"
 
96
            }
 
97
            ActionKey { label: "記号"; action: "symbol"; width: panel.keyWidth; }
 
98
        }
 
99
 
 
100
        Row {
 
101
            anchors.horizontalCenter: parent.horizontalCenter;
 
102
            spacing: 0
 
103
 
 
104
            KanaSwitchKey { id: layout; default_state: "alnum" }
 
105
            ModifierKey { layoutState: layout.state; }
 
106
            FlickCharKey {
 
107
                label: layout.state == "kana" ? "わ" : "- + *"
 
108
                leaves: layout.state == "kana" ? ["わ", "を", "ん", "ー"] : ["-", "+", "0", "*"];
 
109
                annotation: layout.state == "kana" ? "" : "0";
 
110
            }
 
111
            DomainKey {
 
112
                label: layout.state == "kana" ? "、。" : ". ,";
 
113
                leaves: layout.state == "kana" ? ["、", "。", "!", "?"] :
 
114
                    [".", ",", "<font size=\"1\">.com</font>", "<font size=\"1\">.jp</font>"];
 
115
                unstyledLeaves: layout.state == "kana" ? ["、", "。", "!", "?"] : [".", ",", ".com", ".jp"];
 
116
                annotation: layout.state == "kana" ? "" : ".com .jp"
 
117
            }
 
118
            CommitKey    { id: enterKey; width: panel.keyWidth; }
 
119
        }
 
120
    } // column
 
121
}