summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatforminputcontext_qpa.h
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-02-23 15:57:14 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-01 20:13:51 +0200
commit6a4bf73c07b034a0f9d07cb617d23e92ca778dd1 (patch)
tree818497855c1ad073919c214fa52ba3fd5b50d7d7 /src/gui/kernel/qplatforminputcontext_qpa.h
parent1f5e058f79f95e869d8de300596137463492056c (diff)
Added some convenience API for platform input contexts
QPlatformInputContext now gets notified on changed focus and has inputMethodAccepted() telling whether current focus object accepts input method events. Also adapted IBus plugin to use this. Key event filtering for focused objects without input method support got fixed by the change. Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatforminputcontext_qpa.h')
-rw-r--r--src/gui/kernel/qplatforminputcontext_qpa.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/kernel/qplatforminputcontext_qpa.h b/src/gui/kernel/qplatforminputcontext_qpa.h
index c7d823d662..5e8060c6e0 100644
--- a/src/gui/kernel/qplatforminputcontext_qpa.h
+++ b/src/gui/kernel/qplatforminputcontext_qpa.h
@@ -48,13 +48,13 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-
-class QWindow;
-class QMouseEvent;
+class QPlatformInputContextPrivate;
class Q_GUI_EXPORT QPlatformInputContext : public QObject
{
Q_OBJECT
+ Q_DECLARE_PRIVATE(QPlatformInputContext)
+
public:
QPlatformInputContext();
virtual ~QPlatformInputContext();
@@ -81,6 +81,14 @@ public:
void emitLocaleChanged();
virtual Qt::LayoutDirection inputDirection() const;
void emitInputDirectionChanged(Qt::LayoutDirection newDirection);
+
+ virtual void setFocusObject(QObject *object);
+ bool inputMethodAccepted() const;
+
+private:
+ friend class QGuiApplication;
+ friend class QGuiApplicationPrivate;
+ friend class QInputMethod;
};
QT_END_NAMESPACE