aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2010-09-13 13:38:29 +0300
committerPekka Vuorela <pekka.ta.vuorela@nokia.com>2010-09-14 17:18:55 +0300
commit8f2be5291dedd5d57e362d66ff25e771f4050c8b (patch)
tree25282f15ea956bcf964a3c8dbe40846faf993b92 /src
parent7c1f0d831c60f0c1c9a1f843705d02f96217a8f2 (diff)
New: added keyPress/Release signals to MInputMethodState
RevBy: Hannu Koivisto
Diffstat (limited to 'src')
-rw-r--r--src/corelib/core/minputmethodstate.cpp11
-rw-r--r--src/corelib/core/minputmethodstate.h13
2 files changed, 24 insertions, 0 deletions
diff --git a/src/corelib/core/minputmethodstate.cpp b/src/corelib/core/minputmethodstate.cpp
index 76927a9c..dad2fd7e 100644
--- a/src/corelib/core/minputmethodstate.cpp
+++ b/src/corelib/core/minputmethodstate.cpp
@@ -21,6 +21,7 @@
#include "minputmethodstate_p.h"
#include <QTimer>
+#include <QKeyEvent>
MInputMethodStatePrivate::MInputMethodStatePrivate()
@@ -92,6 +93,16 @@ M::OrientationAngle MInputMethodState::activeWindowOrientationAngle() const
return d->orientation;
}
+void MInputMethodState::emitKeyPress(const QKeyEvent &event)
+{
+ emit keyPress(event);
+}
+
+void MInputMethodState::emitKeyRelease(const QKeyEvent &event)
+{
+ emit keyRelease(event);
+}
+
int MInputMethodState::registerToolbar(const QString &fileName)
{
Q_D(MInputMethodState);
diff --git a/src/corelib/core/minputmethodstate.h b/src/corelib/core/minputmethodstate.h
index 159762ef..44a756e3 100644
--- a/src/corelib/core/minputmethodstate.h
+++ b/src/corelib/core/minputmethodstate.h
@@ -26,6 +26,8 @@
#include "mnamespace.h"
#include "mexport.h"
+class QKeyEvent;
+
class MInputMethodStatePrivate;
/*!
@@ -55,6 +57,11 @@ public:
//! \return orientation of application's active window
M::OrientationAngle activeWindowOrientationAngle() const;
+ //! \internal
+ void emitKeyPress(const QKeyEvent &event);
+ void emitKeyRelease(const QKeyEvent &event);
+ //! \internal_end
+
public Q_SLOTS:
//! \brief Set the orientation of application's active window to \a newOrientation
void setActiveWindowOrientationAngle(M::OrientationAngle newOrientation);
@@ -105,6 +112,12 @@ Q_SIGNALS:
//! Emitted when input method toolbar item attribute is changed.
void toolbarItemAttributeChanged(int id, const QString &item, const QString &attribute, const QVariant &value);
+ //! Can be emitted by input method to notify about raw key press event it receives.
+ void keyPress(const QKeyEvent &);
+
+ //! Can be emitted by input method to notify about raw key release event it receives.
+ void keyRelease(const QKeyEvent &);
+
private:
//! Disable default construction
MInputMethodState();