aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/hangulinputmethod.h
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-01-21 13:24:59 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-02-10 15:01:35 +0200
commit58c999d768810a119178af9acff80767ce096bbd (patch)
treec72f57aae8149def70d9b5efc4de77a8c9327909 /src/virtualkeyboard/hangulinputmethod.h
parentd2fad29c0493a3b04bb52fc9722eddb56957254a (diff)
Add HangulInputMethod for Korean language
This change adds support for Korean language. The keyboard layout is based on the standard Dubeolsik keyboard layout. The keyboard layout uses the Hangul Compatibility Jamo 3130-318F as the input characters. The Hangul composition and decomposition is implemented in the Hangul support class, and has the following key features: - Automatic detection of initial, medial and final Jamos based on the current syllable - Handles any Unicode input sequences, not just Hangul - Splitting and joining of double medial and double final Jamos - Splitting of double final consonant and joining with following vowel Added test cases that should cover most of the special cases in Hangul input. Change-Id: I5a6870407097bd1ce79bd2d00f81a30bd35a2f91 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/hangulinputmethod.h')
-rw-r--r--src/virtualkeyboard/hangulinputmethod.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/virtualkeyboard/hangulinputmethod.h b/src/virtualkeyboard/hangulinputmethod.h
new file mode 100644
index 00000000..accb33bf
--- /dev/null
+++ b/src/virtualkeyboard/hangulinputmethod.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://www.qt.io
+**
+** This file is part of the Qt Virtual Keyboard add-on for Qt Enterprise.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://www.qt.io
+**
+****************************************************************************/
+
+#ifndef HANGULINPUTMETHOD_H
+#define HANGULINPUTMETHOD_H
+
+#include "abstractinputmethod.h"
+
+class HangulInputMethodPrivate;
+
+class HangulInputMethod : public AbstractInputMethod
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(HangulInputMethod)
+public:
+ explicit HangulInputMethod(QObject *parent = 0);
+ ~HangulInputMethod();
+
+ QList<DeclarativeInputEngine::InputMode> inputModes(const QString &locale);
+ bool setInputMode(const QString &locale, DeclarativeInputEngine::InputMode inputMode);
+ bool setTextCase(DeclarativeInputEngine::TextCase textCase);
+
+ bool keyEvent(Qt::Key key, const QString &text, Qt::KeyboardModifiers modifiers);
+
+ void reset();
+ void update();
+};
+
+#endif // HANGULINPUTMETHOD_H