From 4d480f8f0c1ca3308f4c3a423ad30d5d44e9c1bf Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Tue, 16 Feb 2016 20:47:35 +0200 Subject: Enable new languages for handwriting recognition Note: These languages are only available with the T9 Write engine. This change adds handwriting recognition for the following languages: - Danish - German - Spanish - Finnish - French - Italian - Norwegian - Polish - Portuguese - Russian - Swedish Change-Id: I686d15bb89acc7012aaba73e271640426b73649e Reviewed-by: Rainer Keller --- .../content/layouts/da_DK/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/da_DK/main.qml | 3 + .../content/layouts/de_DE/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/de_DE/main.qml | 3 + .../content/layouts/es_ES/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/es_ES/main.qml | 3 + .../content/layouts/fi_FI/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/fi_FI/main.qml | 3 + .../content/layouts/fr_FR/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/fr_FR/main.qml | 3 + .../content/layouts/it_IT/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/it_IT/main.qml | 3 + .../content/layouts/nb_NO/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/nb_NO/main.qml | 3 + .../content/layouts/pl_PL/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/pl_PL/main.qml | 3 + .../content/layouts/pt_PT/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/pt_PT/main.qml | 3 + .../content/layouts/ru_RU/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/ru_RU/main.qml | 3 + .../content/layouts/sv_SE/handwriting.qml | 96 ++++++++++++++++++++++ src/virtualkeyboard/content/layouts/sv_SE/main.qml | 3 + src/virtualkeyboard/virtualkeyboard.pro | 22 +++++ 23 files changed, 1111 insertions(+) create mode 100644 src/virtualkeyboard/content/layouts/da_DK/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/de_DE/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/es_ES/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/it_IT/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml create mode 100644 src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml diff --git a/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/da_DK/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/da_DK/main.qml b/src/virtualkeyboard/content/layouts/da_DK/main.qml index 9bcfd0da..a18f9ec2 100644 --- a/src/virtualkeyboard/content/layouts/da_DK/main.qml +++ b/src/virtualkeyboard/content/layouts/da_DK/main.qml @@ -185,6 +185,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/de_DE/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/de_DE/main.qml b/src/virtualkeyboard/content/layouts/de_DE/main.qml index 80bace38..93cda760 100644 --- a/src/virtualkeyboard/content/layouts/de_DE/main.qml +++ b/src/virtualkeyboard/content/layouts/de_DE/main.qml @@ -180,6 +180,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml new file mode 100644 index 00000000..0bdab338 --- /dev/null +++ b/src/virtualkeyboard/content/layouts/es_ES/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.¿?¡!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/es_ES/main.qml b/src/virtualkeyboard/content/layouts/es_ES/main.qml index d3bed3b3..1826fbdc 100644 --- a/src/virtualkeyboard/content/layouts/es_ES/main.qml +++ b/src/virtualkeyboard/content/layouts/es_ES/main.qml @@ -180,6 +180,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/fi_FI/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/fi_FI/main.qml b/src/virtualkeyboard/content/layouts/fi_FI/main.qml index 274229c5..1f6fa8a3 100644 --- a/src/virtualkeyboard/content/layouts/fi_FI/main.qml +++ b/src/virtualkeyboard/content/layouts/fi_FI/main.qml @@ -179,6 +179,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/fr_FR/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/fr_FR/main.qml b/src/virtualkeyboard/content/layouts/fr_FR/main.qml index 8a568726..6534fffa 100644 --- a/src/virtualkeyboard/content/layouts/fr_FR/main.qml +++ b/src/virtualkeyboard/content/layouts/fr_FR/main.qml @@ -174,6 +174,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/it_IT/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/it_IT/main.qml b/src/virtualkeyboard/content/layouts/it_IT/main.qml index f168adcd..78a0a2e4 100644 --- a/src/virtualkeyboard/content/layouts/it_IT/main.qml +++ b/src/virtualkeyboard/content/layouts/it_IT/main.qml @@ -168,6 +168,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/nb_NO/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/nb_NO/main.qml b/src/virtualkeyboard/content/layouts/nb_NO/main.qml index 83935206..cd009976 100644 --- a/src/virtualkeyboard/content/layouts/nb_NO/main.qml +++ b/src/virtualkeyboard/content/layouts/nb_NO/main.qml @@ -185,6 +185,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/pl_PL/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/pl_PL/main.qml b/src/virtualkeyboard/content/layouts/pl_PL/main.qml index e03f8e1d..a8ebfa4c 100644 --- a/src/virtualkeyboard/content/layouts/pl_PL/main.qml +++ b/src/virtualkeyboard/content/layouts/pl_PL/main.qml @@ -172,6 +172,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/pt_PT/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/pt_PT/main.qml b/src/virtualkeyboard/content/layouts/pt_PT/main.qml index 6585f292..55369bf9 100644 --- a/src/virtualkeyboard/content/layouts/pt_PT/main.qml +++ b/src/virtualkeyboard/content/layouts/pt_PT/main.qml @@ -177,6 +177,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/ru_RU/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/ru_RU/main.qml b/src/virtualkeyboard/content/layouts/ru_RU/main.qml index f44bbdb3..9b487c57 100644 --- a/src/virtualkeyboard/content/layouts/ru_RU/main.qml +++ b/src/virtualkeyboard/content/layouts/ru_RU/main.qml @@ -183,6 +183,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml new file mode 100644 index 00000000..1a505e7e --- /dev/null +++ b/src/virtualkeyboard/content/layouts/sv_SE/handwriting.qml @@ -0,0 +1,96 @@ +/****************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Virtual Keyboard module. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Enterprise.VirtualKeyboard 2.0 + +KeyboardLayout { + function createInputMethod() { + return Qt.createQmlObject('import QtQuick 2.0; import QtQuick.Enterprise.VirtualKeyboard 2.0; HandwritingInputMethod {}', parent) + } + sharedLayouts: ['symbols'] + inputMode: InputEngine.Latin + + KeyboardRow { + Layout.preferredHeight: 3 + KeyboardColumn { + Layout.preferredWidth: bottomRow.width - hideKeyboardKey.width + KeyboardRow { + TraceInputKey { + objectName: "hwrInputArea" + patternRecognitionMode: InputEngine.HandwritingRecoginition + } + } + } + KeyboardColumn { + Layout.preferredWidth: hideKeyboardKey.width + KeyboardRow { + BackspaceKey {} + } + KeyboardRow { + EnterKey {} + } + KeyboardRow { + ShiftKey { } + } + } + } + KeyboardRow { + id: bottomRow + Layout.preferredHeight: 1 + keyWeight: 154 + Key { + weight: 217 + key: Qt.Key_Mode_switch + noKeyEvent: true + functionKey: true + text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "123" : "ABC" + onClicked: InputContext.inputEngine.inputMode = InputContext.inputEngine.inputMode === InputEngine.Latin ? InputEngine.Numeric : InputEngine.Latin + enabled: !(InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) + keyPanelDelegate: keyboard.style ? keyboard.style.symbolKeyPanel : undefined + } + ChangeLanguageKey { + weight: 154 + customLayoutsOnly: true + } + HandwritingModeKey { + weight: 154 + } + SpaceKey { + weight: 864 + } + Key { + key: Qt.Key_Apostrophe + text: "'" + alternativeKeys: "<>()#%&*/\\\"'=+-_" + } + Key { + key: Qt.Key_Period + text: "." + alternativeKeys: ":;,.?!" + } + HideKeyboardKey { + id: hideKeyboardKey + weight: 204 + } + } +} diff --git a/src/virtualkeyboard/content/layouts/sv_SE/main.qml b/src/virtualkeyboard/content/layouts/sv_SE/main.qml index 274229c5..1f6fa8a3 100644 --- a/src/virtualkeyboard/content/layouts/sv_SE/main.qml +++ b/src/virtualkeyboard/content/layouts/sv_SE/main.qml @@ -179,6 +179,9 @@ KeyboardLayout { ChangeLanguageKey { weight: 154 } + HandwritingModeKey { + weight: 154 + } SpaceKey { weight: 864 } diff --git a/src/virtualkeyboard/virtualkeyboard.pro b/src/virtualkeyboard/virtualkeyboard.pro index 515b1157..e0182777 100644 --- a/src/virtualkeyboard/virtualkeyboard.pro +++ b/src/virtualkeyboard/virtualkeyboard.pro @@ -81,16 +81,22 @@ contains(CONFIG, lang-da.*) { LAYOUT_FILES += \ content/layouts/da_DK/main.qml \ content/layouts/da_DK/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/da_DK/handwriting.qml } contains(CONFIG, lang-de.*) { LAYOUT_FILES += \ content/layouts/de_DE/main.qml \ content/layouts/de_DE/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/de_DE/handwriting.qml } contains(CONFIG, lang-es.*) { LAYOUT_FILES += \ content/layouts/es_ES/main.qml \ content/layouts/es_ES/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/es_ES/handwriting.qml } contains(CONFIG, lang-fa.*) { LAYOUT_FILES += \ @@ -103,11 +109,15 @@ contains(CONFIG, lang-fi.*) { LAYOUT_FILES += \ content/layouts/fi_FI/main.qml \ content/layouts/fi_FI/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/fi_FI/handwriting.qml } contains(CONFIG, lang-fr.*) { LAYOUT_FILES += \ content/layouts/fr_FR/main.qml \ content/layouts/fr_FR/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/fr_FR/handwriting.qml } contains(CONFIG, lang-hi.*) { LAYOUT_FILES += \ @@ -118,6 +128,8 @@ contains(CONFIG, lang-it.*) { LAYOUT_FILES += \ content/layouts/it_IT/main.qml \ content/layouts/it_IT/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/it_IT/handwriting.qml } contains(CONFIG, lang-ja.*) { LAYOUT_FILES += \ @@ -133,26 +145,36 @@ contains(CONFIG, lang-nb.*) { LAYOUT_FILES += \ content/layouts/nb_NO/main.qml \ content/layouts/nb_NO/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/nb_NO/handwriting.qml } contains(CONFIG, lang-pl.*) { LAYOUT_FILES += \ content/layouts/pl_PL/main.qml \ content/layouts/pl_PL/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/pl_PL/handwriting.qml } contains(CONFIG, lang-pt.*) { LAYOUT_FILES += \ content/layouts/pt_PT/main.qml \ content/layouts/pt_PT/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/pt_PT/handwriting.qml } contains(CONFIG, lang-ru.*) { LAYOUT_FILES += \ content/layouts/ru_RU/main.qml \ content/layouts/ru_RU/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/ru_RU/handwriting.qml } contains(CONFIG, lang-sv.*) { LAYOUT_FILES += \ content/layouts/sv_SE/main.qml \ content/layouts/sv_SE/symbols.qml +t9write: LAYOUT_FILES += \ + content/layouts/sv_SE/handwriting.qml } contains(CONFIG, lang-zh(_CN)?) { LAYOUT_FILES += \ -- cgit v1.2.3