summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-07 10:22:01 (GMT)
committeraxis <qt-info@nokia.com>2009-05-04 11:11:13 (GMT)
commit9e838079f5f8d62aebb542f2415cd77ef9d71df2 (patch)
tree9cc5359bab7c15c6f6074e802685d42b9728847f /src/gui/kernel/qapplication.cpp
parent27e57ccd327fbc1edbb23d9959c5388023974dfc (diff)
downloadQt-9e838079f5f8d62aebb542f2415cd77ef9d71df2.zip
Qt-9e838079f5f8d62aebb542f2415cd77ef9d71df2.tar.gz
Qt-9e838079f5f8d62aebb542f2415cd77ef9d71df2.tar.bz2
Added an event to request and close software input panel.
This is meant to be used by widgets to signal that they want input. The event will then be passed on to QInputContext::filterEvent, which can create an appropriate virtual keyboard on devices with touch interface only. RevBy: denis
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index d65a352..6f0a4e6 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4040,6 +4040,20 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
break;
#endif
+ case QEvent::RequestSoftwareInputPanel:
+ case QEvent::CloseSoftwareInputPanel:
+#ifndef QT_NO_IM
+ if (receiver->isWidgetType()) {
+ QWidget *w = static_cast<QWidget *>(receiver);
+ QInputContext *ic = w->inputContext();
+ if (ic && ic->filterEvent(e)) {
+ break;
+ }
+ }
+#endif
+ res = d->notify_helper(receiver, e);
+ break;
+
default:
res = d->notify_helper(receiver, e);
break;