src/hbcore/feedback/hbfeedbackmanager.cpp
changeset 2 06ff229162e9
parent 0 16d8024aca5e
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
    43     @beta
    43     @beta
    44     @hbcore
    44     @hbcore
    45 
    45 
    46     \class HbFeedbackManager
    46     \class HbFeedbackManager
    47 
    47 
    48     \brief Feedback manager forwards interaction information from the widgets to feedback engine plugins.
    48     \brief Feedback manager forwards interaction information from the widgets to the feedback engine plugins.
    49     Feedback engine plugins decide what kind of feedback effects will be played. Widgets don't use 
    49     Feedback engine plugins decide what kind of feedback effects will be played. Widgets are not to use the
    50     HbFeedbackManager directly but through HbWidgetFeedback convenience class.
    50     HbFeedbackManager directly but through HbWidgetFeedback convenience class.
    51 */
    51 */
    52 
    52 
    53 Q_GLOBAL_STATIC(HbFeedbackManager, feedbackManagerGlobal);
    53 Q_GLOBAL_STATIC(HbFeedbackManager, feedbackManagerGlobal);
    54 
    54 
   104 }
   104 }
   105 
   105 
   106 /*!
   106 /*!
   107     Returns feedback manager singleton object responsible for initiating feedback effects.
   107     Returns feedback manager singleton object responsible for initiating feedback effects.
   108 
   108 
   109     \return HbFeedbackManager returns feedback manager singleton object
   109     \return HbFeedbackManager the feedback manager singleton object
   110 */
   110 */
   111 HbFeedbackManager* HbFeedbackManager::instance()
   111 HbFeedbackManager* HbFeedbackManager::instance()
   112 {
   112 {
   113     return feedbackManagerGlobal();
   113     return feedbackManagerGlobal();
   114 }
   114 }
   116 /*!
   116 /*!
   117     Mediates interaction triggers from widgets to all active feedback engine plugins.
   117     Mediates interaction triggers from widgets to all active feedback engine plugins.
   118 
   118 
   119     \param widget the widget being interacted with
   119     \param widget the widget being interacted with
   120     \param interaction the interaction
   120     \param interaction the interaction
   121     \param modifiers extra specifiers to the interaction
   121     \param modifiers extra modifiers to the interaction
   122 */
   122 */
   123 void HbFeedbackManager::triggered(const HbWidget *widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers)
   123 void HbFeedbackManager::triggered(const HbWidget *widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers)
   124 {
   124 {
   125     if (widget) {
   125     if (widget) {
   126         if (!widget->testAttribute(Hb::InteractionDisabled)) {
   126         if (!widget->testAttribute(Hb::InteractionDisabled)) {
   133         qWarning("HbFeedbackManager::triggered: Attempt to report an interaction trigger with null widget pointer");
   133         qWarning("HbFeedbackManager::triggered: Attempt to report an interaction trigger with null widget pointer");
   134     }
   134     }
   135 }
   135 }
   136 
   136 
   137 /*!
   137 /*!
   138     Mediates continuous interaction triggers to all active feedback plugins.
   138     Mediates continuous interaction triggers to all active feedback engine plugins.
   139 
   139 
   140     \param widget the widget being interacted with
   140     \param widget the widget being interacted with
   141     \param interaction the continuous interaction in progress
   141     \param interaction the continuous interaction in progress
   142     \param delta the direction and distance of the continuous interaction
   142     \param delta the direction and distance of the continuous interaction
   143 */
   143 */
   155     }
   155     }
   156 }
   156 }
   157 
   157 
   158 /*!
   158 /*!
   159     Mediates a "continuous interaction stop" triggers to all active feedback engine plugins.
   159     Mediates a "continuous interaction stop" triggers to all active feedback engine plugins.
   160     This methods is needed for knowing when to stop continuous feedback effects started by 
   160     This method indicates when the previously started continuous feedback interaction is stopped.
   161     the continuous interaction.
       
   162 
   161 
   163     \param widget the widget being interacted with
   162     \param widget the widget being interacted with
   164     \param interaction the continuous interaction in progress
   163     \param interaction the continuous interaction in progress
   165 */
   164 */
   166 void HbFeedbackManager::continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction)
   165 void HbFeedbackManager::continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction)
   263 */
   262 */
   264 HbFeedbackPluginGroup& HbFeedbackManager::plugins()
   263 HbFeedbackPluginGroup& HbFeedbackManager::plugins()
   265 {
   264 {
   266     return *d->pluginGroup;
   265     return *d->pluginGroup;
   267 }
   266 }
   268