diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbfeedbackplayer_symbian.cpp --- a/src/hbfeedback/player/hbfeedbackplayer_symbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_symbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -61,6 +61,7 @@ inline TTacticonType convertTacticonToSymbian(HbFeedback::TacticonEffect effect); inline TTouchContinuousFeedback convertToSymbian(HbFeedback::ContinuousEffect effect); inline TTouchEventType convertToSymbian(HbFeedback::HitAreaType hitAreaType); + inline TTouchFeedbackType convertToSymbian(HbFeedback::Modalities modalities); public: MTouchFeedback *iFeedback; @@ -209,6 +210,9 @@ case HbFeedback::PopUp: instantFeedbackSymbian = ETouchFeedbackPopUp; break; + case HbFeedback::LongPress: + instantFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic. + break; default: break; } @@ -298,9 +302,24 @@ return touchEventType; } +TTouchFeedbackType HbFeedbackBasePlayerPrivate::convertToSymbian(HbFeedback::Modalities modalities) +{ + int symbianFeedbackType = 0; -CCoeControl* HbFeedbackBasePlayerPrivate::convertToSymbian(QWidget* window) { + if(modalities == HbFeedback::All) { + // enable all modalities + symbianFeedbackType |= ETouchFeedbackAudio; + symbianFeedbackType |= ETouchFeedbackVibra; + } else { + // enable individual modalities + if(modalities & HbFeedback::Audio) symbianFeedbackType |= ETouchFeedbackAudio; + if(modalities & HbFeedback::Tactile) symbianFeedbackType |= ETouchFeedbackVibra; + } + return TTouchFeedbackType(symbianFeedbackType); +} +CCoeControl* HbFeedbackBasePlayerPrivate::convertToSymbian(QWidget* window) +{ CCoeControl* control = 0; if ( window && window->winId()) { @@ -348,6 +367,7 @@ } void HbFeedbackBasePlayer::playInstantFeedback(const HbInstantFeedback& feedback) { + TPointerEvent pointerEvent; if (d->iFeedback) { // If the effect is a tacticon, use the tacticon playing mechanism of the feedback player @@ -360,9 +380,9 @@ } else { CCoeControl* control = d->convertToSymbian(feedback.window()); if (control) { - d->iFeedback->InstantFeedback(control, d->convertToSymbian(feedback.instantEffect())); - } - else { + d->iFeedback->InstantFeedback(control, d->convertToSymbian(feedback.instantEffect()), + d->convertToSymbian(feedback.modalities()),pointerEvent); + } else { d->iFeedback->InstantFeedback(d->convertToSymbian(feedback.instantEffect())); } }