summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.h
Commit message (Collapse)AuthorAgeFilesLines
* iOS: don't store reference to focus objectRichard Moe Gustavsen2014-02-141-1/+0
| | | | | | | | | | | Sometimes focus object is updated after we get a callback that the cursor rectangle has changed. And there is no reason to keep a local reference to it. Since we also send events to the qApp->focusObject from UIView_textInput, we now end up more consistent. Change-Id: I3976175aae4e3f346be9bc5b771ac0fdefc03ae6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: implement support for input methodsRichard Moe Gustavsen2014-02-061-1/+7
| | | | | | | | This change will add support for input methods, word completion, spell checking and related functionality. Change-Id: I41d4de1cab521c679d414cfc7c1a2d0f9c1fcaaf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: change logic for when to scroll screenRichard Moe Gustavsen2014-02-061-4/+4
| | | | | | | | | | | | | | | | | | | The current implementation will stop scrolling the screen to reveal the cursor if the input item changes transformation. This to not interfere with flicking etc. This strategy turns out to be too strict, as some qml apps/games can easily have small animations applied (e.g qtquick cork board example) that moves or scales the text areas (or their parents) upon focus. So instead of relying on input item transformation, we now scroll whenever the cursor changes position inside the input item (in addition to orientation changes etc). We also refactor scrollRootView into two functions, since we in many cases know if the keyboard should scroll up or down already when the call is made. Change-Id: If5bf349139eed69823cfc8986bb4b32c93bdf91b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: update keyboard layout upon focus transferRichard Moe Gustavsen2013-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | When iOS transfers focus from one view to another, it asks the new view for its UIKeyInput properties before deciding how the keyboard should be configured. For Qt, the same QUIView is used for the whole QWindow which means that UIKit will not change the keyboard configuration just because we change the focus object in Qt, since the UIView does not change. There seems to be no way to tell UIKit that the keyboard needs to change becuse the UIKeyInput properties has changed. To work around this, we briefly resign first responder status, and grabs it again, for the same QUIView. Change-Id: I2d15cc0c928deb023e7da58ad4669b7099dce2cf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't scroll after inputItem has movedRichard Moe Gustavsen2013-11-251-0/+3
| | | | | | | | | | | | If the inputItem moves, it typically means that the user scrolls or flicks the focus item around. In that case we should avoid scrolling the screen, otherwise they will "cancel out" each other. Besides, when the user flicks, he takes control over the whereabouts on the screen anyway. Change-Id: Iad0762965f9dcdbcca934ce6d90a8c1413ce3ca2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: scroll screen when keyboard opensRichard Moe Gustavsen2013-11-251-0/+1
| | | | | | | | | This change will let QIOSInputContext scroll the root view when the virtual keyboard is open, so that the input cursor is not obscured. Change-Id: If0758f4bf04c2b8e554e0196451154def7e3cb86 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: decouple QIOSWindow and QIOSInputContextRichard Moe Gustavsen2013-11-241-2/+2
| | | | | Change-Id: I85dda6fc0c6d2d11709b8bcdc0de6c0cef42d40f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* iOS: post the code that closes the input panelRichard Moe Gustavsen2013-06-251-0/+1
| | | | | | | | | | | | When the user is tranferring input focus between line edits (or similar controls), the edit that lost focus will close the input panel, just to see that the input that gained focus will open it again. This will cause the input panel to "jump", and can also trigger other input panel related code/signals unnecessary. Change-Id: Iac0a103e8d2f0f7cdcc04b8ec5b10e07587d1ad6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: let first responder follow the view of the focus windowRichard Moe Gustavsen2013-02-271-0/+3
| | | | | | | | | | This to ensure that the keyboard does not close prematurly. This can happen if the user opens up the keyboard while typing inside one window, then switch window, continue typing while the other window gets deleted. Change-Id: I5cfb1673ccbe4d5aaa14167b7aa53451031089a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: report changes to keyboard rect back to QtRichard Moe Gustavsen2013-02-271-0/+1
| | | | | | | | | QInputContext expects us to report whenever the input panel changes geometry. This patch implements this. Change-Id: I9162f0d48da6925274a7489c9bcb6adab9afae82 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add class QIOSInputContext (to handle keyboard)Richard Moe Gustavsen2013-02-271-0/+69
This change will add an initial implementation of the QPlatformInputContext for dealing with the keyboard. Change-Id: I29c1cfbbebb8456977b8a1db0e966973cd2c24a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>