158 // |
158 // |
159 // --------------------------------------------------------------------------- |
159 // --------------------------------------------------------------------------- |
160 // |
160 // |
161 bool HbHardwareQwerty::filterEvent(const QEvent *event) |
161 bool HbHardwareQwerty::filterEvent(const QEvent *event) |
162 { |
162 { |
163 const QKeyEvent *keyEvent = 0; |
163 const QKeyEvent *keyEvent = 0; |
164 keyEvent = static_cast<const QKeyEvent *>(event); |
164 keyEvent = static_cast<const QKeyEvent *>(event); |
165 if(keyEvent->key() == Qt::Key_F8){ |
165 if(keyEvent->key() == Qt::Key_F8){ |
166 emit flipStatusChange(); |
166 emit flipStatusChange(); |
167 return false; |
167 return false; |
168 } |
168 } |
169 if(handleEvent()){ |
169 if(handleEvent()){ |
170 return mActiveModeHandler->filterEvent(event); |
170 return mActiveModeHandler->filterEvent(event); |
171 } |
171 } |
172 return false; |
172 return false; |
173 } |
173 } |
423 // mMode = HbInputModeLatinBasic; |
423 // mMode = HbInputModeLatinBasic; |
424 //} |
424 //} |
425 //activateState(inputState); |
425 //activateState(inputState); |
426 //focusedObject->editorInterface().setInputMode(mMode); |
426 //focusedObject->editorInterface().setInputMode(mMode); |
427 //focusedObject->syncEditorInterface(); |
427 //focusedObject->syncEditorInterface(); |
428 Q_UNUSED(newStatus); |
428 Q_UNUSED(newStatus); |
429 |
429 |
430 // HbInputFocusObject *focusedObject = focusObject(); |
430 // HbInputFocusObject *focusedObject = focusObject(); |
431 /*if (focusedObject)*/ { |
431 /*if (focusedObject)*/ { |
432 // Just refresh the situation. |
432 // Just refresh the situation. |
433 inputStateActivated(inputState()); |
433 inputStateActivated(inputState()); |
554 /*! |
554 /*! |
555 Returns true if prediction is on, prediction engine is available and predictions is allowed in current editor. |
555 Returns true if prediction is on, prediction engine is available and predictions is allowed in current editor. |
556 */ |
556 */ |
557 bool HbHardwareQwerty::usePrediction() const |
557 bool HbHardwareQwerty::usePrediction() const |
558 { |
558 { |
559 qDebug("in usePrediction()"); |
559 qDebug("in usePrediction()"); |
560 HbInputFocusObject *fo = focusObject(); |
560 HbInputFocusObject *fo = focusObject(); |
561 if(!fo){ |
561 if(!fo){ |
562 qDebug("NO Focus object"); |
562 qDebug("NO Focus object"); |
563 } else { |
563 } else { |
564 qDebug("Yes Focus object"); |
564 qDebug("Yes Focus object"); |
565 } |
565 } |
566 |
566 |
567 if (!HbInputSettingProxy::instance()->predictiveInputStatus()){ |
567 if (!HbInputSettingProxy::instance()->predictiveInputStatus()){ |
568 qDebug("No HbInputSettingProxy::instance()->predictiveInputStatus()"); |
568 qDebug("No HbInputSettingProxy::instance()->predictiveInputStatus()"); |
569 } else { |
569 } else { |
570 qDebug("Yes HbInputSettingProxy::instance()->predictiveInputStatus()"); |
570 qDebug("Yes HbInputSettingProxy::instance()->predictiveInputStatus()"); |
571 } |
571 } |
572 |
572 |
573 if(!mPredictionModeHandler->isActive()){ |
573 if(!mPredictionModeHandler->isActive()){ |
574 qDebug("No mPredictionModeHandler->isActive()"); |
574 qDebug("No mPredictionModeHandler->isActive()"); |
575 |
575 |
576 } else { |
576 } else { |
577 qDebug("Yes mPredictionModeHandler->isActive()"); |
577 qDebug("Yes mPredictionModeHandler->isActive()"); |
578 } |
578 } |
579 |
579 |
580 |
580 |
581 if (HbInputSettingProxy::instance()->predictiveInputStatus() && |
581 if (HbInputSettingProxy::instance()->predictiveInputStatus() && |
582 fo && |
582 fo && |
583 fo->editorInterface().isPredictionAllowed() && |
583 fo->editorInterface().isPredictionAllowed() && |