videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackprogressbar.cpp
changeset 35 3738fe97f027
parent 34 bbb98528c666
child 36 8aed59de29f9
equal deleted inserted replaced
34:bbb98528c666 35:3738fe97f027
    13 *
    13 *
    14 * Description:  Implementation of QMPXVideoPlaybackProgressBar
    14 * Description:  Implementation of QMPXVideoPlaybackProgressBar
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#13 %
    18 // Version : %version: da1mmcf#14 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 
    22 
    23 #include <QTime>
    23 #include <QTime>
    24 #include <QGraphicsSceneMouseEvent>
    24 #include <QGraphicsSceneMouseEvent>
    25 
    25 
    26 #include <hblabel.h>
    26 #include <hblabel.h>
    27 #include <hbframeitem.h>
       
    28 #include <hbprogressbar.h>
    27 #include <hbprogressbar.h>
    29 #include <hbframedrawer.h>
       
    30 
    28 
    31 #include "mpxvideo_debug.h"
    29 #include "mpxvideo_debug.h"
    32 #include "mpxvideoplaybackprogressbar.h"
    30 #include "mpxvideoplaybackprogressbar.h"
    33 #include "mpxvideoplaybackdocumentloader.h"
    31 #include "mpxvideoplaybackdocumentloader.h"
    34 #include "mpxvideoplaybackcontrolscontroller.h"
    32 #include "mpxvideoplaybackcontrolscontroller.h"
    42     : mController( controller )
    40     : mController( controller )
    43     , mDuration( -1 )
    41     , mDuration( -1 )
    44     , mNeedToResumeAfterSetPosition( false )
    42     , mNeedToResumeAfterSetPosition( false )
    45     , mInitialized( false )
    43     , mInitialized( false )
    46     , mDragging( false )
    44     , mDragging( false )
    47     , mFrameItem( NULL )
       
    48 {
    45 {
    49     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackProgressBar::QMPXVideoPlaybackProgressBar()"));
    46     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackProgressBar::QMPXVideoPlaybackProgressBar()"));
    50 }
    47 }
    51 
    48 
    52 // -------------------------------------------------------------------------------------------------
    49 // -------------------------------------------------------------------------------------------------
    96         //
    93         //
    97         // If we init the progress bar after pp sends the duration informatin
    94         // If we init the progress bar after pp sends the duration informatin
    98         // we need to set the duration manually 
    95         // we need to set the duration manually 
    99         //
    96         //
   100         durationChanged( (qreal)mController->fileDetails()->mDuration / (qreal)KPbMilliMultiplier );
    97         durationChanged( (qreal)mController->fileDetails()->mDuration / (qreal)KPbMilliMultiplier );
   101 
       
   102         //
       
   103         // Set framedrawer for semi transparent background
       
   104         //
       
   105         mFrameItem = new HbFrameItem ( this );
       
   106         mFrameItem->setGeometry( boundingRect() );
       
   107         mFrameItem->frameDrawer().setFrameType( HbFrameDrawer::OnePiece );
       
   108         mFrameItem->frameDrawer().setFillWholeRect( true );
       
   109         mFrameItem->frameDrawer().setFrameGraphicsName( "qtg_fr_status_trans_normal_c" );
       
   110         mFrameItem->setVisible( false );
       
   111     }
    98     }
   112 }
    99 }
   113 
   100 
   114 // -------------------------------------------------------------------------------------------------
   101 // -------------------------------------------------------------------------------------------------
   115 // QMPXVideoPlaybackProgressBar::durationChanged
   102 // QMPXVideoPlaybackProgressBar::durationChanged
   293     }
   280     }
   294     else
   281     else
   295     {
   282     {
   296         setEnabled( true );
   283         setEnabled( true );
   297     }
   284     }
   298 
       
   299     mFrameItem->setVisible( ( mController->viewMode() == EFullScreenView )? ETrue:EFalse );
       
   300 }
   285 }
   301 
   286 
   302 // -------------------------------------------------------------------------------------------------
   287 // -------------------------------------------------------------------------------------------------
   303 // QMPXVideoPlaybackProgressBar::updateState()
   288 // QMPXVideoPlaybackProgressBar::updateState()
   304 // -------------------------------------------------------------------------------------------------
   289 // -------------------------------------------------------------------------------------------------