summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-07-05 18:50:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-07-05 18:50:46 (GMT)
commitf46d3aa61e8f9c27c5ff60bbd23d85f0c31df84c (patch)
tree204177d91d9d23305e90b5a130e7fb155bcdbf0e
parent8bfcd87139550fd23159f066713274a8c41ad6dc (diff)
parentca0b81567d76d3af82ce025e029fb5efa50846ed (diff)
downloadQt-f46d3aa61e8f9c27c5ff60bbd23d85f0c31df84c.zip
Qt-f46d3aa61e8f9c27c5ff60bbd23d85f0c31df84c.tar.gz
Qt-f46d3aa61e8f9c27c5ff60bbd23d85f0c31df84c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Support partial input mode - documentation update Support partial input mode
-rw-r--r--src/corelib/global/qnamespace.qdoc16
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp16
-rw-r--r--src/gui/kernel/qapplication.cpp4
4 files changed, 27 insertions, 10 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 87b8255..eabaf10 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -156,12 +156,16 @@
whole lifetime. This attribute must be set before QApplication is
constructed.
- \omitvalue AA_S60DisablePartialScreenInputMode By default in Symbian^3,
- a separate editing window is opened on top of an application. This is exactly
- like editing on previous versions of Symbian behave. When this attribute
- is true, a virtual keyboard window is shown on top of application and it
- is ensured that the focused text widget is visible. This is only supported in
- Symbian^3. (internal)
+ \value AA_S60DisablePartialScreenInputMode By default in Symbian^3, a separate
+ editing window is opened on top of an application. This is exactly like
+ editing on previous versions of Symbian behave. When this attribute is false,
+ a non-fullscreen virtual keyboard window is shown on top of application and
+ it is ensured that the focused text input widget is visible.
+ The auto-translation of input widget is only supported for applications
+ based on QGraphicsView, but the non-fullscreen virtual keyboard will
+ work for any kind of application (i.e. QWidgets-based). By default this
+ attribute is true. This attribute must be set after QApplication is
+ constructed. This is only supported in Symbian^3 and later Symbian releases.
\omitvalue AA_AttributeCount
*/
diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h
index e929880..9fd2703 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_p.h
+++ b/src/gui/inputmethod/qcoefepinputcontext_p.h
@@ -108,6 +108,7 @@ private:
bool needsInputPanel();
void commitTemporaryPreeditString();
bool isWidgetVisible(QWidget *widget, int offset = 0);
+ bool isPartialKeyboardSupported();
private Q_SLOTS:
void ensureInputCapabilitiesChanged();
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 602c734..567f83b 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -83,6 +83,8 @@ Q_GUI_EXPORT void qt_s60_setPartialScreenInputMode(bool enable)
{
S60->partial_keyboard = enable;
+ QApplication::setAttribute(Qt::AA_S60DisablePartialScreenInputMode, !S60->partial_keyboard);
+
QInputContext *ic = 0;
if (QApplication::focusWidget()) {
ic = QApplication::focusWidget()->inputContext();
@@ -111,7 +113,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent)
m_fepState->SetObjectProvider(this);
int defaultFlags = EAknEditorFlagDefault;
if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
- if (S60->partial_keyboard) {
+ if (isPartialKeyboardSupported()) {
defaultFlags |= QT_EAknEditorFlagEnablePartialScreen;
}
defaultFlags |= QT_EAknEditorFlagSelectionVisible;
@@ -420,7 +422,8 @@ void QCoeFepInputContext::mouseHandler(int x, QMouseEvent *event)
//If splitview is open and T9 word is tapped, pass the pointer event to pointer handler.
//This will open the "suggested words" list. Pass pointer position always as zero, to make
//full word replacement in case user makes a selection.
- if (S60->partial_keyboard && S60->partialKeyboardOpen
+ if (isPartialKeyboardSupported()
+ && S60->partialKeyboardOpen
&& m_pointerHandler
&& !(currentHints & Qt::ImhNoPredictiveText)
&& (x > 0 && x < m_preeditString.length())) {
@@ -534,6 +537,11 @@ bool QCoeFepInputContext::isWidgetVisible(QWidget *widget, int offset)
return visible;
}
+bool QCoeFepInputContext::isPartialKeyboardSupported()
+{
+ return (S60->partial_keyboard || !QApplication::testAttribute(Qt::AA_S60DisablePartialScreenInputMode));
+}
+
// Ensure that the input widget is visible in the splitview rect.
void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
@@ -644,7 +652,7 @@ void QCoeFepInputContext::updateHints(bool mustUpdateInputCapabilities)
// we need to update its state separately.
if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
TInt currentFlags = m_fepState->Flags();
- if (S60->partial_keyboard)
+ if (isPartialKeyboardSupported())
currentFlags |= QT_EAknEditorFlagEnablePartialScreen;
else
currentFlags &= ~QT_EAknEditorFlagEnablePartialScreen;
@@ -761,7 +769,7 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
flags = 0;
if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) {
- if (S60->partial_keyboard)
+ if (isPartialKeyboardSupported())
flags |= QT_EAknEditorFlagEnablePartialScreen;
flags |= QT_EAknEditorFlagSelectionVisible;
}
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4552255..34ce9a8 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1017,6 +1017,10 @@ void QApplicationPrivate::initialize()
QApplicationPrivate::wheel_scroll_lines = 3;
#endif
+#ifdef Q_WS_S60
+ q->setAttribute(Qt::AA_S60DisablePartialScreenInputMode);
+#endif
+
if (qt_is_gui_used)
initializeMultitouch();
}