diff -r 64e38f08e49c -r 47d84de1c893 emailuis/nmailuiwidgets/src/nmeditortextedit.cpp --- a/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Fri Sep 17 08:27:21 2010 +0300 +++ b/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Mon Oct 04 00:05:37 2010 +0300 @@ -154,6 +154,27 @@ } /*! + * Returns true if this widget has the input focus. + */ +bool NmEditorTextEdit::hasInputFocus() const +{ + NM_FUNCTION; + + bool ret = false; + + HbInputMethod *inputMethod = HbInputMethod::activeInputMethod(); + + if (inputMethod) { + HbInputFocusObject *focusObject = inputMethod->focusObject(); + if (focusObject) { + ret = (focusObject->object() == this); + } + } + + return ret; +} + +/*! * Returns the rectangle for the cursor. */ QRectF NmEditorTextEdit::rectForCursorPosition() const