--- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Wed Jun 23 18:33:25 2010 +0300
+++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Tue Jul 06 14:36:53 2010 +0300
@@ -23,8 +23,8 @@
**
****************************************************************************/
+#include "hbfeedbackeffectutils.h"
#include "hbnamespace_p.h"
-#include "hbfeedbackeffectutils.h"
#include <hbtoolbutton.h>
#include <hbabstractbutton.h>
@@ -156,6 +156,8 @@
case Hb::ItemType_ScrollBar:
+ case Hb::ItemType_RatingSlider:
+
family = HbFeedbackEffectUtils::Slider;
break;
@@ -246,13 +248,17 @@
}
// input widget special case
- if (widget->type() == Hb::ItemType_InputButtonGroup) {
+ if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) {
+ effect = HbFeedback::BasicKeypad;
+ }
+ else if (widget->type() == Hb::ItemType_InputButtonGroup) {
effect = HbFeedback::SensitiveKeypad;
}
else if (widget->type() == Hb::ItemType_InputFunctionButton) {
effect = HbFeedback::BasicKeypad;
}
- else if (widget->type() == Hb::ItemType_CheckBox) {
+
+ if (widget->type() == Hb::ItemType_CheckBox) {
effect = HbFeedback::BasicButton;
}
@@ -355,7 +361,7 @@
effect = HbFeedback::BasicItem;
}
else if(viewItem->type() == Hb::ItemType_TumbleViewItem ) {
- effect = HbFeedback::SensitiveItem;
+ effect = HbFeedback::BasicItem;
}
// expandable or collapsable items give a BasicItem feedback
@@ -364,15 +370,18 @@
effect = HbFeedback::BasicItem;
}
else {
- effect = HbFeedback::SensitiveItem;
+ effect = HbFeedback::BasicItem;
}
}
}
}
- if (widget->type() == Hb::ItemType_VirtualTrackPoint) {
+ if (widget->type() == Hb::ItemType_VirtualTrackPoint || QString(widget->metaObject()->className()) == "HbSelectionControl") {
effect = HbFeedback::BasicButton;
}
+ else if (widget->type() == Hb::ItemType_NotificationDialog) {
+ effect = HbFeedback::BasicItem;
+ }
if (modifiers & Hb::ModifierScrolling) {
effect = HbFeedback::StopFlick;
@@ -423,10 +432,14 @@
}
// input widget special case
- if (widget->type() == Hb::ItemType_InputButtonGroup
- || widget->type() == Hb::ItemType_InputFunctionButton) {
+ if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) {
+ effect = HbFeedback::BasicKeypad;
+ }
+ else if (widget->type() == Hb::ItemType_InputButtonGroup) {
effect = HbFeedback::SensitiveKeypad;
- } else if (widget->type() == Hb::ItemType_CheckBox) {
+ }
+
+ if (widget->type() == Hb::ItemType_CheckBox) {
effect = HbFeedback::Checkbox;
}
@@ -520,7 +533,10 @@
effect = HbFeedback::Checkbox;
}
else if(viewItem->type() == Hb::ItemType_TumbleViewItem ) {
- effect = HbFeedback::SensitiveItem;
+ effect = HbFeedback::BasicItem;
+ }
+ else if (widget->type() == Hb::ItemType_NotificationDialog) {
+ effect = HbFeedback::BasicItem;
}
if (modifiers & Hb::ModifierExpandedItem || modifiers & Hb::ModifierCollapsedItem) {
@@ -529,17 +545,13 @@
}
}
- if (widget->type() == Hb::ItemType_VirtualTrackPoint) {
- effect = HbFeedback::Editor;
- }
-
return effect;
}
/*!
Returns the instant feedback effect on key repeat interaction.
*/
-HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnKeyRepeat(const HbWidget *widget)
+HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnKeyRepeat(const HbWidget *widget, Hb::InteractionModifiers modifiers)
{
HbFeedback::InstantEffect effect = HbFeedback::Sensitive;
@@ -554,10 +566,13 @@
effect = HbFeedback::SensitiveButton;
// input widget special case
- if (widget->type() == Hb::ItemType_InputButtonGroup
- || widget->type() == Hb::ItemType_InputFunctionButton) {
+ if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) {
+ effect = HbFeedback::BasicKeypad;
+ }
+ else if (widget->type() == Hb::ItemType_InputButtonGroup) {
effect = HbFeedback::SensitiveKeypad;
}
+
break;
case HbFeedbackEffectUtils::List:
@@ -840,7 +855,10 @@
default:
break;
+ }
+ if (widget->type() == Hb::ItemType_ScrollBar) {
+ effect = HbFeedback::ContinuousNone;
}
if (interaction == Hb::ContinuousPinched) {
@@ -881,10 +899,6 @@
break;
}
}
- else if (const HbScrollBar *scrollbar = qobject_cast<const HbScrollBar *>(widget)) {
- Q_UNUSED(scrollbar);
- intensity = HbFeedback::IntensitySmooth;
- }
else {
// The default intensity for continuous effects
intensity = HbFeedback::IntensityFull;