diff -r 459da34cdb45 -r 83cc6bae1de8 emailuis/nmailuiwidgets/src/nmeditortextedit.cpp --- a/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Fri Sep 03 17:52:02 2010 +0300 +++ b/emailuis/nmailuiwidgets/src/nmeditortextedit.cpp Wed Sep 15 12:09:55 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