diff -r 4633027730f5 -r e6ad4ef83b23 src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp --- a/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Wed Aug 18 10:05:37 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Thu Sep 02 20:44:51 2010 +0300 @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -88,7 +87,7 @@ connect(this, SIGNAL(autoCompletionPopupClosed(QString, int)), mBasicModeHandler, SLOT(autoCompletionPopupClosed(QString, int))); connect(HbInputSettingProxy::instance(), SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags,bool)), this, SLOT(predictiveInputStateChanged(HbKeyboardSettingFlags,bool))); - connect(HbInputSettingProxy::instance(), SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), this, SLOT(primaryCandidateModeChanged(HbPrimaryCandidateMode))); + connect(HbInputSettingProxy::instance(), SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), this, SLOT(primaryCandidateModeChanged(HbPrimaryCandidateMode))); connect(HbInputSettingProxy::instance(), SIGNAL(autocompletionStateChanged(HbKeyboardSettingFlags,bool)), this, SLOT(autocompletionStateChanged(HbKeyboardSettingFlags,bool))); connect(HbInputSettingProxy::instance(), SIGNAL(typingCorrectionLevelChanged(HbTypingCorrectionLevel)), this, SLOT(typingCorrectionLevelChanged(HbTypingCorrectionLevel))); mPredictionModeHandler->setPrimaryCandidateMode(HbInputSettingProxy::instance()->primaryCandidateMode()); @@ -339,7 +338,6 @@ connect(keyboard, SIGNAL(rockerDirection(int, HbInputVirtualRocker::RockerSelectionMode)), this, SLOT(rockerDirection(int, HbInputVirtualRocker::RockerSelectionMode))); connect(keyboard, SIGNAL(mouseMovedOutOfButton()), this, SLOT(mouseMovedOutOfButton())); - keyboard->setRockerVisible(true); return keyboard; } @@ -353,7 +351,7 @@ { if (mVkbHost->keypadStatus() == HbVkbHost::HbVkbStatusMinimized) { closeExactWordPopup(); - } + } } void HbVirtualQwerty::keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod vkbCloseMethod) @@ -379,7 +377,7 @@ void HbVirtualQwerty::inputLanguageChanged(const HbInputLanguage &aNewLanguage) { mPredictionModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); - if (mExactWordPopup && mExactWordPopup->isVisible()) + if (mExactWordPopup && mExactWordPopup->isVisible()) closeExactWordPopup(); // move keypad off screen if (mCurrentKeypad){ @@ -420,10 +418,10 @@ mActiveModeHandler = mNumericModeHandler; } else if (newState.inputMode() == HbInputModeDefault && usePrediction()) { mActiveModeHandler = mPredictionModeHandler; - // by passing HbInputModeActionFocusRecieved we will be setting the candidate list and keypad + // by passing HbInputModeActionFocusRecieved we will be setting the candidate list and keypad mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionFocusRecieved); - /* The below line should be added in orientationChanged Slot, however currently it is not working correctly - hence this fix is temporarily added here */ + /* The below line should be added in orientationChanged Slot, however currently it is not working correctly + hence this fix is temporarily added here */ mPredictionModeHandler->setAutocompletionStatus(HbInputSettingProxy::instance()->isAutocompletionEnabled(HbKeyboardSettingQwerty)); } else if (newState.inputMode() == HbInputModeDefault) { mActiveModeHandler = mBasicModeHandler; @@ -514,10 +512,7 @@ if (!mSctKeypad) { mSctKeypad = new HbSctKeyboard(this, mKeymap); connect(mSctKeypad, SIGNAL(smileySelected(QString)), this, SLOT(smileySelected(QString))); - connect(mSctKeypad, SIGNAL(keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod)), this, SLOT(keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod))); - connect(mSctKeypad, SIGNAL(rockerDirection(int, HbInputVirtualRocker::RockerSelectionMode)), - this, SLOT(rockerDirection(int, HbInputVirtualRocker::RockerSelectionMode))); - mSctKeypad->setRockerVisible(true); + connect(mSctKeypad, SIGNAL(keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod)), this, SLOT(keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod))); } mSctKeypad->setMode(EModeAbc, HbModifierNone); //open the keypad @@ -648,49 +643,6 @@ } /*! -Slot used by virtual rocker to move cursor. -*/ -void HbVirtualQwerty::rockerDirection(int aDirection, HbInputVirtualRocker::RockerSelectionMode aSelectionMode) -{ - Qt::KeyboardModifiers modifiers = 0; - if (aSelectionMode == HbInputVirtualRocker::RockerSelectionModeOn) { - modifiers = Qt::ShiftModifier; - } - // commit any character/word which is in inline edit. - mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); - HbInputLanguage inputlang = HbInputSettingProxy::instance()->globalInputLanguage(); - - switch (aDirection) { - case HbInputVirtualRocker::HbRockerDirectionLeft: - if(inputlang.isRightToLeftLanguage()) { - focusObject()->cursorRight(modifiers); - } else { - focusObject()->cursorLeft(modifiers); - } - break; - case HbInputVirtualRocker::HbRockerDirectionRight: - if(inputlang.isRightToLeftLanguage()) { - focusObject()->cursorLeft(modifiers); - } else { - focusObject()->cursorRight(modifiers); - } - break; - case HbInputVirtualRocker::HbRockerDirectionUp: { - QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_Up, modifiers); - focusObject()->sendEvent(keyEvent); - } - break; - case HbInputVirtualRocker::HbRockerDirectionDown: { - QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_Down, modifiers); - focusObject()->sendEvent(keyEvent); - } - break; - default: - break; - } -} - -/*! The framework calls this method when the predictive input status changes. */ void HbVirtualQwerty::predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newStatus) @@ -708,7 +660,7 @@ void HbVirtualQwerty::primaryCandidateModeChanged(HbPrimaryCandidateMode mode) { - mPredictionModeHandler->setPrimaryCandidateMode(mode); + mPredictionModeHandler->setPrimaryCandidateMode(mode); } void HbVirtualQwerty::autocompletionStateChanged(HbKeyboardSettingFlags keyboardType, bool newState)