src/hbfeedback/player/hbinstantfeedback.cpp
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 7 923ff622b8b9
child 21 4633027730f5
equal deleted inserted replaced
9:730c025d4b77 15:f378acbc9cfb
    53 */
    53 */
    54 
    54 
    55 /*!
    55 /*!
    56     \fn void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect)
    56     \fn void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect)
    57 
    57 
    58     Sets the instant effect to be be played when calling HbFeedbackPlayer::playInstantFeedback().
    58     Sets the instant effect of the feedback object. This effect will be played when calling
       
    59     the play() function.
       
    60 
       
    61     \sa instantEffect()
    59 */
    62 */
    60 
    63 
    61 void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect)
    64 void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect)
    62 {
    65 {
    63     d->cEffect = effect;
    66     d->cEffect = effect;
    64 }
    67 }
    65 
    68 
    66 /*!
    69 /*!
    67     \fn void HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const
    70     \fn void HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const
    68 
    71 
    69     Returns the instant effect of the instant feedback object. Instant effect represents the feedback 
    72     Returns the instant effect of the instant feedback object.
    70     effect to be played when calling HbFeedbackPlayer::playInstantFeedback().
    73 
       
    74     \sa setInstantEffect()
    71 */
    75 */
    72 
    76 
    73 HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const
    77 HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const
    74 {
    78 {
    75     return d->cEffect;
    79     return d->cEffect;
    76 }
    80 }
    77 
    81 
    78 /*!
    82 /*!
    79     \fn bool HbInstantFeedback::isValid() const
    83     \fn bool HbInstantFeedback::isValid() const
    80 
    84 
    81     Instant feedback is valid if a proper instant effect (not HbFeedback::None) has beed
    85     Instant feedback is valid if a proper instant effect (not HbFeedback::None) has been
    82     defined for the feedback.
    86     defined for the feedback.
    83 */
    87 */
    84 
    88 
    85 bool HbInstantFeedback::isValid() const
    89 bool HbInstantFeedback::isValid() const
    86 {
    90 {
   106 }
   110 }
   107 
   111 
   108 /*!
   112 /*!
   109     Constructor.
   113     Constructor.
   110 
   114 
   111     \param effect instant feedback to be played
   115     \param effect the instant feedback effect of the feedback object. This effect will
       
   116            be played when calling the play() function.
   112 */
   117 */
   113 HbInstantFeedback::HbInstantFeedback(HbFeedback::InstantEffect effect) : d(new HbInstantFeedbackPrivate)
   118 HbInstantFeedback::HbInstantFeedback(HbFeedback::InstantEffect effect) : d(new HbInstantFeedbackPrivate)
   114 {
   119 {
   115     d->cEffect = effect;
   120     d->cEffect = effect;
   116 }
   121 }
   122 {
   127 {
   123     delete d;
   128     delete d;
   124 }
   129 }
   125 
   130 
   126 /*!
   131 /*!
   127     Plays the instant feedback effect.
   132     Plays the feedback object's instant feedback effect.
   128 */
   133 */
   129 void HbInstantFeedback::play()
   134 void HbInstantFeedback::play()
   130 {
   135 {
   131     HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance();
   136     HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance();
   132     if (feedbackPlayer) {
   137     if (feedbackPlayer) {