aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-06-11 20:02:46 +0300
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2018-08-06 08:20:46 +0000
commitdadbe3cd2eccbd15ee9d611c9cd8a132227c39a1 (patch)
tree9c5da79cbe6540dd594cef5d24ab3d355f781612 /src
parent59208edaaf40be982904a6c8cad4eab2d14f938e (diff)
Doc: Add C++ API for the extension plugins
Needed for the new virtualkeyboard module, which will expose C++ interface to the virtual keyboard extension plugins. This change contains also some improvements to the existing documentation, mainly to the Techical Guide. Task-number: QTBUG-57602 Change-Id: I85194e205479deab0535f14867464b4d2ab15b89 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/virtualkeyboard/abstractinputmethod.cpp3
-rw-r--r--src/virtualkeyboard/abstractinputpanel.cpp2
-rw-r--r--src/virtualkeyboard/doc/QtVirtualKeyboard_pch.h37
-rw-r--r--src/virtualkeyboard/doc/doc.pri1
-rw-r--r--src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf35
-rw-r--r--src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc1
-rw-r--r--src/virtualkeyboard/doc/src/qtvirtualkeyboard-module-cpp.qdoc5
-rw-r--r--src/virtualkeyboard/doc/src/technical-guide.qdoc241
-rw-r--r--src/virtualkeyboard/inputcontext.cpp2
-rw-r--r--src/virtualkeyboard/inputengine.cpp2
-rw-r--r--src/virtualkeyboard/qvirtualkeyboardextensionplugin.cpp25
-rw-r--r--src/virtualkeyboard/selectionlistmodel.cpp2
-rw-r--r--src/virtualkeyboard/shifthandler.cpp4
-rw-r--r--src/virtualkeyboard/trace.cpp3
14 files changed, 235 insertions, 128 deletions
diff --git a/src/virtualkeyboard/abstractinputmethod.cpp b/src/virtualkeyboard/abstractinputmethod.cpp
index dd376058..eaf04d67 100644
--- a/src/virtualkeyboard/abstractinputmethod.cpp
+++ b/src/virtualkeyboard/abstractinputmethod.cpp
@@ -53,9 +53,8 @@ AbstractInputMethodPrivate::AbstractInputMethodPrivate() :
/*!
\class QtVirtualKeyboard::AbstractInputMethod
- \internal
- \inmodule qtvirtualkeyboard
+ \inmodule QtVirtualKeyboard
\brief The base class for input methods.
diff --git a/src/virtualkeyboard/abstractinputpanel.cpp b/src/virtualkeyboard/abstractinputpanel.cpp
index cfcff964..b4854e26 100644
--- a/src/virtualkeyboard/abstractinputpanel.cpp
+++ b/src/virtualkeyboard/abstractinputpanel.cpp
@@ -36,7 +36,7 @@ namespace QtVirtualKeyboard {
/*!
\class QtVirtualKeyboard::AbstractInputPanel
\internal
- \inmodule qtvirtualkeyboard
+ \inmodule QtVirtualKeyboard
\brief Base class for an input panel.
diff --git a/src/virtualkeyboard/doc/QtVirtualKeyboard_pch.h b/src/virtualkeyboard/doc/QtVirtualKeyboard_pch.h
deleted file mode 100644
index 298f0f60..00000000
--- a/src/virtualkeyboard/doc/QtVirtualKeyboard_pch.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Virtual Keyboard module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifdef Q_CLANG_QDOC
-#include "abstractinputmethod.h"
-#include "abstractinputpanel.h"
-#include "inputcontext.h"
-#include "inputengine.h"
-#include "selectionlistmodel.h"
-#include "shifthandler.h"
-#endif // Q_CLANG_QDOC
diff --git a/src/virtualkeyboard/doc/doc.pri b/src/virtualkeyboard/doc/doc.pri
index 9fb8fcf3..4da77d1f 100644
--- a/src/virtualkeyboard/doc/doc.pri
+++ b/src/virtualkeyboard/doc/doc.pri
@@ -3,5 +3,6 @@ OTHER_FILES += \
$$PWD/src/qtvirtualkeyboard-index.qdoc \
$$PWD/src/deployment-guide.qdoc \
$$PWD/src/technical-guide.qdoc \
+ $$PWD/src/user-guide.qdoc \
$$PWD/src/build.qdoc \
$$PWD/src/snippets/CustomInputMethod.qml
diff --git a/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf b/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
index 71697785..60a364d8 100644
--- a/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
+++ b/src/virtualkeyboard/doc/qtvirtualkeyboard.qdocconf
@@ -5,26 +5,29 @@ description = Qt Virtual Keyboard
version = $QT_VERSION
# Custom module header passed to clang
-moduleheader = QtVirtualKeyboard_pch.h
-
-# Additional include paths passed to clang
-includepaths = -I .
+moduleheader = QtVirtualKeyboard.h
headerdirs += ..
-sourcedirs += ..
-excludedirs += ../content/layouts \
- ../3rdparty
+sourcedirs += .. ../../styles/
+excludedirs += ../content/layouts
+excludefiles += "*_p.h"
# Specify the install path under QT_INSTALL_EXAMPLES
exampledirs += ../../../examples/virtualkeyboard \
snippets
examplesinstallpath = virtualkeyboard
+Cpp.ignoretokens += \
+ QVIRTUALKEYBOARD_EXPORT
+Cpp.ignoredirectives += \
+ Q_DECLARE_LOGGING_CATEGORY \
+ VIRTUALKEYBOARD_DEBUG
+
manifestmeta.highlighted.names = "QtVirtualKeyboard/Qt Quick Virtual Keyboard - Basic Example"
imagedirs += images
-depends += qtdoc qtcore qtgui qtqml qtquick
+depends += qtdoc qtcore qtgui qtqml qtquick qtquickcontrols2
qhp.projects = QtVirtualKeyboard
@@ -38,23 +41,23 @@ qhp.QtVirtualKeyboard.filterAttributes = qtvirtualkeyboard $QT_
qhp.QtVirtualKeyboard.customFilters.Qt.name = QtVirtualKeyboard $QT_VERSION
qhp.QtVirtualKeyboard.customFilters.Qt.filterAttributes = qtvirtualkeyboard $QT_VERSION
-qhp.QtVirtualKeyboard.subprojects = qmltypes examples # classes
+qhp.QtVirtualKeyboard.subprojects = classes qmltypes examples
-# qhp.QtVirtualKeyboard.subprojects.classes.title = C++ Classes
-# qhp.QtVirtualKeyboard.subprojects.classes.indexTitle = Qt Virtual Keyboard C++ Classes
-# qhp.QtVirtualKeyboard.subprojects.classes.selectors = class
-# qhp.QtVirtualKeyboard.subprojects.classes.sortPages = true
+qhp.QtVirtualKeyboard.subprojects.classes.title = C++ Classes
+qhp.QtVirtualKeyboard.subprojects.classes.indexTitle = Qt Virtual Keyboard C++ Classes
+qhp.QtVirtualKeyboard.subprojects.classes.selectors = class doc:headerfile
+qhp.QtVirtualKeyboard.subprojects.classes.sortPages = true
qhp.QtVirtualKeyboard.subprojects.qmltypes.title = QML Types
qhp.QtVirtualKeyboard.subprojects.qmltypes.indexTitle = Qt Virtual Keyboard QML Types
-qhp.QtVirtualKeyboard.subprojects.qmltypes.selectors = fake:qmlclass
+qhp.QtVirtualKeyboard.subprojects.qmltypes.selectors = qmlclass
qhp.QtVirtualKeyboard.subprojects.qmltypes.sortPages = true
qhp.QtVirtualKeyboard.subprojects.examples.title = Examples
qhp.QtVirtualKeyboard.subprojects.examples.indexTitle = Qt Virtual Keyboard Examples
-qhp.QtVirtualKeyboard.subprojects.examples.selectors = fake:example
+qhp.QtVirtualKeyboard.subprojects.examples.selectors = doc:example
qhp.QtVirtualKeyboard.subprojects.examples.sortPages = true
navigation.landingpage = "Qt Virtual Keyboard"
navigation.qmltypespage = "Qt Virtual Keyboard QML Types"
-# navigation.cppclassespage = "Qt Virtual Keyboard C++ Classes"
+navigation.cppclassespage = "Qt Virtual Keyboard C++ Classes"
diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
index 35eb60b1..9f3a2f0d 100644
--- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
+++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-index.qdoc
@@ -75,6 +75,7 @@
\list
\li \l{Qt Virtual Keyboard QML Types}{QML Types}
+ \li \l{Qt Virtual Keyboard C++ Classes}{C++ Classes}
\endlist
\section1 Examples
diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-module-cpp.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-module-cpp.qdoc
index a0514fe9..eeb62dac 100644
--- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-module-cpp.qdoc
+++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-module-cpp.qdoc
@@ -30,14 +30,13 @@
\title Qt Virtual Keyboard C++ Classes
\brief Provides classes to implement input methods for virtual keyboards.
- \internal
-
+ \ingroup modules
\qtvariable virtualkeyboard
To include the definitions of the module's classes, use the following directive:
\code
- #include <QVirtualKeyboard>
+ #include <QtVirtualKeyboard>
\endcode
To link against the module, add this line to your qmake .pro file:
diff --git a/src/virtualkeyboard/doc/src/technical-guide.qdoc b/src/virtualkeyboard/doc/src/technical-guide.qdoc
index 37c0f790..2165d446 100644
--- a/src/virtualkeyboard/doc/src/technical-guide.qdoc
+++ b/src/virtualkeyboard/doc/src/technical-guide.qdoc
@@ -44,21 +44,30 @@ These interfaces allow the plugin to be used as a platform input
context plugin in Qt 5 applications.
The plugin itself provides an input framework supporting multiple
-input methods as well as a QML UI for the virtual keyboard.
+input methods as well as a QML UI for the virtual keyboard. The input
+framework is extensible through a plugin interface, which allows third-party
+input methods and keyboard layouts to be loaded at runtime.
The input framework provides the following main interfaces:
\list
\li InputContext: provides contextual information for the virtual keyboard
- and other input components.
+ and other input components. Acts as an interface to the underlying
+ text input component.
\li InputEngine: exposes an API to integrate user input events (key
presses, etc.) and acts as a host for input methods.
- \li InputMethod: a base type for QML based input methods.
+ \li InputMethod: a base type for QML-based input methods. The input method
+ usually handles key events, but can also handle mouse and touch input
+ events.
+ \li QVirtualKeyboardExtensionPlugin: a plugin interface for virtual keyboard
+ extensions that provide additional functionality.
\endlist
-\section1 The Input Context
+\section1 Input Context
-The input context is used by the keyboard as well as concrete input methods.
+The input context is used by the keyboard as well as concrete input methods. InputContext
+is a singleton instance hosted by QML. An application should not directly interact with
+the input context.
\section2 Contextual Information
@@ -104,19 +113,14 @@ information through the QInputMethod interface.
Internally, the current input locale is also updated to the InputEngine
and the current InputMethod instances.
-\section2 UI Animations
-
-The keyboard should notify the input context about UI transitions and
-animations. The InputContext::animating property sets the animating property of
-the input context.
+\section1 Input Engine
-\section1 The Input Engine
+The input engine object is owned by InputContext. Like the InputContext, there is
+only one instance of the InputEngine. The input engine contains API functions which
+the keyboard uses to map user interactions, such as key press and release events,
+to the input method.
-The input engine object is owned by InputContext. The input engine contains
-API functions which the keyboard can use to map user interactions such as key
-press and key release events.
-
-The input events are mapped through the following methods:
+For example, virtual keyboard key events are mapped through the following methods:
\list
\li InputEngine::virtualKeyPress
@@ -129,21 +133,137 @@ the methods are not suitable for mapping the physical keystrokes. This is a
consequence of the fact that the actual action is performed only when the key
is released.
-If the user releases the key without having to perform the actual action, the
-key can be interrupted by using the InputEngine::virtualKeyCancel method.
+If the key press is interrupted before the key release event, the keyboard invokes
+the InputEngine::virtualKeyCancel method.
+
+\section2 Input Method
+
+The input method is a concrete implementation of the keypress handler. It's main
+function is to handle keypress events and maintain state information for the
+user input. It interacts with the text editor through \l InputContext via
+pre-edit text or key events.
+
+The input method instance can be created in various ways, depending on the use
+case:
+
+\list
+ \li \c {KeyboardLayout::inputMethod}: the keyboard layout can create an input method
+ instance solely for this keyboard layout. It should be noted that this
+ instance will be destroyed when the keyboard layout changes. Therefore,
+ this method is usually limited to very narrow use cases.
+ \li \c {KeyboardLayout::createInputMethod()}: the keyboard layout can dynamically
+ create an input method that can be used with this layout and also with the
+ \l {KeyboardLayout::sharedLayouts} {shared layouts} (e.g. symbol layout).
+ This is the preferred way for creating specialized input methods, such as
+ those involving complex languages or handwriting.
+ \li \c {DefaultInputMethod}: the virtual keyboard attempts to create this type of
+ input method at startup. This instance will be used as the default input
+ method across all keyboard layouts, unless the keyboard layout uses a
+ custom input method. This instance outlives keyboard layout changes across
+ languages and is the preferred way of creating and overriding the default
+ input method.
+\endlist
-\section2 Activating an Input Method
+\section1 Virtual Keyboard Extension Plugin
-Activating an input method is straightforward. The required steps are:
+An extension plugin allows third-party providers to enhance the functionality
+of the virtual keyboard without recompiling it. Currently the extension plugin
+can provide keyboard layouts and custom input methods. Creating a plugin for
+Qt Virtual Keyboard is similar to the standard way of creating a Qt plugin:
\list
- \li Instantiate a concrete implementation of InputMethod
- \li Assign the instance to InputEngine::inputMethod
- \li Set the proper input mode with InputEngine::inputMode
+ \li \b {Link against the virtualkeyboard library}.
+
+ The virtualkeyboard module must be linked against the plugin:
+
+ \badcode
+ QT += virtualkeyboard
+ \endcode
+
+ This allows the plugin to access \l InputContext and other interfaces.
+ \li \b {Implement a subclass of QVirtualKeyboardExtensionPlugin.}
+
+ The plugin provides the virtual keyboard with the necessary metadata,
+ which allows it to sort and load the plugins.
\endlist
-When the input method is active, it receives key events from the input engine
-and can produce text.
+\section2 Adding Keyboard Layouts
+
+The plugin can add keyboard layouts for the virtual keyboard by including
+the layout files in the Qt resources of the plugin binary.
+
+The virtual keyboard searches for the keyboard layouts (per language) from a specific
+path \e /QtQuick/VirtualKeyboard/content/layouts/<language_COUNTRY>, so it is essential
+to use this exact path also in the plugin. Qt resource paths can be overlapped, however,
+the plugin cannot override the existing layouts in the virtual keyboard plugin.
+
+If the extension plugin needs to override the built-in keyboard layout, the virtual
+keyboard must be recompiled with only specific languages (e.g. \e CONFIG+=lang-en) or without
+keyboard layouts at (e.g. \e CONFIG+=disable-layouts). Alternatively, if recompiling is not an
+option, it is possible to override the built-in keyboard layouts and have them loaded directly
+from the file system by using the \e QT_VIRTUALKEYBOARD_LAYOUT_PATH environment variable.
+
+\section2 Adding Input Method
+
+The plugin can register an input method that other keyboard layouts can use by
+default (such as \c DefaultInputMethod) or an input method that is used privately
+in the plugin.
+
+The input method must implement \l {QtVirtualKeyboard::AbstractInputMethod} {AbstractInputMethod} (C++) or InputMethod (QML)
+interface and the plugin must register it as a QML type in
+{QVirtualKeyboardExtensionPlugin::registerTypes} method.
+
+\section2 Metadata for the Extension Plugin
+
+Metadata allows the virtual keyboard to inspect the plugin before loading
+the actual library. It also prevents the virtual keyboard from loading
+conflicting extension plugins, for example, two handwriting extensions.
+
+\table
+ \row
+ \li \c Name
+ \li \c Required
+ \li This field defines the plugin name. There are several built-in
+ plugins available by default:
+
+ \list
+ \li \c hangul
+ \li \c default (Hunspell)
+ \li \c handwriting (T9 Write, Lipi-Toolkit)
+ \li \c japanese (OpenWNN)
+ \li \c pinyin
+ \li \c traditional_chinese
+ \endlist
+ \row
+ \li \c Provider
+ \li \c Optional
+ \li An informative name of the plugin provider. Used mainly for diagnostics.
+ \row
+ \li \c InputMethod
+ \li \c Optional
+ \li This field tells the virtual keyboard the plugin contains an input method.
+ When this field is defined, the virtual keyboard will invoke the
+ \l {QVirtualKeyboardExtensionPlugin::registerTypes} {interface}
+ for registering the QML types.
+ Similar to the \c Name, there can be only one provider for each input method.
+ \row
+ \li \c Version
+ \li \c Required
+ \li An integer defining the version number of the plugin. If there are two or more
+ plugins available of the same \c Name, the one with greatest version number is
+ preferred.
+\endtable
+
+The following metadata example is from the Lipi-Toolkit extension plugin (lipi.json):
+
+\badcode
+{
+ "Name": "handwriting",
+ "Provider": "Qt Lipi-Toolkit Extension",
+ "InputMethod": "HandwritingInputMethod",
+ "Version": 100
+}
+\endcode
\section1 Implementing a Custom Input Method
@@ -170,7 +290,7 @@ InputMethod::update() is called when the input context is updated and
the input state is possibly out of sync. The input method should commit
the current text.
-The keystorke events are handled in InputMethod::keyEvent(). This method handles
+The keystroke events are handled in InputMethod::keyEvent(). This method handles
a single keystroke event and returns \c true if the event was processed.
Otherwise the keystroke is handled by the default input method.
@@ -274,42 +394,45 @@ InputEngine::wordCandidateListModel property.
\section1 Integrating Handwriting Recognition
Since version 2.0 of the virtual keyboard, input methods can consume
-touch input data from touch screens or other input devices.
-
-Handwriting recognition works on the same principle as handling of
-normal keyboard input, i.e. input data is collected by the keyboard layout
-and transferred by the input engine to the input method for further processing.
-
-In case of a regular keyboard, the amount of data transferred from the keyboard
-to input method is minimal (namely the keycode and text), but in the case of
-handwriting recognition the data volume is much bigger. Therefore, the touch
-input is stored in a particular data model.
-
-The input method does not participate in the actual collection of touch data.
-However, the input method has full control over touch input since it can
-either accept or reject touch. This allows for precise control over how many
-fingers can be used simultaneously.
-
-The input method can collect as many traces as it deems necessary and begin
-processing them at will. The processing can even be performed in parallel with
-the touch input, although it is not recommended because of the potential side
-effects. A recommended way is to start processing in a background thread
-after a suitable delay, so that it does not negatively affect the performance
-of the user interface.
-
-\section2 Data Model for the Handwriting Input
-
-The data collected from the input source is stored in an object named Trace (C++) or \l Trace (QML).
-
-By definition, \e trace is a set of data collected in one touch. In addition to
-the basic coordinate data, it can also include other types of data, such as
-the time of each data point. The input method can define the desired input channels
-at the beginning of a touch event.
+touch input data from touch screens or other input devices. This allows
+integration of a handwriting recognition engine seamlessly to the virtual
+keyboard, without any changes to the existing keyboard layouts (as
+the virtual keyboard already provides the handwriting keyboard layouts for
+most languages).
+
+Towards an input method, handwriting recognition works on the same principle
+as handling of normal keyboard input, i.e. input data is collected by the
+keyboard layout and transferred by the input engine to the input method for
+processing.
+
+\section2 Data Model for Handwriting Input
+
+Virtual keyboard collects the handwriting data in a special data model Trace.
+Each trace represents a collection of data sampled from one touch (e.g.
+a swipe on the screen). There will be as many instances of Trace as there are
+touches on the handwriting input area.
+
+By definition, \e trace is a set of data sampled from one touch. In addition to
+the basic point data, it can also include other types of data, such as
+the time of each point. The input method can define the desired input channels
+in the beginning of a trace event.
+
+The input method does not participate in the actual collection of trace data.
+However, the input method has full control over the input since it can
+either accept or reject a Trace (e.g. if there are too many instances to handle).
+This also allows for precise control over how many fingers can be used simultaneously.
+
+The input method can collect as many traces as it sees fit and it can begin
+processing them when necessary. The processing can even be performed in parallel while
+sampling the data, although it is not recommended because of the potential performance
+issues. The recommended way is to start processing in a background thread
+after a suitable delay from the last input, so that the processing does not affect
+negatively to the user interface.
\section2 Trace API for Input Methods
The trace API consists of the following virtual methods, which the input method
-must implement in order to receive and process touch input data.
+must implement in order to receive and process trace input data.
\list
\li \l { AbstractInputMethod::patternRecognitionModes } { patternRecognitionModes }
@@ -318,7 +441,7 @@ must implement in order to receive and process touch input data.
\endlist
By implementing these methods, the input method can receive and process data
-from a variety of input sources.
+from a variety of input sources (e.g. keyboard layout or full screen).
The patternRecognitionModes method returns a list of pattern recognition modes,
which are supported by the input method. A pattern recognition mode, such as
diff --git a/src/virtualkeyboard/inputcontext.cpp b/src/virtualkeyboard/inputcontext.cpp
index 9febf669..33724104 100644
--- a/src/virtualkeyboard/inputcontext.cpp
+++ b/src/virtualkeyboard/inputcontext.cpp
@@ -55,7 +55,6 @@ bool operator==(const QInputMethodEvent::Attribute &attribute1, const QInputMeth
\inmodule QtVirtualKeyboard
\brief Namespace for the Qt Virtual Keyboard C++ API.
- \internal
*/
namespace QtVirtualKeyboard {
@@ -152,7 +151,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(InputContextPrivate::StateFlags)
\class QtVirtualKeyboard::InputContext
\inmodule QtVirtualKeyboard
\brief Provides access to an input context.
- \internal
*/
/*!
diff --git a/src/virtualkeyboard/inputengine.cpp b/src/virtualkeyboard/inputengine.cpp
index d6190337..429ca92a 100644
--- a/src/virtualkeyboard/inputengine.cpp
+++ b/src/virtualkeyboard/inputengine.cpp
@@ -137,8 +137,6 @@ private:
\brief The InputEngine class provides an input engine
that supports C++ and QML integration.
- \internal
-
The input engine is responsible for routing input events to input
methods. The actual input logic is implemented by the input methods.
diff --git a/src/virtualkeyboard/qvirtualkeyboardextensionplugin.cpp b/src/virtualkeyboard/qvirtualkeyboardextensionplugin.cpp
index 929c86ab..8eef200f 100644
--- a/src/virtualkeyboard/qvirtualkeyboardextensionplugin.cpp
+++ b/src/virtualkeyboard/qvirtualkeyboardextensionplugin.cpp
@@ -31,10 +31,35 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class QVirtualKeyboardExtensionPlugin
+ \inmodule QtVirtualKeyboard
+ \brief Extension plugin for the Qt Virtual Keyboard.
+
+ Extension plugin allows customizing and extending the Qt Virtual Keyboard
+ functionality. Extension plugin can provide additional keyboard layouts and
+ input methods.
+
+ Virtual keyboard loads all the extension plugins at startup. It searches for
+ \c plugins/virtualkeyboard directory and matches the metadata found in the
+ plugin. If there are two or more extension plugins with the same \c Name, it
+ loads the one with the highest \c Version number.
+
+ \sa {Virtual Keyboard Extension Plugin}
+*/
+
QVirtualKeyboardExtensionPlugin::~QVirtualKeyboardExtensionPlugin()
{
}
+/*!
+ If the plugin metadata contains \c InputMethod field defining an input method
+ name, Qt Virtual Keyboard will call registerTypes() for registering the input
+ method as QML type. The type must be registered with a \a uri if the input method
+ is used by the default keyboard layouts. If the input method type is only used in
+ private layouts (known only by the plugin), the uri can be omitted and chosen
+ freely.
+*/
void QVirtualKeyboardExtensionPlugin::registerTypes(const char *uri) const
{
Q_UNUSED(uri)
diff --git a/src/virtualkeyboard/selectionlistmodel.cpp b/src/virtualkeyboard/selectionlistmodel.cpp
index 97a2c50b..30b288a2 100644
--- a/src/virtualkeyboard/selectionlistmodel.cpp
+++ b/src/virtualkeyboard/selectionlistmodel.cpp
@@ -92,8 +92,6 @@ public:
\brief List model for selection lists.
- \internal
-
This class acts as a bridge between the UI and the
input method that provides the data for selection
lists.
diff --git a/src/virtualkeyboard/shifthandler.cpp b/src/virtualkeyboard/shifthandler.cpp
index 96b73ba4..510dc3ae 100644
--- a/src/virtualkeyboard/shifthandler.cpp
+++ b/src/virtualkeyboard/shifthandler.cpp
@@ -81,10 +81,9 @@ public:
/*!
\class QtVirtualKeyboard::ShiftHandler
+ \internal
\inmodule QtVirtualKeyboard
\brief Manages the shift state.
-
- \internal
*/
ShiftHandler::ShiftHandler(InputContext *parent) :
@@ -197,6 +196,7 @@ void ShiftHandler::toggleShift()
}
/*! Clears the toggle shift timer.
+ \internal
*/
void ShiftHandler::clearToggleShiftTimer()
diff --git a/src/virtualkeyboard/trace.cpp b/src/virtualkeyboard/trace.cpp
index 47cc06ce..057ab838 100644
--- a/src/virtualkeyboard/trace.cpp
+++ b/src/virtualkeyboard/trace.cpp
@@ -52,10 +52,9 @@ public:
/*!
\class QtVirtualKeyboard::Trace
- \inmodule qtvirtualkeyboard
+ \inmodule QtVirtualKeyboard
\since QtQuick.VirtualKeyboard 2.0
\brief Trace is a data model for touch input data.
- \internal
Trace provides the data model for coordinate data and other
optional data associated with a single stroke.