aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/plugin.cpp
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-03-18 13:47:12 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2015-06-17 12:35:32 +0300
commit2833336e16c9991c374fbad381684cc963dde65b (patch)
treea6ea2b291473911b57f3139f29536c423c11b028 /src/virtualkeyboard/plugin.cpp
parent1d5eae310178006383a298156bdb134beffca36b (diff)
Add lipi-toolkit implementation of handwriting input method
This change adds a reference implementation of the handwriting input method. The handwriting support is enabled by adding CONFIG+=lipi-toolkit to the qmake command line. The current implementation uses alphanumeric model for handwriting recognition, which come bundled in the lipi toolkit. Change-Id: I1fcc0a0c0620dd7f9503a2a584cea0003e8a032e Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
Diffstat (limited to 'src/virtualkeyboard/plugin.cpp')
-rw-r--r--src/virtualkeyboard/plugin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/virtualkeyboard/plugin.cpp b/src/virtualkeyboard/plugin.cpp
index c1507f03..31b66481 100644
--- a/src/virtualkeyboard/plugin.cpp
+++ b/src/virtualkeyboard/plugin.cpp
@@ -33,6 +33,9 @@
#ifdef HAVE_OPENWNN
#include "openwnninputmethod.h"
#endif
+#ifdef HAVE_LIPI_TOOLKIT
+#include "lipiinputmethod.h"
+#endif
#include "declarativeinputmethod.h"
#include "declarativeselectionlistmodel.h"
#include "enterkeyaction.h"
@@ -59,6 +62,9 @@ static QObject *createInputContextModule(QQmlEngine *engine, QJSEngine *scriptEn
#ifdef HAVE_OPENWNN
<< QStringLiteral("JapaneseInputMethod")
#endif
+#ifdef HAVE_LIPI_TOOLKIT
+ << QStringLiteral("HandwritingInputMethod")
+#endif
;
rootContext->setContextProperty(QStringLiteral("VirtualKeyboardInputMethods"), inputMethodList);
return new DeclarativeInputContext(platformInputContext);
@@ -94,6 +100,9 @@ QPlatformInputContext *PlatformInputContextPlugin::create(const QString &system,
#ifdef HAVE_OPENWNN
qmlRegisterType<OpenWnnInputMethod>("QtQuick.Enterprise.VirtualKeyboard", 1, 3, "JapaneseInputMethod");
#endif
+#ifdef HAVE_LIPI_TOOLKIT
+ qmlRegisterType<LipiInputMethod>("QtQuick.Enterprise.VirtualKeyboard", 1, 4, "HandwritingInputMethod");
+#endif
qmlRegisterType<EnterKeyActionAttachedType>();
qmlRegisterType<EnterKeyAction>("QtQuick.Enterprise.VirtualKeyboard", 1, 0, "EnterKeyAction");
qmlRegisterType<DeclarativeTrace>("QtQuick.Enterprise.VirtualKeyboard", 1, 4, "Trace");