videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp
branchRCL_3
changeset 21 55fa1ec415c6
parent 16 7f2b2a65da29
child 23 8f0df5c82986
equal deleted inserted replaced
16:7f2b2a65da29 21:55fa1ec415c6
    13 *
    13 *
    14 * Description: Button bar control
    14 * Description: Button bar control
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 18 %
    18 
    19 
    19 // Version : %version: 19 %
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <eikenv.h>
    23 #include <eikenv.h>
    24 #include <barsread.h>
    24 #include <barsread.h>
   326 //
   326 //
   327 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent )
   327 void CMPXVideoPlaybackButtonBar::HandleButtonDownEventL( const TPointerEvent& aPointerEvent )
   328 {
   328 {
   329     MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()"));
   329     MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()"));
   330 
   330 
   331     if ( iController->IsTvOutPlaybackAllowed() )
   331     if ( iSeekingTimer->IsActive() )
   332     {
   332     {
   333         if ( iSeekingTimer->IsActive() )
   333         iSeekingTimer->Cancel();
   334         {
   334     }
   335             iSeekingTimer->Cancel();
   335 
   336         }
   336     if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) )
   337 
   337     {
   338         if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) )
   338         iButtonPressed = EMPXMiddleButtonPressed;
   339         {
   339     }
   340             iButtonPressed = EMPXMiddleButtonPressed;
   340     else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) &&
   341         }
   341               iButtons[EMPXButtonFastForward]->IsVisible() &&
   342         else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) &&
   342               ! iButtons[EMPXButtonFastForward]->IsDimmed() )
   343                   iButtons[EMPXButtonFastForward]->IsVisible() &&
   343     {
   344                   ! iButtons[EMPXButtonFastForward]->IsDimmed() )
   344         iButtons[EMPXButtonFastForward]->SetPressed( ETrue );
   345         {
   345 
   346             iButtons[EMPXButtonFastForward]->SetPressed( ETrue );
   346         iSeekingTimer->Start(
   347 
   347             KMPXLongPressInterval,
   348             iSeekingTimer->Start(
   348             KMPXTactileInterval,
   349                 KMPXLongPressInterval,
   349             TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
   350                 KMPXTactileInterval,
   350 
   351                 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
   351         iButtonPressed = EMPXTopButtonPressed;
   352 
   352     }
   353             iButtonPressed = EMPXTopButtonPressed;
   353     else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) &&
   354         }
   354              iButtons[EMPXButtonRewind]->IsVisible() &&
   355         else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) &&
   355              ! iButtons[EMPXButtonRewind]->IsDimmed() )
   356                  iButtons[EMPXButtonRewind]->IsVisible() &&
   356     {
   357                  ! iButtons[EMPXButtonRewind]->IsDimmed() )
   357         iButtons[EMPXButtonRewind]->SetPressed( ETrue );
   358         {
   358 
   359             iButtons[EMPXButtonRewind]->SetPressed( ETrue );
   359         iSeekingTimer->Start(
   360 
   360             KMPXLongPressInterval,
   361             iSeekingTimer->Start(
   361             KMPXTactileInterval,
   362                 KMPXLongPressInterval,
   362             TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
   363                 KMPXTactileInterval,
   363 
   364                 TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
   364         iButtonPressed = EMPXBottomButtonPressed;
   365 
       
   366             iButtonPressed = EMPXBottomButtonPressed;
       
   367         }
       
   368     }
   365     }
   369 }
   366 }
   370 
   367 
   371 // -------------------------------------------------------------------------------------------------
   368 // -------------------------------------------------------------------------------------------------
   372 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()
   369 // CMPXVideoPlaybackButtonBar::HandleTopButtonUpEventL()