src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.h
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    40     Q_OBJECT
    40     Q_OBJECT
    41         
    41         
    42 public:
    42 public:
    43     HbFeedbackEffectEngine();
    43     HbFeedbackEffectEngine();
    44     ~HbFeedbackEffectEngine();
    44     ~HbFeedbackEffectEngine();
    45 
       
    46     void triggered(const HbWidget* widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers);
    45     void triggered(const HbWidget* widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers);
    47     void pressed(const HbWidget *widget);
    46     void pressed(const HbWidget *widget);
    48     void released(const HbWidget *widget);
    47     void released(const HbWidget *widget);
    49     void longPressed(const HbWidget *widget);
    48     void longPressed(const HbWidget *widget);
    50     void clicked(const HbWidget *widget);
    49     void clicked(const HbWidget *widget);
    57     void rotated90Degrees(const HbWidget *widget);
    56     void rotated90Degrees(const HbWidget *widget);
    58     void selectionChanged(const HbWidget *widget);
    57     void selectionChanged(const HbWidget *widget);
    59     void multitouchActivated(const HbWidget *widget);
    58     void multitouchActivated(const HbWidget *widget);
    60     void continuousTriggered(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta);
    59     void continuousTriggered(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta);
    61     void continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction);
    60     void continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction);
    62         
    61 
    63 protected:
    62 protected:
    64     void playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect);
    63     void playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect, HbFeedback::Modalities modalities = HbFeedback::All);
    65     void playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity);
    64     void playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity, HbFeedback::Modalities modalities = HbFeedback::All);
    66     void cancelContinuousFeedback(const HbWidget* HbWidget);
    65     void cancelContinuousFeedback(const HbWidget* HbWidget);
       
    66     inline bool widgetOverridesEffect(const HbWidget *widget, Hb::InstantInteraction interaction);
       
    67     inline bool widgetOverridesEffect(const HbWidget *widget, Hb::ContinuousInteraction interaction);
       
    68     inline bool widgetOverridesModalities(const HbWidget *widget,Hb::InstantInteraction interaction);
       
    69     inline bool widgetOverridesModalities(const HbWidget *widget,Hb::ContinuousInteraction interaction);
       
    70 
       
    71     QString effectOverrideProperty(Hb::InstantInteraction interaction);
       
    72     QString effectOverrideProperty(Hb::ContinuousInteraction interaction);
       
    73     QString modalitiesOverrideProperty(Hb::InstantInteraction interaction);
       
    74     QString modalitiesOverrideProperty(Hb::ContinuousInteraction interaction);
    67 
    75 
    68 private:
    76 private:
    69     QMap<const HbWidget*, int> continuousFeedbacks;
    77     QMap<const HbWidget*, int> continuousFeedbacks;
    70     QList<int> oldVisibleIndexes;
    78     QList<int> oldVisibleIndexes;
    71     const HbWidget* activelyScrollingItemView;
    79     const HbWidget* activelyScrollingItemView;
    72     QList<const HbWidget*> boundaryWidgets;
    80     QList<const HbWidget*> boundaryWidgets;
    73 
    81 
       
    82     struct Override {
       
    83         const HbWidget* widget;
       
    84         Hb::InstantInteraction instantInteraction;
       
    85         Hb::ContinuousInteraction continuousInteraction;
       
    86 
       
    87         bool overridesEffect;
       
    88         HbFeedback::InstantEffect newInstantEffect;
       
    89         HbFeedback::ContinuousEffect newContinuousEffect;
       
    90 
       
    91         bool overridesModalities;
       
    92         HbFeedback::Modalities newModalities;
       
    93     };
       
    94     Override overrider;
       
    95 
       
    96 
    74     int previousCursorPosition;
    97     int previousCursorPosition;
    75 };
    98 };
    76 
    99 
    77 #endif // HBFEEDBACKEFFECTENGINE_H
   100 #endif // HBFEEDBACKEFFECTENGINE_H