aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtualkeyboard/inputcontext.h
Commit message (Collapse)AuthorAgeFilesLines
* Prefix non-namespaced header file names with qvirtualkeyboardJarkko Koivikko2018-08-271-132/+0
| | | | | | Change-Id: Idf2447736ef72fa0fb4dfeacc3386ed7b4fe41c9 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove QtVirtualKeyboard namespace from the public APIJarkko Koivikko2018-08-271-15/+15
| | | | | | | | | | | | | | | | | This change removes the QtVirtualKeyboard namespace from the public API. This change was suggested in the API review. Use of namespace is uncommon in a public Qt module. Prefixed names are preferred instead. [ChangeLog] Removed QtVirtualKeyboard namespace from the public C++ API and prefixed class names with QVirtualKeyboard. The new class names are QVirtualKeyboardAbstractInputMethod, QVirtualKeyboardInputContext, QVirtualKeyboardInputEngine, QVirtualKeyboardSelectionListModel and QVirtualKeyboardTrace. Change-Id: I52d35090b544dc7e8c8c8e5632ce24c455730755 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Trim InputContext APIJarkko Koivikko2018-08-271-57/+7
| | | | | | | | | | | | | | | | | The purpose of this change is to reduce the number of public API in the virtual keyboard. This change moves a lot of stuff from InputContext to ShiftHandler and InputContextPrivate and exposes the private API to QML through InputContext.priv property. Almost all the unrelevant APIs were moved away, except some properties and methods needed by selection control. These were left intact because moving them is not trivial. Change-Id: I1f23f5f54bc21c68996cb220a66d16d34b5d14ce Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Allow InputMethod to process pre-edit clickYuntaek Rim2018-08-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We already have InputMethod::reselect, but it is limited to case where the current pre-edit is discarded and new range is made active. However, if an input method wants to move the cursor within pre-edit, it is not possible with the current implementation. This change adds the new API for the InputMethod which allows to handle pre-edit click before reselect happens. If the input method handles the event, reselect will not be done. This change also improves the cursor handling within pre-edit text. Previously if the cursor attribute was added to pre-edit text and the input was committed, the cursor would jump to position after pre-edit text. This is now taken into account when committing text and cursor location will be preserved. Change-Id: I0a32f75eb4e454c86dd8d4f4016ac02fc1bc6c60 Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix zero as null pointer constantJarkko Koivikko2018-08-061-1/+1
| | | | | Change-Id: If41bd31f1fcec5647197ca6834909f4011fe87fa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Modularize virtual keyboard and add an extension interfaceJarkko Koivikko2018-08-061-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the extension interface it is possible to add new input method and/or languages without recompiling the Qt Virtual Keyboard plugin itself. The existing input methods are now isolated into plugins. So installing a new input method is a matter of copying the corresponding extension plugin to the plugins/virtualkeyboard directory (and any collateral required by the extension plugin itself). This change also renames the HunspellInputMethod to DefaultInputMethod. This change is necessary because some other extension plugin may want to provide the default input method instead. Implementation plan =================== [x] Create virtualkeyboard-private module [x] Create plugin library [x] Define interface for input method plugin [x] Define interface for keyboard layouts [x] Move existing input methods and layouts to plugins [x] HangulInputMethod [x] HunspellInputMethod [x] Maybe create a private library for sharing between HunspellInputMethod and LipiInputMethod [x] LipiInputMethod [x] OpenWnnInputMethod [x] PinyinInputMethod [x] T9WriteInputMethod [x] TCInputMethod [o] Rename some C++ classes (too generic name?) [x] Think again replacing the QtVirtualKeyboard namespace [x] Update documentation [x] General instructions for creating a plugin [x] For the C++ interfaces too (previously removed) [ChangeLog][Important Behavior Changes] Introduce an extension interface for the virtual keyboard. All the current input methods and some special keyboard layouts (e.g. Hunspell, OpenWnn, etc.) have been moved to extensions. The extension interface allows third party to create a new input method without having to modify or rebuild the virtual keyboard. In addition, this change makes it possible to add features and languages independently by copying the desired extension to the system. [ChangeLog][Important Behavior Changes] Introduce a virtualkeyboard module, which can be linked against an extension plugin. This module provides the C++ API necessary for creating an input method. [ChangeLog][Important Behavior Changes] Wrap the entire virtual keyboard API into Qt namespace (e.g. QT_BEGIN_NAMESPACE/QT_END_NAMESPACE). Task-number: QTBUG-57602 Change-Id: I449f4429109f596a7a1df7517c81f97d4aada27c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add full screen input mode for super wide screensJarkko Koivikko2017-01-301-0/+12
| | | | | | | | | | | | | In full screen mode the virtual keyboard replicates the contents of the focused input field to full screen input field located on top of keyboard. This mode can be activated by VirtualKeyboardSettings.fullScreenMode. [ChangeLog] Added full screen input mode for super wide screens. Change-Id: Ib2650c04767fb0945cc2bedc5b1801d254a15a41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add new property InputContext.uppercaseJarkko Koivikko2016-12-071-0/+3
| | | | | | | | | | | This property is true when either InputContext.shift or InputContext.capsLock is true. [ChangeLog] Add new property InputContext.uppercase, which is set to true when either InputContext.shift or InputContext.capsLock is true Change-Id: I06ce14c6f626bfe176e6d914e60417ec2009cd5c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add InputContext::anchorRectangleJan Arve Saether2016-08-101-0/+3
| | | | | | | | | This will be needed for the selection handles for the dedicated vkb [ChangeLog] Added API to support VKB selection handles. Change-Id: I0cde63217c410559fbc1f8ad034c37fe959d8d28 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Hide the selection handles if the handles are clipped awayJan Arve Saether2016-05-251-0/+6
| | | | | | | | This usually happens when there is a selection, and the view is scrolled so that parts of the selection is outside of the visible input area. Change-Id: I26867c7b3db112f6627ddffc5463a9e52af380cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add support for selection handles.Jan Arve Saether2016-05-201-0/+6
| | | | | | | | | [ChangeLog] Added support for selection handles for VKB. Currently, its only supported for the integrated VKB. Support for the dedicated VKB will be a separate commit Change-Id: I1f700fbc641bc68949b4cc81a8fa3aa275f34efa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* License updateKalle Viironen2016-01-121-9/+17
| | | | | | Change-Id: I0dc6af72a3ae52a0b97b704df84fb1a8197aeeb8 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
* Refactor class namesJarkko Koivikko2015-10-281-0/+140
Since the virtual keyboard C++ interface is wrapped inside a namespace, it is possible to get rid of "Declarative" name in the class names, that would otherwise conflict with the QML namespace in the documentation. - Rename DeclarativeSettings to VirtualKeyboardSettings - Remove "Declarative" from class names The rationale for this change is that the name Declarative refers to now obsolete QtQuick1 module. Also, the class names are now the same in C++ and QML name spaces. Change-Id: Ide050d47110443d894d95d35dddf0df5891587be Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>