emailuis/nmailuiwidgets/src/nmeditortextedit.cpp
changeset 75 47d84de1c893
parent 59 16ed8d08d0b1
equal deleted inserted replaced
72:64e38f08e49c 75:47d84de1c893
   152     
   152     
   153     return mCustomTextColor;
   153     return mCustomTextColor;
   154 }
   154 }
   155 
   155 
   156 /*!
   156 /*!
       
   157  *  Returns true if this widget has the input focus.
       
   158  */
       
   159 bool NmEditorTextEdit::hasInputFocus() const
       
   160 {
       
   161     NM_FUNCTION;
       
   162 
       
   163     bool ret = false;
       
   164     
       
   165     HbInputMethod *inputMethod = HbInputMethod::activeInputMethod();
       
   166     
       
   167     if (inputMethod) {
       
   168         HbInputFocusObject *focusObject = inputMethod->focusObject();
       
   169         if (focusObject) {
       
   170             ret = (focusObject->object() == this);
       
   171         }
       
   172     }
       
   173     
       
   174     return ret; 
       
   175 }
       
   176 
       
   177 /*!
   157  *  Returns the rectangle for the cursor.
   178  *  Returns the rectangle for the cursor.
   158  */
   179  */
   159 QRectF NmEditorTextEdit::rectForCursorPosition() const
   180 QRectF NmEditorTextEdit::rectForCursorPosition() const
   160 {
   181 {
   161     NM_FUNCTION;
   182     NM_FUNCTION;