diff options
author | Satyam Bandarapu <satyam.bandarapu@nokia.com> | 2011-11-24 22:25:38 (GMT) |
---|---|---|
committer | Satyam Bandarapu <satyam.bandarapu@nokia.com> | 2011-11-25 09:02:32 (GMT) |
commit | b233fb15f66b7c9e7bff782aa05e543eb45e52e7 (patch) | |
tree | 81edad9cde12a77046aba8788ecccf3c0c7e1a08 /src/gui | |
parent | fea7c172500811c7ab69f25b8d317890712cf5e8 (diff) | |
download | Qt-b233fb15f66b7c9e7bff782aa05e543eb45e52e7.zip Qt-b233fb15f66b7c9e7bff782aa05e543eb45e52e7.tar.gz Qt-b233fb15f66b7c9e7bff782aa05e543eb45e52e7.tar.bz2 |
New API to set AVKON flag to inputcontext in Qt/Symbian.
This API is to pass any AVKON FEP flag to QCoeFepInputContext.
Implemented as an exported private API, which is available only in Qt/Symbian.
If latin keyboard flag is passed to this API and editor is Email/Url,
virtual keyboard launches always with latin characters regardless of input language.
Reviewed by: Sami Merila
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_p.h | 1 | ||||
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index b17d9c7..d9d577a 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -225,6 +225,7 @@ private: Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable); Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable); +Q_GUI_EXPORT void qt_s60_setEditorFlags(int flags); QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 44e0df0..3bcac62 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -367,6 +367,11 @@ Q_GUI_EXPORT void qt_s60_setPartialScreenAutomaticTranslation(bool enable) S60->partial_keyboardAutoTranslation = enable; } +Q_GUI_EXPORT void qt_s60_setEditorFlags(int flags) +{ + S60->editorFlags |= flags; +} + QCoeFepInputContext::QCoeFepInputContext(QObject *parent) : QInputContext(parent), m_fepState(q_check_ptr(new CAknEdwinState)), // CBase derived object needs check on new @@ -1160,6 +1165,11 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) if (hints & ImhNoPredictiveText || hints & ImhHiddenText) { flags |= EAknEditorFlagNoT9; } + + if ((hints & (ImhEmailCharactersOnly | ImhUrlCharactersOnly)) && (S60->editorFlags & EAknEditorFlagLatinInputModesOnly)){ + flags |= EAknEditorFlagLatinInputModesOnly; + } + if (needsCharMap) flags |= EAknEditorFlagUseSCTNumericCharmap; m_fepState->SetFlags(flags); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 5b5d5ce..c75b20e 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -230,6 +230,7 @@ public: int beginFullScreenCalled : 1; int endFullScreenCalled : 1; + int editorFlags; }; Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data(); @@ -390,7 +391,8 @@ inline QS60Data::QS60Data() ,s60InstalledTrapHandler(0) #endif ,beginFullScreenCalled(0), - endFullScreenCalled(0) + endFullScreenCalled(0), + editorFlags(0) { } |